100分求解xfire无法调用VC 使用soap toolkit 3.0 生成的wsdl的问题
问题描述:
因客户需求,所做webservice不使用.net framework2.0.
使用VC2005开发VC ATL com组件,然后用soap toolkit3.0 发布于IIS上,使用webservice方式。
JAVA 开发平台eclipse 使用xfire调用此webservice,当调用WSDL时,提示错误信息:
schema_reference.4:failed to read schema document 'null'.
because 1) could not find the document;
2) the document could not be read;
3) the root element of the document is not <xsd:schema>.
此webservice接口名createdir ,输入参数为String型字符串,为要创建的文件夹的完整路径名。输出参数为调用状态显示,为 int型
此webservice在.net环境下可以调用。并且java 开发平台eclipse 的xfire也可以调用.net 开发的webservice,均无问题。
以下为wsdl文件内容:
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 06/19/08 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->
<definitions
name='TestDir'
targetNamespace='http://tempuri.org/TestDir/wsdl/'
xmlns:wsdlns='http://tempuri.org/TestDir/wsdl/'
xmlns:typens='http://tempuri.org/TestDir/type/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema
targetNamespace='http://tempuri.org/TestDir/type/'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualified'>
<import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
<import namespace='http://schemas.xmlsoap.org/wsdl/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>
</schema>
</types>
<message name='Fun.CreateDir'>
<part name='_bstrOrg' type='xsd:string'/>
</message>
<message name='Fun.CreateDirResponse'>
<part name='Result' type='xsd:int'/>
</message>
<portType name='FunSoapPort'>
<operation name='CreateDir' parameterOrder='_bstrOrg'>
<input message='wsdlns:Fun.CreateDir'/>
<output message='wsdlns:Fun.CreateDirResponse'/>
</operation>
</portType>
<binding name='FunSoapBinding' type='wsdlns:FunSoapPort' >
<stk:binding preferredEncoding='UTF-8'/>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='CreateDir'>
<soap:operation soapAction='http://tempuri.org/TestDir/action/Fun.CreateDir'/>
<input>
<soap:body
use='encoded'
namespace='http://tempuri.org/TestDir/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='_bstrOrg'/>
</input>
<output>
<soap:body
use='encoded'
namespace='http://tempuri.org/TestDir/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result'/>
</output>
</operation>
</binding>
<service name='TestDir' >
<port name='FunSoapPort' binding='wsdlns:FunSoapBinding' >
<soap:address location='http://192.168.2.47/soapsample/TestDir.ASP'/>
</port>
</service>
</definitions>
希望高人进来指点一下。现在被这个都快搞疯了。