Axis Web 服务客户端中的多个参数
这是我第一次编写Web服务客户端,很有趣,我已经编写了一个Web服务;)
无论如何,我通过以下代码使用axis来调用WS
String endpoint =
"http://localhost:8080/SpeechServices/SpeechWebService/SpeechWebService";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://ws.ecw.com/", "parseNotes"));
HashMap ret = (HashMap) call.invoke(new Object[]{"", "", ""});
System.out.println("Sent 'Hello!', got '" + ret + "'");
我的服务返回一个HashMap并具有三个输入参数apuId,providerId,notes 我不确定如何将这些参数发送到 WS,我确信这只是几个方法调用即可;调用.setProperty。请指教
This is my first time writing a web service client, it's funny, I have already written a webservice;)
Anyways, I am using axis to invoke the WS by following code
String endpoint =
"http://localhost:8080/SpeechServices/SpeechWebService/SpeechWebService";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://ws.ecw.com/", "parseNotes"));
HashMap ret = (HashMap) call.invoke(new Object[]{"", "", ""});
System.out.println("Sent 'Hello!', got '" + ret + "'");
My Service returns a HashMap and has three input parameters apuId,providerId,notes
I am not sure how to send these parameters to the WS, I am sure it's just few method calls away ex; call.setProperty. Please advise
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,
这就是答案,它还没有完全起作用,因为 Axis 似乎不支持 hashmap 作为 Web 服务响应。
Okay,
this is the answer, it does not completely work yet because Axis does not seem to be supporting hashmap as webservice response.