You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by John Bowen <jo...@sabertoothgames.com> on 2001/10/04 22:09:54 UTC

Help with parameters in Apache SOAP client and .NET SOAP service

  Hi all,

  I'm pulling my hair out trying to get my Apache SOAP [v2.2] client working
with a .NET asmx service.

  When I send my SOAP request the server reads the parameters I'm passing it
as null values and rejects my requests no matter what data I fill these
parameters with.  We're arguing back and forth on whose XML is at fault, and
I need some opinions on if my client request is at least SOAPvalid or not.

  Unfortunately the SOAP server isn't in-house, it's another company and I
don't have control or can even snoop around the box.  After a few days of
headaches and searching Google I did fix one of the interoperability
problems by creating a new StringDeserializer to get around that pesky
deserializer exception thrown when the .NET service doesn't return xsi:type
information with the response.

  Here is the XML I'm sending as a request:

--------------
POST /userservice/userservice.asmx HTTP/1.0
Host: www.candyland.com
Content-Type: text/xml; charset=utf-8
Content-Length: 655
SOAPAction: "http://www.candyland.com/soap_MakeNewUser"

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:soap_MakeNewUser xmlns:ns1="http://www.candyland.com"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<User_Name xsi:type="xsd:string">myUserName</User_Name>
<User_Password
xsi:type="xsd:string">myPassword</User_Password>
<Email_Address
xsi:type="xsd:string">john@candyland.com</Email_Address>
</ns1:soap_MakeNewUser>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--------------

  The argument the .NET programmer makes is that his .NET server expects
just <User_Name>name</User_Name>, but the spec I read on w3.org tells me
there's no problem with including the xsi:type information in my parameters.

  This shouldn't be this difficult, my code is based on the few examples
I've found on the net on doing this and it seems relatively straightforward.

  Anyone with ideas or had similar problems with Apache SOAP clients and
.NET services before?

  - John