[Mono-list] Invalid rpc/encoded soap messages?

Ramon Guiu ramon.guiu@xyleme.com
Fri, 04 Jun 2004 10:48:00 +0200


Does mono uses soap rpc/encoded method?
For each method I specify the 
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("getConnection", 
RequestNamespace="x", ResponseNamespace="x")] attribute.

I have a GLUE webservice that using rpc/encoded style. When use my 
client from mono version 0.31 Linux the following soap message is sent 
to the server:

<?xml version='1.0' encoding='utf-8'?>
  <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
    <soap:Body>
      <q1:getConnection xmlns:q1='x'>
        <login xsi:type='xsd:string'>xyadmin</login>
        <password xsi:type='xsd:string'>xyadmin</password>
      </q1:getConnection>
    </soap:Body>
  </soap:Envelope>


However the GLUE server answers with:
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' 
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'><soap:Body 
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><soap:Fault><faultcode>soap:Server</faultcode><faultstring>this 
is a soap-encoded 
endpoint</faultstring></soap:Fault></soap:Body></soap:Envelope>

So this is a soap-encoded endpoint.


The same code works well with .NET.
The generated message is slightly different:

  <?xml version='1.0' encoding='utf-8'?>
  <soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' 
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
xmlns:tns='http://www.themindelectric.com/wsdl/ConnectionManagerWS' 
xmlns:types='http://www.themindelectric.com/wsdl/ConnectionManagerWS/encodedTypes' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xml
ns:xsd='http://www.w3.org/2001/XMLSchema'>
    <soap:Body 
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
      <q1:getConnection xmlns:q1='x'>
        <login xsi:type='xsd:string'>xyadmin</login>
        <password xsi:type='xsd:string'>xyadmin</password>
      </q1:getConnection>
    </soap:Body>
  </soap:Envelope>



I understand the problem is in 
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/ not being 
specified in the soap message body. Do I need to specify something to 
get the encodingStyle added to the body of my message?
Any ideas?


Thanks,

Ramon