Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WEB Service - No such interface supported 1

Status
Not open for further replies.

rbournival

Programmer
Aug 16, 2007
6
0
0
US
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">
<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:eek:peration name="SubmitXmlJob">
<wsdl:input message="tns:SubmitXmlJobSoapIn" />
<wsdl:eek:utput message="tns:SubmitXmlJobSoapOut" />
</wsdl:eek:peration>
</wsdl:portType>
<wsdl:binding name="pmJobEntrySoap" type="tns:pmJobEntrySoap">
<soap:binding transport=" />
<wsdl:eek:peration name="SubmitXmlJob">
<soap:eek:peration soapAction=" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:eek:utput>
<soap:body use="literal" />
</wsdl:eek:utput>
</wsdl:eek:peration>
</wsdl:binding>
<wsdl:binding name="pmJobEntrySoap12" type="tns:pmJobEntrySoap">
<soap12:binding transport=" />
<wsdl:eek:peration name="SubmitXmlJob">
<soap12:eek:peration soapAction=" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:eek:utput>
<soap12:body use="literal" />
</wsdl:eek:utput>
</wsdl:eek:peration>
</wsdl:binding>
<wsdl:service name="pmJobEntry">
<wsdl:port name="pmJobEntrySoap" binding="tns:pmJobEntrySoap">
<soap:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
<wsdl:port name="pmJobEntrySoap12" binding="tns:pmJobEntrySoap12">
<soap12:address location=" Address"/pmws002n/pmJobEntry.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
It way be you messagebox the cause of your problem. Use STRTOFILE() to an error text file instead.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Hi Mike,

Thanks for the prompt reply.

I changed the MESSAGEBOX to STRTOFILE but I get the same error.

Thanks.

Roger.
 
Roger,
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
 
Hi Steve,

The line that causes the error is :

leResult = lopmJobEntrySoap.SubmitXmlJob(inXml)

Thanks.

Roger
 
Try this:

inXml.loadxml(strInXML)

nodelist=inXml.DocumentElement.ChildNodes()

*Call the function
leResult = lopmJobEntrySoap.SubmitXmlJob(nodelist)

 
How about this:

replace

loWSHandler=NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx")
lopmJobEntrySoap = loWSHandler.SetupClient(" Address"/pmws002n/WebReferences/pmws002/pmJobEntry.wsdl", "pmJobEntry", "pmJobEntrySoap")

with

lopmJobEntrySoap = createobject("MSSOAP.SoapClient30")
lopmJobEntrySoap.mssoapinit(" 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 ?
 
Steve

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:
<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:=" _
<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 = " Dim ErrXsd As String = "

'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
 
I could be up the wrong tree but based on the info you posted I do not see a web service located at the location your code describes.
you should be able to VIA any browser go to the webService URL and in casses of dot.Net WS type
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top