rbournival
Programmer
Hi,
I've been trying to use a WEB Service but with no success.
I have included the error message and I can't make sense of it.
Also included is the FoxPro program and the WSDL file.
I have a feeling that the parameter (an XML document) I'm sending to the WEB Service is not what is expected.
I really hope somebody can help me with this.
Thanks.
Roger.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< Error Message >>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Error: 1429 - OLE IDispatch exception code 0 from SoapMapper: SoapMapper:Saving SoapMapper inXml failed HRESULT=0x80004002: No such interface supported
- Client:Unspecified client error. HRESULT=0x80004002: No such interface supported
..
SoapMapper:Saving SoapMapper inXml failed HRESULT=0x80004002: No such interface supported
- Client:Unspecified client error. HRESULT=0x80004002: No such interface supported
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< FoxPro Program >>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
LOCAL lopmJobEntrySoap AS "XML Web Service"
* LOCAL lopmJobEntrySoap AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: lopmJobEntrySoap = address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl , pmJobEntry , pmJobEntrySoap
LOCAL loException, lcErrorMsg, loWSHandler
TRY
loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
lopmJobEntrySoap = loWSHandler.SetupClient(" Address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl", "pmJobEntry", "pmJobEntrySoap")
* Call your XML Web service here. ex: leResult = lopmJobEntrySoap.SomeMethod()
*Load xml file in a string
strInXML = FILETOSTR("C:\Temp\promail\pmws002n\Testpmws002n\TestJobXml2\Samples\test.xml")
*Create an XML Document object
inXml= CreateObject("MSXML2.DOMDocument")
*Load the just created string to the XML document object
inXml.loadxml(strInXML)
*Call the function
leResult = lopmJobEntrySoap.SubmitXmlJob(inXml)
CATCH TO loException
lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
DO CASE
CASE VARTYPE(lopmJobEntrySoap)#"O"
* Handle SOAP error connecting to web service
lcErrorMsg=lcErrorMsg+CHR(13)+"Error Connecting."
CASE !EMPTY(lopmJobEntrySoap.FaultCode)
* Handle SOAP error calling method
lcErrorMsg=lcErrorMsg+CHR(13)+lopmJobEntrySoap.Detail
OTHERWISE
* Handle other error
ENDCASE
* Use for debugging purposes
MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< WSDL File >>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap=" xmlns:tm=" xmlns:soapenc=" xmlns:mime=" xmlns:tns=" xmlns:s=" xmlns:soap12=" xmlns:http=" targetNamespace=" xmlns:wsdl=" <wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace=" <s:element name="SubmitXmlJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="inXml">
<s:complexType mixed="true">
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SubmitXmlJobResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SubmitXmlJobResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SubmitXmlJobSoapIn">
<wsdlart name="parameters" element="tns:SubmitXmlJob" />
</wsdl:message>
<wsdl:message name="SubmitXmlJobSoapOut">
<wsdlart name="parameters" element="tns:SubmitXmlJobResponse" />
</wsdl:message>
<wsdlortType name="pmJobEntrySoap">
<wsdlperation name="SubmitXmlJob">
<wsdl:input message="tns:SubmitXmlJobSoapIn" />
<wsdlutput message="tns:SubmitXmlJobSoapOut" />
</wsdlperation>
</wsdlortType>
<wsdl:binding name="pmJobEntrySoap" type="tnsmJobEntrySoap">
<soap:binding transport=" />
<wsdlperation name="SubmitXmlJob">
<soapperation soapAction=" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdlutput>
<soap:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="pmJobEntrySoap12" type="tnsmJobEntrySoap">
<soap12:binding transport=" />
<wsdlperation name="SubmitXmlJob">
<soap12peration soapAction=" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdlutput>
<soap12:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="pmJobEntry">
<wsdlort name="pmJobEntrySoap" binding="tnsmJobEntrySoap">
<soap:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdlort>
<wsdlort name="pmJobEntrySoap12" binding="tnsmJobEntrySoap12">
<soap12:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdlort>
</wsdl:service>
</wsdl:definitions>
I've been trying to use a WEB Service but with no success.
I have included the error message and I can't make sense of it.
Also included is the FoxPro program and the WSDL file.
I have a feeling that the parameter (an XML document) I'm sending to the WEB Service is not what is expected.
I really hope somebody can help me with this.
Thanks.
Roger.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< Error Message >>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Error: 1429 - OLE IDispatch exception code 0 from SoapMapper: SoapMapper:Saving SoapMapper inXml failed HRESULT=0x80004002: No such interface supported
- Client:Unspecified client error. HRESULT=0x80004002: No such interface supported
..
SoapMapper:Saving SoapMapper inXml failed HRESULT=0x80004002: No such interface supported
- Client:Unspecified client error. HRESULT=0x80004002: No such interface supported
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< FoxPro Program >>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
LOCAL lopmJobEntrySoap AS "XML Web Service"
* LOCAL lopmJobEntrySoap AS "MSSOAP.SoapClient30"
* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service.
*__VFPWSDef__: lopmJobEntrySoap = address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl , pmJobEntry , pmJobEntrySoap
LOCAL loException, lcErrorMsg, loWSHandler
TRY
loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
lopmJobEntrySoap = loWSHandler.SetupClient(" Address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl", "pmJobEntry", "pmJobEntrySoap")
* Call your XML Web service here. ex: leResult = lopmJobEntrySoap.SomeMethod()
*Load xml file in a string
strInXML = FILETOSTR("C:\Temp\promail\pmws002n\Testpmws002n\TestJobXml2\Samples\test.xml")
*Create an XML Document object
inXml= CreateObject("MSXML2.DOMDocument")
*Load the just created string to the XML document object
inXml.loadxml(strInXML)
*Call the function
leResult = lopmJobEntrySoap.SubmitXmlJob(inXml)
CATCH TO loException
lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message
DO CASE
CASE VARTYPE(lopmJobEntrySoap)#"O"
* Handle SOAP error connecting to web service
lcErrorMsg=lcErrorMsg+CHR(13)+"Error Connecting."
CASE !EMPTY(lopmJobEntrySoap.FaultCode)
* Handle SOAP error calling method
lcErrorMsg=lcErrorMsg+CHR(13)+lopmJobEntrySoap.Detail
OTHERWISE
* Handle other error
ENDCASE
* Use for debugging purposes
MESSAGEBOX(lcErrorMsg)
FINALLY
ENDTRY
<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<< WSDL File >>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap=" xmlns:tm=" xmlns:soapenc=" xmlns:mime=" xmlns:tns=" xmlns:s=" xmlns:soap12=" xmlns:http=" targetNamespace=" xmlns:wsdl=" <wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace=" <s:element name="SubmitXmlJob">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="inXml">
<s:complexType mixed="true">
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="SubmitXmlJobResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SubmitXmlJobResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SubmitXmlJobSoapIn">
<wsdlart name="parameters" element="tns:SubmitXmlJob" />
</wsdl:message>
<wsdl:message name="SubmitXmlJobSoapOut">
<wsdlart name="parameters" element="tns:SubmitXmlJobResponse" />
</wsdl:message>
<wsdlortType name="pmJobEntrySoap">
<wsdlperation name="SubmitXmlJob">
<wsdl:input message="tns:SubmitXmlJobSoapIn" />
<wsdlutput message="tns:SubmitXmlJobSoapOut" />
</wsdlperation>
</wsdlortType>
<wsdl:binding name="pmJobEntrySoap" type="tnsmJobEntrySoap">
<soap:binding transport=" />
<wsdlperation name="SubmitXmlJob">
<soapperation soapAction=" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdlutput>
<soap:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:binding name="pmJobEntrySoap12" type="tnsmJobEntrySoap">
<soap12:binding transport=" />
<wsdlperation name="SubmitXmlJob">
<soap12peration soapAction=" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdlutput>
<soap12:body use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="pmJobEntry">
<wsdlort name="pmJobEntrySoap" binding="tnsmJobEntrySoap">
<soap:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdlort>
<wsdlort name="pmJobEntrySoap12" binding="tnsmJobEntrySoap12">
<soap12:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdlort>
</wsdl:service>
</wsdl:definitions>