It will be available in both stub and skeleton classes.
In my case inside the stub, the internal class "Factory" has "parse" method. /** * Factory class that keeps the parse method */ public static class Factory { /** * static method to create the object Precondition: If this object * is an element, the current or next start element starts this * object and any intervening reader events are ignorable If this * object is not an element, it is a complex type and the reader is * at the event just after the outer start element Postcondition: If * this object is an element, the reader is positioned at its end * element If this object is a complex type, the reader is * positioned at the end element of its outer element */ public static IsDataValidResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { } ________________________________ From: Shaoguang Cong [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 9:40 PM To: axis-user@ws.apache.org Subject: Re: Apache Axis 2: how to get header? Options In the generated Stub class, do a search for the method "fromOM" - you'll get the idea on how to get your UserInfo object from the OMElement (getHeader().getFirstChildWithName(QName of "UserInfo") ). craig wickesser <[EMAIL PROTECTED]> wrote: so far I haven't found the "parse" method. On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: which class should have parse method? On 4/23/07, Davanum Srinivas <[EMAIL PROTECTED] > wrote: look for parse method in those classes. The parse method takes in a XMLStreamReader. If you see it it means you are using ADB based code. Next step is to use the AXIOM API to get the OMElement corresponding to your UserInfo element in the soap header. basically call getChildren on the header and iterate till you find UserInfo. When you get that OMElement, call getXMLStreamReader() and pass that to the parse method of your class -- dims On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: > there is UserInfoImpl and UserInfoDocumentImpl. > > > > On 4/23/07, craig wickesser <[EMAIL PROTECTED]> wrote: > > yes > > > > > > > > On 4/23/07, Davanum Srinivas < [EMAIL PROTECTED] > wrote: > > > Was this UserInfo class generated by WSDL2Java/ADB? > > > > > > -- dims > > > > > > On 4/23/07, craig wickesser < [EMAIL PROTECTED]> wrote: > > > > Ok, I put code into my Stub class so I could get the > _returnMessageContext. > > > > Now that I have access to the > > > > org.apache.axiom.soap.SOAPHeader it gives me the XML, > is > > > > there a way to get the actual JavaBean objects based on the header(s)? > For > > > > example if my header looks like... > > > > > > > > <soap12:Header> > > > > <ErrorResponse ....> > > > > </ErrorResponse> > > > > <UserInfo ...> > > > > <Id>string</Id> > > > > <DOB>string</DOB> > > > > </UserInfo> > > > > </soap12:Header> > > > > > > > > I have a UserInfo class which I would like to have populated with the > > > > information from the XML....is there a way for this to happen > automatically > > > > or do I have to write my own XML Parser to parse the header XML? > > > > > > > > Thanks! > > > > > > > > > > > > > -- > > > Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services > Developers > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ________________________________ Ahhh...imagining that irresistible "new car" smell? Check out new cars at Yahoo! Autos. <http://us.rd.yahoo.com/evt=48245/*http:/autos.yahoo.com/new_cars.html;_ ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM- > DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. -----------------------------------------------------------------------------------------------------------------------