I don't think I am going to dive too deep into the operation of the SerializationContext.  Only when and why serialize and startElement get called.  I'll probably have a draft late next week some time.  I'll announce it here.
 
Cheers
Steve Maring

Arijith Roy <[EMAIL PROTECTED]> wrote:
Hi Steve,
 
Looks like you have done a lot of work with those debug statements. Could you help me a bit by publishig your findings. I am going through that pain right now and woud appreciate a few pointers in placing the debug statements in the right order .
Thanks.

Steve Maring <[EMAIL PROTECTED]> wrote:
Hi Cory,
 
"yes you can"  I have a DOCUMENT/LITERAL service whereby the top level element of the soap body represents either a request or response to my method and my parameters are based on external XSD and JavaBeans that I want Castor to marshal.  You could easily plug in any marshaller as a custom serializer.  I'm about to write a white paper on custom serializers in Axis for ubiquitous data typing across the enterprise.  Here are some of the highlights of my "Hello World" below.  Feel free to ask me questions, after inserting a couple hundred log.debug statements in the Axis serialization and type mapping code, I think I have a pretty firm grasp of how it works.  I was actually making it more difficult than it really is.
 
from my wsdl:
 
<wsdl:types>
    
  <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dto.maring.org">
     
   <complexType name="B">
    <sequence>
     <element name="myString" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  
   <element name="a" type="tns1:A"/>
   <complexType name="A">
    <sequence>
     <element name="b" nillable="true" type="tns1:B"/>
    </sequence>
   </complexType>
  
  </schema>
 
  <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ws.maring.org">
      
   <element name="in0" type="impl:In0"/>
   <complexType name="In0">
       <sequence>
           <element ref="tns1:a"/>
       </sequence>
   </complexType>
   <element name="getMessageReturn" type="xsd:string"/>
  
  </schema>
 
 </wsdl:types>
 
then in my WSDD:
 
      <typeMapping
        xmlns:ns="http://dto.maring.org"
        qname="ns:B"
        type="java:org.maring.dto.B"
        serializer="org.maring.ser.CastorSerializerFactory"
        deserializer="org.maring.ser.CastorDeserializerFactory"
        encodingStyle=""
      />
      <typeMapping
        xmlns:ns="http://dto.maring.org"
        qname="ns:A"
        type="java:org.maring.dto.A"
        serializer="org.maring.ser.CastorSerializerFactory"
        deserializer="org.maring.ser.CastorDeserializerFactory"
        encodingStyle=""
      />
      <typeMapping
        xmlns:ns="http://ws.maring.org"
        qname="ns:In0"
        type="java:org.maring.ws.In0"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
 
 
I'm attached my sample "Hello World" project (w/o libs) for further explanation.  Take special note of the Castor serializers in src/org/maring/ser
 
Cheers.
Steve Maring
 


Cory Wilkerson <[EMAIL PROTECTED]> wrote:
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 can't".

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 I've defined the following:







class Foo {
private String fName
private String lName
private Calendar dateOfBirth

public get/setFName
public get/setLName
public get/setDateOfBirth
}

Thanks yet again!
Cory


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

> ATTACHMENT part 2 application/x-zip-compressed name=WSTest.zip


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to