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 <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>
</xsd:complexType>

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!
Cory

Reply via email to