web service 数据类型问题

iwlk 2011-09-09 03:00:34
代码:
========================
try
{
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL("http://xxx.xxx.xxx.xxx/services/cmcc_mas_wbs"));
String ret = (String) call.invoke("sendSmsRequest",new Object[]{"123","xxxxxxxxxxx","","测试中文","GB2312","Normal",Boolean.TRUE});
System.out.println("返回的信息是:" + ret);
} catch (Exception ex)
{
ex.printStackTrace();
}



报错:
========================

org.xml.sax.SAXException: Deserializing parameter 'arg0': could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}string







WSDL:
========================
- <element name="sendSmsRequest">
- <complexType>
- <sequence>
<element name="ApplicationID" nillable="true" type="xsd:string" />
<element maxOccurs="unbounded" minOccurs="0" name="DestinationAddresses" nillable="true" type="xsd:anyURI" />
<element name="ExtendCode" nillable="true" type="xsd:string" />
<element name="Message" nillable="true" type="xsd:string" />
<element name="MessageFormat" nillable="true" type="tns4:MessageFormat" />
<element name="SendMethod" nillable="true" type="tns4:SendMethodType" />
<element name="DeliveryResultRequest" type="xsd:boolean" />
</sequence>
</complexType>
</element>
...全文
247 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
GIS__ 2011-09-09
  • 打赏
  • 举报
回复
有一个schemas.xmlsoap的jia没有导入,名字想不起来了。。
风尘中国 2011-09-09
  • 打赏
  • 举报
回复

就你这种学习态度,“什么破玩意”,打仗的时候如果觉得航母太复杂,而快艇方便,难道你会乘着快艇

跟美国航母作战么?

jar包是很多,说白了你不会用,懒得阅读英文文档所以不会用,那你抱着axis1用一辈子吧,看哪个公司要你

axis1的东西

[Quote=引用 3 楼 iwlk 的回复:]

引用 1 楼 ioe_gaoyong 的回复:

建议楼主用axis2吧,axis1性能和设计上都无法更axis2比的


axis2 的jar 包, 也太多了吧~ 什么破玩意~
[/Quote]
iwlk 2011-09-09
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 ioe_gaoyong 的回复:]

建议楼主用axis2吧,axis1性能和设计上都无法更axis2比的
[/Quote]

axis2 的jar 包, 也太多了吧~ 什么破玩意~
boysmoyou01 2011-09-09
  • 打赏
  • 举报
回复
先在页面上测试这个WSDL是否可用..
如果可用
然后输入相关参数测试一下是否能成功返回..
如果OK,那此时便知道了参数类型,下面就好做了。。
风尘中国 2011-09-09
  • 打赏
  • 举报
回复
建议楼主用axis2吧,axis1性能和设计上都无法更axis2比的

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧