On Tue, Oct 6, 2009 at 7:27 PM, mule_user <[email protected]> wrote: > > Please advise what are my choices for the situation below: > > I receive XML as the input. I have no need (nor, have any intention) of > creating any Java object out of the incoming XML. Could you please explain > how can the incoming XML be consumed using using Axis 2? I may want to > apply > XSLT on the XML. But I have no need (nor have any desire) to create any > Java > object. > > Following are my questions: > 1. What do I have to do to just consume the incoming XML? Please explain > the > steps needed for doing so using Axis2. In other words, I have no need (nor > any desire) to convert the XML into a corresponding Java object. I just > want > to process the XML object as it comes. I may run XSLT on the incoming XML. > I > just want to consume that XML without going through the overhead of > creating > additional Java objects. > > 2. Or, do I still have to execute wsdl2Java and use the generated > client/stub Java classes for processing the XML? >
Have a look at here to understand how you can write a custom message receiver[1]. At your message receiver you can get the xmlstream without building the message using this method inMessage.getEnvelope().getBody().getFirstElement().getXMLStreamReaderWithoutCaching() thanks, Amila. [1] http://wso2.org/library/articles/extending-axis2 > > > -- > View this message in context: > http://www.nabble.com/Consume-XML-using-Axis2-without-creating-Java-objects-tp25769238p25769238.html > Sent from the Axis - User mailing list archive at Nabble.com. > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
