这里有返回的两个字段,一个是返回字符串,这个很好理解
<s:element name="HelloWorld"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="uname" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="upassword" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="HelloWorldResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" /> </s:sequence> </s:complexType> </s:element>
这一段就字符串的 那返回数组的就比较麻烦了,我和老农搞了一两周才发现是WSDL文件写错了,看下面的一段
<s:element name="GetMember"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="uid" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="uname" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="GetMemberResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetMemberResult" type="tns:ArrayOfMember" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="ArrayOfMember"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="Member" nillable="true" type="tns:Member" /> </s:sequence> </s:complexType> <s:complexType name="Member"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="UserId" type="s:int" /> <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" /> </s:sequence> </s:complexType>
|