WEB Service - No such interface supported
WEB Service - No such interface supported
(OP)
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 = http://"URL 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("http://"URL 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="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.sma-promail.com/pmws002n" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.sma-promail.com/pmws002n" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.sma-promail.com/pmws002n">
<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">
<wsdl:part name="parameters" element="tns:SubmitXmlJob" />
</wsdl:message>
<wsdl:message name="SubmitXmlJobSoapOut">
<wsdl:part name="parameters" element="tns:SubmitXmlJobResponse" />
</wsdl:message>
<wsdl:portType name="pmJobEntrySoap">
<wsdl:operation name="SubmitXmlJob">
<wsdl:input message="tns:SubmitXmlJobSoapIn" />
<wsdl:output message="tns:SubmitXmlJobSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="pmJobEntrySoap" type="tns:pmJobEntrySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SubmitXmlJob">
<soap:operation soapAction="http://www.sma-promail.com/pmws002n/SubmitXmlJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="pmJobEntrySoap12" type="tns:pmJobEntrySoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SubmitXmlJob">
<soap12:operation soapAction="http://www.sma-promail.com/pmws002n/SubmitXmlJob" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="pmJobEntry">
<wsdl:port name="pmJobEntrySoap" binding="tns:pmJobEntrySoap">
<soap:address location="http://"URL Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
<wsdl:port name="pmJobEntrySoap12" binding="tns:pmJobEntrySoap12">
<soap12:address location="http://"URL Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
</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 = http://"URL 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("http://"URL 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="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.sma-promail.com/pmws002n" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.sma-promail.com/pmws002n" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.sma-promail.com/pmws002n">
<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">
<wsdl:part name="parameters" element="tns:SubmitXmlJob" />
</wsdl:message>
<wsdl:message name="SubmitXmlJobSoapOut">
<wsdl:part name="parameters" element="tns:SubmitXmlJobResponse" />
</wsdl:message>
<wsdl:portType name="pmJobEntrySoap">
<wsdl:operation name="SubmitXmlJob">
<wsdl:input message="tns:SubmitXmlJobSoapIn" />
<wsdl:output message="tns:SubmitXmlJobSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="pmJobEntrySoap" type="tns:pmJobEntrySoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SubmitXmlJob">
<soap:operation soapAction="http://www.sma-promail.com/pmws002n/SubmitXmlJob" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="pmJobEntrySoap12" type="tns:pmJobEntrySoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="SubmitXmlJob">
<soap12:operation soapAction="http://www.sma-promail.com/pmws002n/SubmitXmlJob" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="pmJobEntry">
<wsdl:port name="pmJobEntrySoap" binding="tns:pmJobEntrySoap">
<soap:address location="http://"URL Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
<wsdl:port name="pmJobEntrySoap12" binding="tns:pmJobEntrySoap12">
<soap12:address location="http://"URL Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
RE: WEB Service - No such interface supported
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483: How to get the best response from the forum first.
ReFox XI (www.mcrgsoftware.com)
RE: WEB Service - No such interface supported
Thanks for the prompt reply.
I changed the MESSAGEBOX to STRTOFILE but I get the same error.
Thanks.
Roger.
RE: WEB Service - No such interface supported
Do you know which line caused the error ?
If it bombed on loWSHandler or lopmJobEntrySoap, then it is a connection problem. Try replacing them with:
o = createobject("MSSOAP.SoapClient30")
o.mssoapinit(m0wsdl)
where m0wsdl is your wsdl string.
Steve
RE: WEB Service - No such interface supported
The line that causes the error is :
leResult = lopmJobEntrySoap.SubmitXmlJob(inXml)
Thanks.
Roger
RE: WEB Service - No such interface supported
inXml.loadxml(strInXML)
nodelist=inXml.DocumentElement.ChildNodes()
*Call the function
leResult = lopmJobEntrySoap.SubmitXmlJob(nodelist)
RE: WEB Service - No such interface supported
I made the suggested changes and I'm getting this error message:
Error: 1429 - OLE IDispatch exception code 0 from ?:
Server did not recognize the value of HTTP Header SOAPAction: http://www.sma-promail.com/pmws002n/SubmitXmlJob...
<detail/>
Roger.
RE: WEB Service - No such interface supported
replace
loWSHandler=NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
lopmJobEntrySoap = loWSHandler.SetupClient("http://"URL Address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl", "pmJobEntry", "pmJobEntrySoap")
with
lopmJobEntrySoap = createobject("MSSOAP.SoapClient30")
lopmJobEntrySoap.mssoapinit("http://"URL Address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl", "pmJobEntry", "pmJobEntrySoap")
nXml.loadxml(strInXML)
nodelist=inXml.DocumentElement.ChildNodes()
*Call the function
leResult = lopmJobEntrySoap.SubmitXmlJob(nodelist)
also the syntax of SubmitXmlJob(nodelist): are you sure no more parameters are needed such as user name and password ?
RE: WEB Service - No such interface supported
Made the changes but I am still getting this error:
Error: 1429 - OLE IDispatch exception code 0 from ?: Server did not recognize the value of HTTP Header SOAPAction:
http://www.sma-promail.com/pmws002n/SubmitXmlJob...
<detail/>
As for the parameters, here is the code that is executed on the WEB Server:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.IO
Imports System.Xml.Schema
Imports System.Xml
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Collections.Specialized
Imports pm5Proj
<WebService(Namespace:="http://www.sma-promail.com/pmws002")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class pmJobEntry
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function SubmitXmlJob(ByVal inXml As XmlDocument) As String
Dim hostAddr As String = Context.Request.UserHostAddress
Dim xsdFlnm As String = "http://localhost/pmws002n/Schema/createjob.xsd"
Dim ErrXsd As String = "http://localhost/pmws002n/Schema/jobReturn.xsd"
'Throw New SoapException(ErrMSg, SoapException.ServerFaultCode)
Dim outXMl As String
Dim pmJb As New pmJobEntryNS.pmJobEntry
outXMl = pmJb.Processjob(inXml, hostAddr, "", xsdFlnm, ErrXsd)
Return outXMl
End Function
End Class
I really appreciate your help Steve.
Thanks.
Roger
RE: WEB Service - No such interface supported
That is all I can help. Good luck.
RE: WEB Service - No such interface supported
Don't worry sir.
Thanks again.
Roger.
RE: WEB Service - No such interface supported
you should be able to VIA any browser go to the webService URL and in casses of dot.Net WS type
http://fullURL/myWebservice.asmx?WSDL and have the wsdl returned all i see is a 404 error and this would result in a "no such interface supported" So the question is
are you pointing to a valid WebService URL
and like i said "I could be all wet"
Steve Bowman
Independent Technology, Inc.
CA, USA