cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: SOAP encoded support
Date Tue, 11 Dec 2007 04:50:45 GMT
Dain Sundstrom wrote:
> A couple of weeks ago I integrated CXF into OpenEJB for JaxWS support, 
> and it went so well that it got me thinking that it would be great to 
> use CXF for JaxRPC support as well.  When I met Dan Kulp at ApacheCon, 
> I mentioned this idea and he figured the biggest road block for 
> implementing JaxRPC is supporting RPC/Encoded.  So, last weekend I had 
> some free time and decided to try to hack SOAP encoded support into 
> CXF, and to my surprise it wasn't to difficult add Aegis Types to 
> support the SOAP strut and reference classes.
>
> SOAP encoded struct support is provided by the StructType subclass of 
> BeanType.  I did have to extract a few methods from the writeObject 
> method to hook element writing.  I also had to make a couple of 
> methods more public.
>
> As for how it works, the best place to start is the StructTypeTest.  
> Basically, read and write follow the same pattern:
>
>   1) read/write message parts with the SoapRefType
>   2) read/write trailing serialized blocks with TrailingBlocks
>
> As each object is read we check if it contains a SOAP id attribute, 
> and if it does we register it with the SoapRefRegistry in the 
> context.  If an element contains a SOAP ref attribute we register a 
> ref that is "set" when the reference is resolved (which my be 
> immediately or later).
>
> When writing, every complex object is given a SOAP id and every 
> reference to another complex object is written as a reference.  The 
> actual referenced object registered with the MarshalRegistry in the 
> context and is written by the TrailingBlocks class.
>
> I've attached my patch to 
> (https://issues.apache.org/jira/browse/CXF-1281). Next, I'm going to 
> write Type class for SOAP encoded arrays.
>
> WDYT?
>
> -dain
Cool. I only skimmed the patch, but I think such a feature would be 
quite welcome. The way you're going about it is exactly the way I'd do 
do it - i.e. using Aegis. It was developed with soap encoding somewhat 
in mind, so I'm glad to hear it wasn't too hard to add some basic support.

The critical issue is of course interop. An avenue worth exploring might 
be to set up a series of unit tests which made CXF/Axis 1.x talk to each 
other.

Thats about all the intelligent things I have to say on the issue. I 
will apologize for the parts of aegis that have become a complete mess. 
It needs a little cleanup and could stand to support XML schema a bit 
better too. I heartily encourage you to continue your efforts though and 
I think I'd probably welcome such patches into the code base.

- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Mime
View raw message