Option ExplicitDim cc As New MSSOAPLib.SoapClient
Private Sub Command1_Click()cc.mssoapinit ("http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools?wsdl") '执行到此句时报错Me.Text2.Text = cc.decode(Me.Text1.Text)End Sub错误如下:
-2147024809
WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005 - WSDLReader:Initialization of service failed HRESULT=0x80004005 - WSDLService:Initialization of the port for service EncodeHelperToolsService failed HRESULT=0x80004005 - WSDLPort:Analyzing the binding information for port EncodeHelperTools failed HRESULT=0x80004005 - WSDLPort:An operation for port EncodeHelperTools could not be initialized HRESULT=0x80004005 - WSDLOperation:Initializing of the input message failed for operation decode HRESULT=0x80004005 - WSDLOperation:Initialization of a SoapMapper for operation decode failed HRESULT=0x80004005 - SoapMapper:The SoapMapper for element string could not be created HRESULT=0x80004005 - SoapMapper:The schema definition with a targetnamespace of http://schemas.xmlsoap.org/soap/encoding/ for SoapMapper string could not be found HRESULT=0x80004005这是什么问题啊,而且输入cc.的时候也没有自动出来里面的decode,高手帮看看了
Private Sub Command1_Click()cc.mssoapinit ("http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools?wsdl") '执行到此句时报错Me.Text2.Text = cc.decode(Me.Text1.Text)End Sub错误如下:
-2147024809
WSDLReader:Analyzing the WSDL file failed HRESULT=0x80004005 - WSDLReader:Initialization of service failed HRESULT=0x80004005 - WSDLService:Initialization of the port for service EncodeHelperToolsService failed HRESULT=0x80004005 - WSDLPort:Analyzing the binding information for port EncodeHelperTools failed HRESULT=0x80004005 - WSDLPort:An operation for port EncodeHelperTools could not be initialized HRESULT=0x80004005 - WSDLOperation:Initializing of the input message failed for operation decode HRESULT=0x80004005 - WSDLOperation:Initialization of a SoapMapper for operation decode failed HRESULT=0x80004005 - SoapMapper:The SoapMapper for element string could not be created HRESULT=0x80004005 - SoapMapper:The schema definition with a targetnamespace of http://schemas.xmlsoap.org/soap/encoding/ for SoapMapper string could not be found HRESULT=0x80004005这是什么问题啊,而且输入cc.的时候也没有自动出来里面的decode,高手帮看看了
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" xmlns:intf="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT) -->
- <wsdl:message name="encodeResponse">
<wsdl:part name="encodeReturn" type="soapenc:string" />
</wsdl:message>
- <wsdl:message name="encodeRequest">
<wsdl:part name="s" type="soapenc:string" />
</wsdl:message>
- <wsdl:message name="decodeResponse">
<wsdl:part name="decodeReturn" type="soapenc:string" />
</wsdl:message>
- <wsdl:message name="decodeRequest">
<wsdl:part name="s" type="soapenc:string" />
</wsdl:message>
- <wsdl:portType name="EncodeHelperTools">
- <wsdl:operation name="decode" parameterOrder="s">
<wsdl:input message="impl:decodeRequest" name="decodeRequest" />
<wsdl:output message="impl:decodeResponse" name="decodeResponse" />
</wsdl:operation>
- <wsdl:operation name="encode" parameterOrder="s">
<wsdl:input message="impl:encodeRequest" name="encodeRequest" />
<wsdl:output message="impl:encodeResponse" name="encodeResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="EncodeHelperToolsSoapBinding" type="impl:EncodeHelperTools">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="decode">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="decodeRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://com" use="encoded" />
</wsdl:input>
- <wsdl:output name="decodeResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" use="encoded" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="encode">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="encodeRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://com" use="encoded" />
</wsdl:input>
- <wsdl:output name="encodeResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="EncodeHelperToolsService">
- <wsdl:port binding="impl:EncodeHelperToolsSoapBinding" name="EncodeHelperTools">
<wsdlsoap:address location="http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
yourservice是webservice中的类名
yourserviceSoapPort在wsdl文件中生成 上面的是在网上看到的,我怎么知道后面那两个参数的具体内容,一定要加参数吗cc.mssoapinit "http://80.66.41.18:8080/caissaweb/services/EncodeHelperTools?wsdl"
有例子说直接这样写就行了