Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


VB6 and SOAP problem

VB6 and SOAP problem

VB6 and SOAP problem

I can't find any reference to this error:

Run-time error '5054'
Method 'EndMessage' of object 'ISoapConnector' failed

background: I went through the MS Soap 3 tutes, now i'm trying to set up a soap service with one of my active x exe's. did the wgen on it. now i'm setting up a vb6 client to test. basically, used the tutorial test client as a base and added my stuff in. here is some the code for the test client:

Private Function GetImage(ByVal Method As String, ByVal CatalogID As String, ByVal ItemNum As String, _
            ByVal TheStyle As String, ByVal ColorDes As String, ByVal TheText1 As String, ByVal TheText2 As String)

    Dim Serializer As SoapSerializer30
    Dim Reader As SoapReader30
    Dim ResultElm As IXMLDOMElement
    Dim FaultElm As IXMLDOMElement
    Dim Connector As SoapConnector30
    Set Connector = New httpConnector30
    Connector.Property("EndPointURL") = END_POINT_URL
    ' binding/operation/soapoperation
    Connector.Property("SoapAction") = SoapAction & Method
    Set Serializer = New SoapSerializer30
    Serializer.Init Connector.InputStream
    Serializer.StartElement Method, CREATE_GRAPHIC
    Serializer.StartElement "strCatID"
    Serializer.WriteString CatalogID
    Serializer.StartElement "strItemNo"
    Serializer.WriteString ItemNum
    Serializer.StartElement "strStyle"
    Serializer.WriteString TheStyle
    Serializer.StartElement "strColorDesc"
    Serializer.WriteString ColorDes
    Serializer.StartElement "strText1"
    Serializer.WriteString TheText1
    Serializer.StartElement "strText2"
    Serializer.WriteString TheText2
    Connector.EndMessage    '<--- LINE THAT IT FAILS ON
    Set Reader = New SoapReader30
    Reader.Load Connector.OutputStream
    If Not Reader.Fault Is Nothing Then
        MsgBox Reader.FaultString.Text, vbExclamation
        GetImage = Reader.RpcResult.Text
    End If
End Function

can anyone lend me a hand here?

RE: VB6 and SOAP problem

ok, solved that error by changing my endpointurl to the asp listener instead of the wsdl file. but now i have a new error:

"WSDLReader:The operation requested in the Soap message with soapAction http://tempuri.org/sartpreviewws/SARTPreviewServer/SartPreview.CreateGraphics isn't defined in the WSDL file.  This may be because it is in the wrong namespace or has incorrect cae"

here is my soapAction declaration:

Private Const SoapAction = "http://tempuri.org/sartpreviewws/SARTPreviewServer/SartPreview."

it is put together in Connector.Property("SoapAction") = SoapAction & Method with the passed in method parameter (above function)

i'm a little lost, trying to learn this. here is my wsdl file:

<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 02/19/03 by Microsoft SOAP Toolkit WSDL File Generator, Version 3.00.1325.0 -->


            <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/'/>


    <message name='CreatePreview.CreateGraphics'>
        <part name='strCatID' type='xsd:anyType'/>
        <part name='strItemNo' type='xsd:anyType'/>
        <part name='strStyle' type='xsd:anyType'/>
        <part name='strColorDesc' type='xsd:anyType'/>
        <part name='strText1' type='xsd:anyType'/>
        <part name='strText2' type='xsd:anyType'/>

    <message name='CreatePreview.CreateGraphicsResponse'>
        <part name='Result' type='xsd:anyType'/>
        <part name='strCatID' type='xsd:anyType'/>
        <part name='strItemNo' type='xsd:anyType'/>
        <part name='strStyle' type='xsd:anyType'/>
        <part name='strColorDesc' type='xsd:anyType'/>
        <part name='strText1' type='xsd:anyType'/>
        <part name='strText2' type='xsd:anyType'/>

    <message name='CreatePreview.tmpID'>

    <message name='CreatePreview.tmpIDResponse'>
        <part name='Result' type='xsd:string'/>

    <portType name='CreatePreviewSoapPort'>

        <operation name='CreateGraphics' parameterOrder='strCatID strItemNo strStyle strColorDesc strText1 strText2'>
            <input message='wsdlns:CreatePreview.CreateGraphics'/>
            <output message='wsdlns:CreatePreview.CreateGraphicsResponse'/>

        <operation name='tmpID' parameterOrder=''>
            <input message='wsdlns:CreatePreview.tmpID'/>
            <output message='wsdlns:CreatePreview.tmpIDResponse'/>


    <binding name='CreatePreviewSoapBinding' type='wsdlns:CreatePreviewSoapPort' >

        <stk:binding preferredEncoding='UTF-8'/>
        <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>

        <operation name='CreateGraphics'>
            <soap:operation soapAction='http://tempuri.org/sartpreview/action/CreatePreview.CreateGraphics'/>
                    parts='strCatID strItemNo strStyle strColorDesc strText1 strText2'/>
                    parts='Result strCatID strItemNo strStyle strColorDesc strText1 strText2'/>

        <operation name='tmpID'>
            <soap:operation soapAction='http://tempuri.org/sartpreview/action/CreatePreview.tmpID'/>


    <service name='sartpreview' >
        <port name='CreatePreviewSoapPort' binding='wsdlns:CreatePreviewSoapBinding' >
            <soap:address location='http://bolteb/sartpreviewws/sartpreviewserver/sartpreview.ASP'/>


i noticed the this line in the "operation" declaration - <input message='wsdlns:CreatePreview.CreateGraphics'/> and tried to use that namespace(?) but still got the same error.

so now what?

RE: VB6 and SOAP problem

Check to make sure that the Connector.Property("EndPointURL") points to a web page that has the reference to the DLL that is doing the "work".

When the web page is not there you can get this message.

RE: VB6 and SOAP problem

Were you able to get around the problem "WSDLReader:The operation requested in the Soap message with soapAction". If so, can you please explain me how you did it. I am having the same problem.

RE: VB6 and SOAP problem

i'm trying to remember but i think it was because the host provider didn't have the latest soap toolkit installed. they wouldn't install it either. so i had to take a different route with the MS XMLHTTP object (which was there).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close