|
From: Paul P. <pa...@Ac...> - 2001-09-05 01:30:42
|
Rich Salz wrote:
>
> ...
>
> Somewhat flip answer: without external schema information you don't know
> that the order matters. If you do know that the order matters, then do
> it Right (sic :) and use typecodes.
I'm just trying to make the entry point for SOAP as simple as possible.
I got thinking about this because other languages can do multi-arg
functions without a problem but ZSI only does one dictionary argument.
> Real answer: SOAP encoding says that within a struct order does not
> matter, only names. So if there's an implementation that is using
> gensym'd names (I use id() myself) and requiring its recipients to know
> the order, that implementation is wrong.
The SOAP spec say: "Each [in] or [in/out] parameter is viewed as an
accessor, with a name corresponding to the name of the parameter and
type corresponding to the type of the parameter. These appear in the
same order as in the method signature."
In other words order matters for RPC parameters!
$server = SOAP::Lite
->uri($ns)
-> proxy($server_url);
print $server-> f2c(70, 90)
-> result;
<?xml version="1.0" encoding="UTF-8"?>
SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
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>
<f2c><c-gensym3 xsi:type="xsd:int">70</c-gensym3>
<c-gensym5 xsi:type="xsd:int">90</c-gensym5></f2c>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
--
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook
|