我正在尝试使用Visual Basic.net来使用Java Webservice。我在反序列化时收到错误“无法将System.Xml.XmlNode []类型的对象分配给System.String类型的对象”。
我一直在阅读的是wsdl规范可能不符合WS-I BP 1.1规范。 Link Here
另一个解决here的解决方案是将响应xml更改为符合.net数据类型。几年前我曾试图以其他原因这样做,事实证明它是不稳定的。
wsdl的片段是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:intf="http://ws.interfaces.sessions.APILink.amdocs"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns2="http://io.datainfo.APILink.amdocs"
xmlns:tns3="http://datainfo.APILink.amdocs"
xmlns:tns4="http://awsi.amdocs.com"
xmlns:tns5="http://exceptions.APILink.amdocs"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<complexType name="InPersonInfo">
<complexContent>
<extension base="tns2:BaseInputOutputInfo">
<sequence>
<element maxOccurs="1" minOccurs="0" name="mItem1" type="xsd:int"/>
<element maxOccurs="1" minOccurs="0" name="mID" nillable="true" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="mPersonType" type="tns4:char"/>
</sequence>
</extension>
</complexContent>
</complexType>
我看到的WSDL中的其他部分只是消息和操作部分。
编辑2011-04-21:这question提及我正在经历的事情。
我不熟悉java我所知道的是它是用AXIS或SOAPUI创建/使用的,并且它不是根据标准创建WSDL而且存在我的问题。如果我找到解决方案的答案,我会在这里发布。