users@jax-rpc.java.net

Re: Order of tags in a Doc/Literal web service matters

From: Andrew Harbick <aharbick_at_aharbick.com>
Date: Thu, 14 Apr 2005 15:03:35 -0700

I'm pretty sure that I've run into this with SOAP::Lite as well...
That is SOAP::Lite reorders the elements of a sequence datatype and
JWSDP barfs. Work around was to manually encode the data type using
the lower-level SOAP::Data. At least that was the case with 0.55.

Andy

On Apr 14, 2005, at 9:46 AM, Ryan Champlin wrote:

> ok I see what you're saying. The WSDL file has the types defined and
> the sequence they are supposed to be in.
>
> It is a problem with the python tool kit. I'm trying to figure out
> the reordering right now.
> We have a .Net version of this webservice and it works fine even when
> reordering the parameters. So .Net must simply look for the tag names
> when deserializing if they are out of order.
>
> So yes, in theory the SOAP document being sent out by the python
> toolkit is in violation of the WSDL schema defined.
>
> The element order I was referring to was within the "wrapper" element
> or as you mentioned the first element within SOAP Body.
>
> Thanks,
> Ryan
> -----Original Message-----
> From: Kevin Jones [mailto:kevinj_at_develop.com]
> Sent: Thursday, April 14, 2005 11:38 AM
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: Order of tags in a Doc/Literal web service matters
>
>
> When you say the tags you mean the nested elements within the Body (or
> within the first child of soap:Body), if so then yes, order does
> matter. The
> 'literal' in document/literal essentially means follow the schema. Some
> toolkits (I know Axis does this) will make a best guess as to what is
> meant
> if the elements appear out of order, but many toolkits (as you've
> discovered) do not. Essentially JWSDP is validating the input against
> the
> schema (I don't believe it's doing XML validation as such, but it
> expects to
> receive the elements in the order specified in the schema), I don't
> know
> that there's any way to disable this, and there's no compunction on
> the part
> of JWSDP to have to accept invalid input.
>
> IMO this is a bug in the python implementation. Do you know why it is
> re-ordering the elements, or what rules it is using to do the
> re-ordering
> (alpha-numeric order for example)?
>
>
> Kevin Jones
> http://kevinj.develop.com/weblog
>
>
>
>
>
> ________________________________
>
> From: Ryan Champlin [mailto:ryan.champlin_at_firstlogic.com]
> Sent: 14 April 2005 17:04
> To: users_at_jax-rpc.dev.java.net
> Subject: Order of tags in a Doc/Literal web service matters
>
>
>
> All,
>
> We've created a web service using JAX-RPC. I've built the service
> as a document/literal web service.
>
> I'm also using a Python Soap Tool kit as my client called SOAPpy
> from sourceforge. However, this toolkit is rearranging the XML tags
> for the
> method parameters
>
> during the request. It seems that the order of them does matter. I
> assumed that with a doc/literal service the order wouldn't matter.
> However,
> it works fine if I send them in the appropriate order. I get a JAX-RPC
> deserialization error otherwise.
>
> Is there something in the spec that says they need to be in the
> correct order in the SOAP document? I'm working on finding a python
> solution that will not reorder them but I was curious as to how the
> JAX-RPC
> deserializers should be handling this.
>
> Thanks,
> Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>