Title: RE: Help needed in writing a deserializer

Well, please don't go by the simplicity of this example. I have some constraints in the real application where I cannot make my classes beans (with a default constructor and getters and setters for all members). So I want to make this simple custom deserializer work and than tackle the harder things.

Thanks.
Naresh

-----Original Message-----
From: Michael K. Dean [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 1:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Help needed in writing a deserializer



Base on what you said I see no reason to write a custom deserializer at all
just type map both TransactionId and AccountNumber and let BeanSerializer
do the work for you.

Michael


                                                                                                                                             

                    Naresh Bhatia                                                                                                            

                    <NBhatia@sapi        To:     "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>                                     

                    ent.com>             cc:                                                                                                 

                                         Subject:     Help needed in writing a deserializer                                                  

                    06/30/2002                                                                                                               

                    11:44 PM                                                                                                                 

                    Please                                                                                                                   

                    respond to                                                                                                               

                    axis-user                                                                                                                

                                                                                                                                             

                                                                                                                                             




I need some help in writing a custom deserializer. I have seen several
examples in Axis code, but I am missing the big picture. I am trying to
deserialize the class shown below:


public class TransactionId {
    protected AccountNumber accountNumber = 0;
    protected int version = 0;


    public TransactionId() {}


    public TransactionId(AccountNumber accountNumber, int version) {
        this.accountNumber = accountNumber;
        this.version = version ;
    }
    ... setter and getters ...
}


AccountNumber is a simple wrapper on a Java int, but it comes as an xsd:int
over SOAP.


1) Which DeserializerImpl method should I override to grab this xsd:int and
convert it to an AccountNumber?


2) If the default constructor and the setters were taken away, I would have
to construct the TransactionId object after I have grabbed both the
members. How can I do this?


Thanks.


Naresh Bhatia






Reply via email to