You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by R J Scheuerle Jr <sc...@us.ibm.com> on 2002/10/05 00:07:51 UTC

rpc/literal support in explicitHeaderWork branch

I just added better rpc/literal support to the explicitHeaderWork branch.

Please review my latest commit.

Problem: The runtime uses the available Style information (Style.DOCUMENT,
Style.RPC, Style.WRAPPED)
to determine how to serialize/deserialize the message.  And in some cases
it uses this information incorrectly.  For
example SerializationContextImpl assumes that Style.RPC means
use=encoded....which is definitely wrong
for rpc/literal.

Solution: I determined that the best approach was to introduce a Use
enumeration (Use.LITERAL and Use.ENCODED).
I examined all of the code that referenced the Style information and added
appropriate changes for Use information.

So for example the SerializationContextImpl now uses Use.LITERAL
information to turn off multi-ref processing.

Note that the wsdd service now has a "use" attribute that can have the
values "literal" or "encoded".  The
default is use="literal" if style="document" and use="encoded" if
style="rpc".  The WSDL2Java emitter
generates the appropriate setting when it generates the deploy.wsdd file.

Another visible change is the addition of the setOperationUse(..) and
getOperationUse() public methods on the
Call object.  (These are similar to the existing setOperationStyle(..) and
getOperationStyle() methods.)  These
methods are necessary so the stub can generate setOperationStyle("rpc")
setOperationUse("literal") for rpc/literal.
The methods are also available for DII usage.

In addition, I upgraded the WSDL2Java code to use the Style/Use
enumerations (instead of constant ints).
This makes the emitter consistent with the runtime.

Action:

In my opinion, these changes are straight-forward and live nicely with the
existing Style code.
They also make the runtime a little more self-documenting.

After Russell and I finish up the SOAP Header support, we will be calling
for a VOTE on this branch.
I wanted to give everyone a HEADS UP on some of the changes.

Thanks,

Rich Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115  (IBM TL 678-5115)