axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <as...@cs.indiana.edu>
Subject Re: [Axis2] Using XMLBeans with OM
Date Thu, 10 Mar 2005 17:48:53 GMT
so why not to change code in AXIS2 OM to read from wherever stax curosr 
(reader) is positioned?

alek

Dasarath Weeratunge wrote:

>FYI:
>
>The way XMLStreamReader is implemented in OM and
>XMLBeans is different. When you call
>newXMLStreamReader on an XMLBeans generated class, the
>returned reader is positioned on the element: if u
>call next u get the local name. However, when you call
>getPullParser on an OMElement you must call next once
>before you can call getName. So at present the
>following code won't work.
>
>public void submitPurchaseOrder(PurchaseOrderDocument
>doc) throws Exception {
>		SOAPEnvelope env = factory.getDefaultEnvelope();
>		StAXOMBuilder builder = new
>StAXOMBuilder(doc.newXMLStreamReader(),	true);
>	
>env.getBody().addChild(builder.getDocumentElement());
>	
>
>Due to the same reason the following is also not
>possible:
>
>public OMElement submitPurchaseOrderWrapper(OMElement
>e){
>		try {
>		
>submitPurchaseOrder(PurchaseOrderDocument.Factory.parse(e.newXMLStreamReader(true)));
>	
>
>--Dasarath
>
>
>
>		
>__________________________________ 
>Do you Yahoo!? 
>Yahoo! Small Business - Try our new resources site!
>http://smallbusiness.yahoo.com/resources/ 
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay


Mime
View raw message