Axis2とEclipseを使ってWebサービスを構築しようとしています。
【参考にさせて頂いているサイト】
http://blogs.yahoo.co.jp/dk521123/31944955.html
こちらのWebサイトを参考にさせて頂き対応しているのですが
Responseが期待通りに帰ってきません。
ご教示お願いできますでしょうか。
①以下URLにアクセスしてResponseを確認しましたが、期待通りとなりませんでした
http://localhost:8080/Axis2Sample/services/HelloWorld/SayHello?name=Mike
②期待と違うResponse が返却される
This XML file does not appear to have any style information associated with it. The document tree is shown below. <soapenv:Reason xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Text xml:lang="en-US"> The ServiceClass object does not implement the required method in the following form: OMElement SayHello(OMElement e) </soapenv:Text> </soapenv:Reason>
③期待値するResponse はこちら
<ns:SayHelloResponse xmlns:ns="http://webservices.demo"> <ns:return>Hello Mike</ns:return> </ns:SayHelloResponse>
■ソースなどはこちらとなります
・HelloWorld.java
package demo.webservices; public class HelloWorld { public String SayHello(String name) { return "Hello " + name; } }
・services.xml
<service name="HelloWorld" > <Description> Please Type your service description here </Description> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/> </messageReceivers> <parameter name="ServiceClass" locked="false">demo.webservices.HelloWorld</parameter> </service>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。