[Xml-compile] SOAP RPC literal with no parameters (empty Body)

Oliver Gorwits oliver.gorwits at oucs.ox.ac.uk
Wed Jun 16 13:28:20 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

I have what could be an issue with a vendor's WSDL, or XML::Compile,
or equally likely my own use if XML::Compile::SOAP.

When calling an operation which has no parameters, in what I think
should be SOAP RPC Literal mode, the wrapper element inside the Body
is not there in the request, so the server complains that "Empty
SOAP body with no child element not supported for RPC".

The WSDL has:

<operation name='getSystemInfo'>
  <input message='tns:ProteusAPI_getSystemInfo'></input>
  <output message='tns:ProteusAPI_getSystemInfoResponse'></output>
</operation>

<message name='ProteusAPI_getSystemInfo'></message>
<message name='ProteusAPI_getSystemInfoResponse'>
  <part name='return' type='xsd:string'></part>
</message>

<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getSystemInfo'>
  <soap:operation soapAction=''/>
  <input>
  <soap:body namespace='http://api.proteus.bluecatnetworks.com'
use='literal'/>
  </input>
  <output>
  <soap:body namespace='http://api.proteus.bluecatnetworks.com'
use='literal'/>
  </output>
</operation>
</binding>

And I'm calling the operation like so:

my $info = $wsdl->compileClient(operation => 'getSystemInfo');
$info->();

And XML::Compile::SOAP generates the following request content:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://api.proteus.bluecatnetworks.com"><SOAP-ENV:Body/></SOAP-ENV:Envelope>

As you can see - an empty Body. I would have expected an inner
wrapper element as per SOAP RPC, and I suspect that is what the
[JBoss] server is barfing at.

Any ideas where I'm going wrong?

regards,
oliver.
- -- 
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwY0XQACgkQ2NPq7pwWBt6yNQCg55J+OE/eXcPDTO7E93+WYHt0
VGkAoPPgeYThy3RCos/HLiDo9LAl3Mwv
=sdMg
-----END PGP SIGNATURE-----



More information about the Xml-compile mailing list