Java SOAP Client Works But WM Client Does Not

Hi Gary,

Can you post the WSDL for the external SOAP service you are calling?

What are the service inputs of the Web Service connector you generated from the WSDL?

-Mark

Hi,
I first tried generating a web connector for the external SOAP webservice WSDL but I could not get the connector to work, getting this error:
Server was unable to read request. –> There is an error in XML document (5, 4). –> The XML declaration is unexpected. Line 5, position 14.
And as I said earlier, the same XML stream works fine with a Java client.
I have attached the WSDL for the external SOAP webservice.
Thanks in advance for your help!
gary…

WSDL for external SOAP webservice
External.wsdl (2.4 k)

Ok,

Your WSDL looks like it was generated from a very simple Microsoft .NET Web Service using SOAP-Message protocol ( not SOAP-RPC ).

Does your ASMX (VB in this case) code look something like this?

Public Function _ 
    ProcessXML(ByVal sInput As String) _ 
    As String 
    Try 
        Return sInput 'Simply echo the document back to the sender 
    Catch ex As Exception 
        Return ex.Message 
    End Try 
End Function 

Let me assure you that this will work!

These issues usually end up being namespace problems.

How are you forming the XML document to send to the Web Service?

Regards

One more quick point.

As a quick sanity check, you can run the connector stand-alone by opening the generated service associated with the connector, and clicking the run button in the tool bar.

When you do this, you should get a service input dialog that contains a textbox for a string named s0:sXml within a document named s0:ProcessXml.

If you just type in a string in the s0:xXml box and hit ok, what happens?

Hi,
I just found out today that one of our sister companies has a WM consultant onsite and I asked him to look at my problem and he was able to get the web connector to work by setting the pub.xml:documentXMLToString pipeline Service In “encode” to “true”.
Now it works when run stand alone as you suggested! I just pasted the same XML string into the s0:sXml textbox.
I’m ecstatic at this point but I would still like to know why my other service (based on the buildRPC_SendHTTPSimple sample) doesn’t work if anyone has an idea? I see an “encoding” pipeline service for the “pub.xml:xmlStringToXMLNode” flow service - could this need a specific value?
thanks!

I think this is easier than you think.

If you add additional arguments to your .Net Web Service function definition, and regenerate the WSDL and Web Service connector, they will appear as additional string inputs in your webMethods connector.

Just map the string values and forget about handling XML. webMethods and .NET are trying to hide the XML handling details from you.

You could pass an XML document in a single string argument and de-serialize it on the .Net side, but why?

Regards