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>