【发布时间】:2011-12-21 12:44:15
【问题描述】:
我正在处理一个 .wsdl 文件来定义 gSOAP 服务。在服务的一个请求中,我想使用用户定义的类型作为请求的一部分,但我无法正确处理,也不知道问题出在哪里:
<definitions name="Uploader"
targetNamespace="http://192.168.2.113/uploader/uploader.wsdl"
xmlns:tns="http://192.168.2.113/uploader/uploader.wsdl"
[...]>
[...]
<types>
<schema targetNamespace="http://192.168.2.113/uploader/uploader.wsdl"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="FileInformation">
<complexType><all>
<element name="sFilename" type="string"/>
<element name="bDirectory" type="boolean"/>
</all></complexType>
</element>
[...]
<element name="UploadRequest">
<complexType><all>
<element name="fileInfo" type="tns:FileInformation"/>
</all></complexType>
</element>
[...]
</schema>
</types>
[...]
</definitions>
当我尝试使用 wsdl2h -o Uploader.h http://192.168.2.113/uploader/uploader.wsdl 从中生成头文件时,fileInfo 成员将被定义为字符串,我收到以下警告:
Warning: could not find element 'fileInfo' type '"http://192.168.2.113/uploader/uploader.wsdl":FileInformation' in schema http://192.168.2.113/uploader/uploader.wsdl
【问题讨论】: