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 Anthony Ikeda <am...@yahoo.com.au> on 2006/02/08 01:47:15 UTC

Confusion about Axis2

I've recently been researching on how to use Axis as a
replacement framework for our current web-services (we
have an old in house REST implementation that is
getting a bit outdated) and have found Axis1.3 to be
easy to develop with.

Now that I've noticed Axis2 implements REST services
as well as SOAP, I've been struggling to find a decent
tutorial to work with in developing web services with
Axis2.

In Axis 1.x it was all about wrapping your own
implementation classes (without any translation from
Java to Axis) and let the Locators and Bindings call
your own classes.

I've tried to generate Axis2 skeleton classes based on
our Axis1.3 wsdl descriptors but find all the
Skeletons require me to return
org.apache.axis2.om.OMElement objects.

Question
Do I need to ensure all objects returned by my
business classes translate objects to this OMElement
type or are  there helper classes that do this for me?

I also noticed that none of the POJOs were created
from my wsdl either.

As an example, the apache ws User Guide has the 2
versions of developing with Axis2. Because we already
have existing classes, I was opting for Option 2
(generating from wsdl).

My Skeleton class has a method:
    public org.apache.axis2.om.OMElement
getDocument(org.apache.axis2.om.OMElement param0) {
        return null;
    }

In Axis 1.3 my Impl class just returns the standard
POJO that I've created to encapsulate the data.

Does this mean I now have to convert my POJO to an
OMElement?

Anthony



		
____________________________________________________ 
Do you Yahoo!? 
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database. 
http://au.movies.yahoo.com

Re: Confusion about Axis2

Posted by Davanum Srinivas <da...@gmail.com>.
Use the command line wsdl2java .bat/sh. use "-d xmlbeans" to generate
xmlbeans based java classes or use "-d adb" to generate axis
databinding based classes.

thanks,
dims

On 2/7/06, Anthony Ikeda <am...@yahoo.com.au> wrote:
> Well I'm not sure what to expect.
>
> I'm using the Eclipse CodeGen plugin.
>
> As I said earlier the method signatures for the
> implementation classes are very different between Axis
> 1.3 and Axis 2.
>
> Is there any documentation on actually working with
> the implementation classes in Axis2?
>
> Axis 1.3 (as you may already know) works with your
> POJOs and business classes.
>
> How do I convert my POJO to an OMElement?
>
> Anthony
>
>
> --- Davanum Srinivas <da...@gmail.com> wrote:
>
> > You mean if you run WSDL2Java (from axis2 standard
> > dist) it's not
> > doing what you need?
> >
> > thanks,
> > dims
> >
> > On 2/7/06, Anthony Ikeda <am...@yahoo.com.au>
> > wrote:
> > > I've recently been researching on how to use Axis
> > as a
> > > replacement framework for our current web-services
> > (we
> > > have an old in house REST implementation that is
> > > getting a bit outdated) and have found Axis1.3 to
> > be
> > > easy to develop with.
> > >
> > > Now that I've noticed Axis2 implements REST
> > services
> > > as well as SOAP, I've been struggling to find a
> > decent
> > > tutorial to work with in developing web services
> > with
> > > Axis2.
> > >
> > > In Axis 1.x it was all about wrapping your own
> > > implementation classes (without any translation
> > from
> > > Java to Axis) and let the Locators and Bindings
> > call
> > > your own classes.
> > >
> > > I've tried to generate Axis2 skeleton classes
> > based on
> > > our Axis1.3 wsdl descriptors but find all the
> > > Skeletons require me to return
> > > org.apache.axis2.om.OMElement objects.
> > >
> > > Question
> > > Do I need to ensure all objects returned by my
> > > business classes translate objects to this
> > OMElement
> > > type or are  there helper classes that do this for
> > me?
> > >
> > > I also noticed that none of the POJOs were created
> > > from my wsdl either.
> > >
> > > As an example, the apache ws User Guide has the 2
> > > versions of developing with Axis2. Because we
> > already
> > > have existing classes, I was opting for Option 2
> > > (generating from wsdl).
> > >
> > > My Skeleton class has a method:
> > >     public org.apache.axis2.om.OMElement
> > > getDocument(org.apache.axis2.om.OMElement param0)
> > {
> > >         return null;
> > >     }
> > >
> > > In Axis 1.3 my Impl class just returns the
> > standard
> > > POJO that I've created to encapsulate the data.
> > >
> > > Does this mean I now have to convert my POJO to an
> > > OMElement?
> > >
> > > Anthony
> > >
> > >
> > >
> > >
> > >
> > ____________________________________________________
> > > Do you Yahoo!?
> > > The New Yahoo! Movies: Check out the Latest
> > Trailers, Premiere Photos and full Actor Database.
> > > http://au.movies.yahoo.com
> > >
> >
> >
> > --
> > Davanum Srinivas : http://wso2.com/blogs/
> >
>
>
>
>
> ____________________________________________________
> Do you Yahoo!?
> Yahoo! Music: Vote 'Who's Next' and see your favourite band live
> http://au.music.yahoo.com/artists/whos-next/
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: Confusion about Axis2

Posted by Anthony Ikeda <am...@yahoo.com.au>.
Well I'm not sure what to expect.

I'm using the Eclipse CodeGen plugin.

As I said earlier the method signatures for the
implementation classes are very different between Axis
1.3 and Axis 2.

Is there any documentation on actually working with
the implementation classes in Axis2?

Axis 1.3 (as you may already know) works with your
POJOs and business classes.

How do I convert my POJO to an OMElement?

Anthony


--- Davanum Srinivas <da...@gmail.com> wrote:

> You mean if you run WSDL2Java (from axis2 standard
> dist) it's not
> doing what you need?
> 
> thanks,
> dims
> 
> On 2/7/06, Anthony Ikeda <am...@yahoo.com.au>
> wrote:
> > I've recently been researching on how to use Axis
> as a
> > replacement framework for our current web-services
> (we
> > have an old in house REST implementation that is
> > getting a bit outdated) and have found Axis1.3 to
> be
> > easy to develop with.
> >
> > Now that I've noticed Axis2 implements REST
> services
> > as well as SOAP, I've been struggling to find a
> decent
> > tutorial to work with in developing web services
> with
> > Axis2.
> >
> > In Axis 1.x it was all about wrapping your own
> > implementation classes (without any translation
> from
> > Java to Axis) and let the Locators and Bindings
> call
> > your own classes.
> >
> > I've tried to generate Axis2 skeleton classes
> based on
> > our Axis1.3 wsdl descriptors but find all the
> > Skeletons require me to return
> > org.apache.axis2.om.OMElement objects.
> >
> > Question
> > Do I need to ensure all objects returned by my
> > business classes translate objects to this
> OMElement
> > type or are  there helper classes that do this for
> me?
> >
> > I also noticed that none of the POJOs were created
> > from my wsdl either.
> >
> > As an example, the apache ws User Guide has the 2
> > versions of developing with Axis2. Because we
> already
> > have existing classes, I was opting for Option 2
> > (generating from wsdl).
> >
> > My Skeleton class has a method:
> >     public org.apache.axis2.om.OMElement
> > getDocument(org.apache.axis2.om.OMElement param0)
> {
> >         return null;
> >     }
> >
> > In Axis 1.3 my Impl class just returns the
> standard
> > POJO that I've created to encapsulate the data.
> >
> > Does this mean I now have to convert my POJO to an
> > OMElement?
> >
> > Anthony
> >
> >
> >
> >
> >
> ____________________________________________________
> > Do you Yahoo!?
> > The New Yahoo! Movies: Check out the Latest
> Trailers, Premiere Photos and full Actor Database.
> > http://au.movies.yahoo.com
> >
> 
> 
> --
> Davanum Srinivas : http://wso2.com/blogs/
> 



		
____________________________________________________ 
Do you Yahoo!? 
Yahoo! Music: Vote 'Who's Next' and see your favourite band live 
http://au.music.yahoo.com/artists/whos-next/

Re: Confusion about Axis2

Posted by Davanum Srinivas <da...@gmail.com>.
You mean if you run WSDL2Java (from axis2 standard dist) it's not
doing what you need?

thanks,
dims

On 2/7/06, Anthony Ikeda <am...@yahoo.com.au> wrote:
> I've recently been researching on how to use Axis as a
> replacement framework for our current web-services (we
> have an old in house REST implementation that is
> getting a bit outdated) and have found Axis1.3 to be
> easy to develop with.
>
> Now that I've noticed Axis2 implements REST services
> as well as SOAP, I've been struggling to find a decent
> tutorial to work with in developing web services with
> Axis2.
>
> In Axis 1.x it was all about wrapping your own
> implementation classes (without any translation from
> Java to Axis) and let the Locators and Bindings call
> your own classes.
>
> I've tried to generate Axis2 skeleton classes based on
> our Axis1.3 wsdl descriptors but find all the
> Skeletons require me to return
> org.apache.axis2.om.OMElement objects.
>
> Question
> Do I need to ensure all objects returned by my
> business classes translate objects to this OMElement
> type or are  there helper classes that do this for me?
>
> I also noticed that none of the POJOs were created
> from my wsdl either.
>
> As an example, the apache ws User Guide has the 2
> versions of developing with Axis2. Because we already
> have existing classes, I was opting for Option 2
> (generating from wsdl).
>
> My Skeleton class has a method:
>     public org.apache.axis2.om.OMElement
> getDocument(org.apache.axis2.om.OMElement param0) {
>         return null;
>     }
>
> In Axis 1.3 my Impl class just returns the standard
> POJO that I've created to encapsulate the data.
>
> Does this mean I now have to convert my POJO to an
> OMElement?
>
> Anthony
>
>
>
>
> ____________________________________________________
> Do you Yahoo!?
> The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database.
> http://au.movies.yahoo.com
>


--
Davanum Srinivas : http://wso2.com/blogs/