似乎具有自定义类型的嵌套元素在visual studio 2008中不起作用。我有以下wsdl文件:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns0="http://processmaker.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://processmaker.com">
<wsdl:types>
<xs:element name="processListStruct" >
<xs:complexType >
<xs:sequence >
<xs:element name="guid" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="processListResponse" >
<xs:complexType >
<xs:sequence >
<xs:element name="processes" maxOccurs="unbounded" type="ns0:processListStruct"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</wsdl:types>
<!-- snip other definition -->
</wsdl:definitions>
然而,在Visual Studio中,当我将鼠标光标移动到行<xs:element name="processes" maxOccurs="unbounded" type="ns0:processListStruct"/>
上时,我得到了一个“类型的processListStruct未声明错误”。因为我想使用以下命令生成代理类,
wsdl /out:mycsclass.cs blahblah.wsdl
我说错了
The datatype 'http://processmaker.com:processListStruct' is missing.
如何修复此问题,除了wsdl之外还有其他任何可以成功转换上述元素的工具吗?
答案 0 :(得分:0)
我认为这是一个wsdl.exe错误,我向Microsoft报告了this issue。
答案 1 :(得分:0)
正如微软回应,它不是WSDL.EXE错误,它是架构中的一个错误:
<xs:element name="processes" maxOccurs="unbounded" type="ns0:processListStruct"/>
然而,我们可以看到:
<xs:element name="processListStruct" >
processListStruct
是一个元素,而不是一个类型。