WSDL是这样的:
<wsdl:types>
<s:schema targetNamespace="http://mfisoft.ru/voip/service/soap">
<s:complexType name="column">
<s:all>
<s:element name="name" type="s:string"/>
<s:element name="value" type="s:string"/>
</s:all>
</s:complexType>
<s:complexType name="row">
<s:complexContent>
<s:restriction base="ns:Array">
<s:sequence>
<s:element name="item" type="ns3:column" maxOccurs="unbounded"/>
</s:sequence>
<s:attribute ref="ns:arrayType" arrayType="ns3:column[]" />
</s:restriction>
</s:complexContent>
</s:complexType>
</s:schema>
</wsdl:types>
where ns is xmlns="http://schemas.xmlsoap.org/wsdl/"ns3="http://mfisoft.ru/voip/service/soap"
我只是想知道,如果我写一个WCF web服务来模拟上面wsdl描述的web服务,我如何定义complexType?例如,到"列"?这是ii的等价形式吗?
[DataContract]
public class column
{
[DataMember]
public string name;
[DataMember]
public string value;
}
那"row"呢?
谢谢,等待你的回答,任何帮助都是感激的
尝试使用 svcutil
svcutil your.wsdl
它将生成接口和数据契约等