Re: wsdl message part: element or type or both? (error)

From: Anne Thomas Manes <anne_at_MANES.NET>
Date: Fri, 28 Mar 2003 09:13:21 -0500

When using document/literal, you literally define the structure of the
message using schema, therefore you must provide an element definition. You
can validate the resulting SOAP message using the schema definition.

When using rpc/encoded, you use a set of encoding rules (SOAP encoding) to
construct the message based on abstract type descriptions, therefore you
must provide a type definition. You don't provide an actual schema
definition of the message, so you can't validate the resulting SOAP message.
When working with simple types, there's really not much difference between
the two structures. The encoding system is helpful if you are trying to pass
a complex object graph. For example, the encoding system can replace an
element of type string with a reference to an element of type string. (If
you did this with literal, you would break validation)


> -----Original Message-----
> From: Public discussion on JAX-RPC
> [mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]On Behalf Of Pedro Salazar
> Sent: Friday, March 28, 2003 8:58 AM
> Subject: Re: wsdl message part: element or type or both? (error)
> Hi Anne,
> On Fri, 2003-03-28 at 12:51, Anne Thomas Manes wrote:
> > You must use type= with rpc/encoded and element= with doc/literal.
> Indeed, you're right! I saw the reference in wsdl/jaxrpc specifications.
> However, I didn't understood well what the difference beyond the idea
> that the doc/literal permits the element or type references, and the
> rpc/encoded only references to abstract types.
> Could you explain me better the differences in concrete, maybe through a
> SOAP sample, I don't know? I mean, the 2 different approaches affects
> the SOAP message format, and is not just a form of definition of
> messages in WSDL document, or is it?
> thanks,
> Pedro Salazar.
> --
> PS
> PGP:0E129E31D803BC61