axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sharon Whipple <sharon...@hotmail.com>
Subject axis1 code on axis2
Date Fri, 18 May 2007 21:12:14 GMT

i have the next serializetion code from axis1
will it work on axis2?

is there any other way to pass / serialize Objects ?
Thank you
Sharon



    public Object deserialize(SOAPElement ele) {
        String str = "";
        for( Iterator i = ele.getChildElements(); i.hasNext();) {
            Object obj = i.next();
            if( obj instanceof Text ) {
                str += ( ((Text)obj).getValue() );
            }
        }
    return new MyDate(str);
    }
    /**
    * The qname parameter must be used to create the top level element.
    */
   public SOAPElement serialize(QName qname, Object obj) {
        SOAPElement xml = null;
        try {
            xml = soapFactory.createElement(
            qname.getLocalPart(),
            qname.getPrefix(),
            qname.getNamespaceURI());
            xml.addTextNode( ((MyDate)obj).getString() );
        } catch (SOAPException e) {
            e.printStackTrace();
        }
        return xml;
    }
-- 
View this message in context: http://www.nabble.com/axis1-code-on-axis2-tf3780170.html#a10690433
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message