Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 78811 invoked from network); 10 Mar 2005 17:49:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Mar 2005 17:49:02 -0000 Received: (qmail 23421 invoked by uid 500); 10 Mar 2005 17:48:59 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 23386 invoked by uid 500); 10 Mar 2005 17:48:59 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 23373 invoked by uid 99); 10 Mar 2005 17:48:59 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from whale.cs.indiana.edu (HELO whale.cs.indiana.edu) (129.79.246.27) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Mar 2005 09:48:59 -0800 Received: from [127.0.0.1] (rainier.extreme.indiana.edu [129.79.246.105]) by whale.cs.indiana.edu (8.12.11/8.12.11/IUCS_2.65) with ESMTP id j2AHmtsG019152; Thu, 10 Mar 2005 12:48:56 -0500 (EST) Message-ID: <42308885.8060805@cs.indiana.edu> Date: Thu, 10 Mar 2005 12:48:53 -0500 From: Aleksander Slominski User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-dev@ws.apache.org Subject: Re: [Axis2] Using XMLBeans with OM References: <20050310110034.94799.qmail@web11606.mail.yahoo.com> In-Reply-To: <20050310110034.94799.qmail@web11606.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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