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

From: Kevin Jones <>
Date: Thu, 14 Apr 2005 17:38:08 +0100

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



        From: Ryan Champlin []
        Sent: 14 April 2005 17:04
        Subject: Order of tags in a Doc/Literal web service matters


        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.