You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martin Gainty <mg...@hotmail.com> on 2007/05/01 03:22:38 UTC

Re: newbie help - how to build up an ADBBean?

Hi Bob
I would look at the ADBBeanInOut test case more specifically:
\src\modules\adb-codegen\test\org\apache\axis2\schema\populate\other\ADBInOutTest.java

//here is the example xmlString
    private String xmlString = "<tempElt xmlns=\"http://soapinterop.org1/types\">" +
            "hello" +
            "</tempElt>";

//read the XML formatted String
XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new ByteArrayInputStream(xmlString.getBytes()));

//this will acquire the SOAPEnvelope
SOAPEnvelope defaultEnvelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();

//this will acquire the OMElement
OMElement documentElement = new StAXOMBuilder(reader).getDocumentElement();

These adb-codegen Test harnesses have everything you need to get started

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: no spam 
  To: axis-user@ws.apache.org 
  Sent: Monday, April 30, 2007 5:51 PM
  Subject: Re: newbie help - how to build up an ADBBean?


  thank you and I did read that, but it gives me no idea at all how to get the ADBBean from the OMElement (or whatever).  ADB javadocs, which I've also looked at, seem completely disconnected from everything else.

  Bob

  ----- Original Message ----
  From: Davanum Srinivas <da...@gmail.com>
  To: axis-user@ws.apache.org
  Sent: Monday, April 30, 2007 1:26:28 PM
  Subject: Re: newbie help - how to build up an ADBBean?


  see the OM tutorial - http://ws.apache.org/commons/axiom/OMTutorial.html


  On 4/30/07, no spam <pe...@yahoo.com> wrote:
  >
  >
  > I've generated some ADB code from Microsoft SharePoint WSDL, using the ADB
  > bindings.  Can someone give me some basic orientation?  Here are relevant
  > details:
  >
  > a schema fragment (useless, imho) from the wsdl is is:
  >
  >       <s:element name="GetListItemsResponse">
  >         <s:complexType>
  >           <s:sequence>
  >             <s:element minOccurs="0" maxOccurs="1"
  > name="GetListItemsResult">
  >               <s:complexType mixed="true">
  >                 <s:sequence>
  >                   <s:any />
  >                 </s:sequence>
  >               </s:complexType>
  >             </s:element>
  >           </s:sequence>
  >         </s:complexType>
  >       </s:element>
  >
  > there is a setViewFields() call which I'd like to make.  It takes a
  > ViewFields_type14, which also tells me nothing:
  >
  >         public static class ViewFields_type14
  >         implements org.apache.axis2.databinding.ADBBean{
  >         /* This type was generated from the piece of schema that had
  >                 name = viewFields_type14
  >                 Namespace URI =
  > http://schemas.microsoft.com/sharepoint/soap/
  >                 Namespace Prefix = ns1
  >                 */
  >                         /**
  >                         * field for ExtraElement
  >                         */
  >                         protected org.apache.axiom.om.OMElement
  > localExtraElement ;
  >                            /**
  >                            * Auto generated getter method
  >                            * @return org.apache.axiom.om.OMElement
  >                            */
  >                            public  org.apache.axiom.om.OMElement
  > getExtraElement(){
  >                                return localExtraElement;
  >                            }
  >                             /**
  >                                * Auto generated setter method
  >                                * @param param ExtraElement
  >                                */
  >                                public void
  > setExtraElement(org.apache.axiom.om.OMElement param){
  >
  > this.localExtraElement=param;
  >                                }
  >
  >
  > the ADBBean interface also has nothing in it but a getPullParser() method.
  > So how can I build up a ViewFields_type14 such that the Java compiler will
  > be happy?  I've spent at least an hour poring over the ADB documentation and
  > so far extracted nothing actionable.  How about a code sample?
  >
  > Bob
  >
  >
  >  ________________________________
  > Ahhh...imagining that irresistible "new car" smell?
  >  Check out new cars at Yahoo! Autos.
  >  ________________________________
  > Ahhh...imagining that irresistible "new car" smell?
  >  Check out new cars at Yahoo! Autos.


  -- 
  Davanum Srinivas :: http://davanum.wordpress.com

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






------------------------------------------------------------------------------
  Ahhh...imagining that irresistible "new car" smell?
  Check out new cars at Yahoo! Autos.