axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <>
Subject RE: castor & axis & marshalling
Date Fri, 15 Aug 2003 03:51:57 GMT
Hi Dennis,

JiBX is definitely on my list of todos. If it can indeed eliminate the
need to manually write MessageReader and MessageWriter implementations,
it will certainly make the use of SMFW much easier.

You are correct about the double conversion in each direction, but that
was the quickest solution I could come up with without writing my own
SOAP toolkit :-). Performance hasn't been much of a problem in my
applications, but that is of course application specific. What I really
like about the approach is the freedom to use the best data structures
for the job. So I am sticking with it until I see something better!


-----Original Message-----
From: Dennis Sosnoski [] 
Sent: Thursday, August 14, 2003 9:42 PM
Subject: Re: castor & axis & marshalling

Hi Naresh,

Considering you're using an XMLPull parser for deserializing objects, 
you might want to look at using JiBX ( in 
combination with your framework. JiBX provides high-performance data 
binding using an XMLPull parser for unmarshalling. This should eliminate

the need for users to write their own MessageReader and MessageWriter 
implementations in your framework (they'd need a binding definition, but

that's generally a lot simpler to write and maintain than the actual

An ideal solution for message style would couple a data binding 
framework with the SOAP framework so that there are no added conversions

to and from text. I think that's what's planned for the integration 
between JAX-RPC and JAXB coming down the line. I gather that both SMFW 
and the current Castor binding support actually go through multiple 
conversions to and from text (since AFAIK Axis always parses everything 
going in both directions, before converting back to text), which is 
going to really hurt performance.

  - Dennis

Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support -
JiBX Lead Developer - Redmond, WA  425.885.7197

Naresh Bhatia wrote:

>Theoretically, the answer to your question is yes. But practically when

>I tried this in the past, Castor mapping approach could not handle the 
>complexities of my data structures. So I use an XML Pull parser to 
>serialize / deserialize my business objects. You can look at my 
>detailed implementation at It is open 
>source - feel free to use it in your projects.
>-----Original Message-----
>From: Cory Wilkerson []
>Sent: Thursday, August 14, 2003 5:01 PM
>Subject: castor & axis & marshalling
>As a follow up to Anne's post, dated 08/04 11:20:28 -- specifically: 
>"Castor performs translations from xsd types to Java objects."  For 
>those of you familiar enough with Castor -- I've a question.
>Just a disclaimer -- sorry for the Castor slant here -- I'm just 
>looking for someone to say, "yes you can accomplish this" or "no, you 
>Let's suppose I implement my service as a message style service and I'm

>handed the soap envelope by Axis.  Also, let's assume I have a set of 
>classes in my domain that I'd like to flesh out with the data 
>represented in the soap body.  My question is whether or not I can use 
>Castor to marshall/unmarshall this data for me given a mapping file or 
>do I have to rely on Castor generated classes/marshalling framework to 
>handle this?  For example, if in my <types> I've defined the following:
><xsd:complexType name="Person">
>	<xsd:sequence>
>		<xsd:element name="firstName" type="xsd:string"/>
>		<xsd:element name="lastName" type="xsd:string"/>
>		<xsd:element name="birthDate" type="xsd:date/>
>	</xsd:sequence>
>And someone invokes my services and passes me type "Person" -- is there

>a convenient way via Castor to map it into object type Foo?
>class Foo {
>	private String fName
>	private String lName
>	private Calendar dateOfBirth
>	public get/setFName
>	public get/setLName
>	public get/setDateOfBirth
>Thanks yet again!

View raw message