WSDL style (rpc vs document) has no impact on whether or not you can
map multiple binding ports to a single URL. That's more likely to be a
function of your SOAP engine rather than the design of your service.
There are a number of differences between the way you define an
rpc/lit WSDL versus a doc/lit WSDL, but "wrapped" doc/lit and rpc/lit
look almost identical on the wire. You may see differences in
namespaces and in the response element name. In doc/lit, the schema
explicitly specifies the name of the response element and what
namespaces must be used for the top-level element and all local
elements. In rpc/lit, the top-level element within the <soap:Body> is
in the namespace specified by the namespace attribute in the
<wsdlsoap:body> definition in the <wsdl:binding>, and the parameter
elements are never namespace qualified. Also, in rpc/lit the SOAP
engine autogenerates the name of the response element, and its name is
not significant.
When using doc/lit, you define the full schema of the message payload
by defining the <xsd:element> structure of the contents of the
<soap:Body>. There can be at most one top-level element within the
<soap:Body>, therefore this element must contain all message
parameters. The <wsdl:message> definition must specify at most one
body part (although it may contain additional header or fault parts),
and that body part must reference the <xsd:element> definition. For
example, for an operation "foobar" with two input parameters "foo" and
"bar", the <wsdl:message> definition would look like this:
<wsdl:message name="foobarRequest">
<wsdl:part name="body" element="ns1:foobar"/>
</wsdl:message>
And the ns1:foobar element definition would look something like this:
<xsd:element name="foobar">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="foo" type="xsd:string"/>
<xsd:element name="bar" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
When using wrapped doc/lit, the top-level element name must be the
same as the operation name (in this case, "foobar"). When using
unwrapped doc/lit, the top-level element may have any name -- but you
still must define all input information as local elements within the
top-level element.
When using rpc/lit, you do not define the full schema of the message
payload. Instead you only define the types of your input parameters.
At runtime, the SOAP engine autogenerates the message element
structure. As with doc/lit, the <soap:Body> may contain at most one
top-level element, but in this case, the SOAP engine generates this
element. It uses the operation name for the element's local name, and
it gets the namespace from the namespace attribute in the
<wsdlsoap:body> definition. The SOAP engine also generates elements
for each parameter type. These elements as unqualified, and the local
name comes from the name attribute in the <wsdl:part> definition.
In rpc/lit, the <wsdl:message> definition specifies one body part for
each operation parameter. Each <wsd:part> definition must specify the
name of the parameter and the parameter type. If the parameter type is
a complexType, then the type must be defined as a <xsd:complexType> in
the <wsdl:types> section. For the "foobar" example, the <wsdl:message>
definition would look like this:
<wsdl:message name="foobarRequest">
<wsdl:part name="foo" type="xsd:string"/>
<wsdl:part name="bar" type="xsd:string"/>
</wsdl:message>
Anne
On 7/26/05, Mark Hansen <[EMAIL PROTECTED]> wrote:
> Is the only difference between rpc/lit and doc/lit that the rpc/lit
> style wraps the parameters (parts) in the method (operation) name? Is
> the purpose of the rpc/lit style to use the method wrapper as a way to
> implement the WSDL allowed mapping of multiple binding ports to a single
> URL?
>
> Thanks for any clarification,
>
> Mark
>
>