Multiple output parameters in SOAP

Hi all,

Apologies for the cross-posting to the Rails mailing list - I looked
deeper
into Action Web Service and realized it probably isn’t going to do what
I
want.

I’m trying to use soap4r to write a web service server that will return
multiple output parameters - something like the following:

<?xml version="1.0" encoding="UTF-8" ?> 0 Success

This form is mentioned briefly in the W3C SOAP spec
SOAP Version 1.2 Part 0: Primer (Second Edition) and again at
http://www.w3.org/TR/soap12-part0/#Example5. I wish I could use a
struct or
array to wrap these responses, but I’m re-writing an existing web
service,
and the existing clients won’t be able to interpret this:

<?xml version="1.0" encoding="UTF-8" ?> Success 0

The extra tag, representing an instance of a ReturnStatus
struct,
is getting in the way. The problem seems to be that since Ruby
functions
always return one value (possibly an object with attributes) the soap4r
implementation always sets that object as the only child of the web
service
response tag. Is there a way to define a mapping that will leave an
element
out, but encode its children? Or some other way to return multiple
un-wrapped values?

Thanks in advance for your help.

Jacob Maine

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

Hi,

Sorry for late reply. I don’t know AWS so you may need to investigate
AWS thing more…

Jacob Maine wrote:

It can be a document/literal service. You really want to do rpc/encoded
service + output parameter?

The extra tag, representing an instance of a ReturnStatus struct,
is getting in the way. The problem seems to be that since Ruby functions
always return one value (possibly an object with attributes) the soap4r
implementation always sets that object as the only child of the web service
response tag. Is there a way to define a mapping that will leave an element
out, but encode its children? Or some other way to return multiple
un-wrapped values?

Here is the WSDL I know that uses rpc/encoded + output parameter.
http://api.map-and-go.com/3.3/server?wsdl
(It’s not mine and it’s just an example WSDL for this case I know.
Please do not contact to the owner about this.)

Run wsdl2ruby.rb against the WSDL and see mms_MizGIS.rb how you can
define a service with output parameter.

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRNbDbh9L2jg5EEGlAQLzYgf+P97UePa58q+wT54Vq8e3P/CV4SQmWlCp
MPHFVYYN1P3aNkxGqXjpGNS5Q8WL4LmxtoGBQYOwt5VKsiZVISenmi9ayFFGwORZ
tMLKIqN/dWjTmshZ7kQ3FGMj8hI2QPWCik05/50J5ffGu/G8HZBErn/Jl4K0mFKz
4bHaYLNc6aAZBhjTnMyqBOMZLPNuwacOv7CQ0rAWWb3XInPqrg9lVOmFS7/EWaG/
QHAwqsa6kZr3RwQ8IQ1vOU08naYaMBGmCGxx3kqB9CPz4YAQvscQDpuF4SY0F3vJ
Ci5iTTHFIjRERu8zHrXSkxhV51dFEb3jtFHdWh7ghkqoCnonoxzD9w==
=XHgz
-----END PGP SIGNATURE-----