[long] webservices, moving on from Axis

J

jrobinss

[I don't know if this is the best NG, but it's the one I regularly
read, don't hesitate to correct me]

Hi all,

I'm currently trying to migrate from Axis (aka Axis1) to any other web
services framework, giving advantage to the most practical for a
large, scalable, maintainable, readable, project. I would also like my
project to be ant-based. I'm looking for advice, comments, etc.

I want to be able to do both java2wsdl and wsdl2java. Java2WSDL is
because I want my own WSDLs to be maintainable by others, and
practically no one can write WSDL, but everyone can write Java
interfaces. Wsdl2Java is for externally-defined WSDLs, and also of
course to generate all the utility classes for my own WSDLs,
deployment files etc.

So I focused on Axis2 (1.3), the logical replacement for Axis, and JAX-
RPC, from Glassfish.

Axis2 seems nice because it's so widespread, which is the guarantee
that every problem you have, someone has already solved. This is how
it worked for Axis (for most issues, GIYF :) ).

JAX-RPC is nice because it's a reference implementation of a standard,
JAX-WS. But somehow it seems to me that everyone is using Axis, and
that's where I come from. So I put JAX-RPC aside and tried with Axis2.

I have some issues with Axis2 which make me feel that it is not quite
mature yet. Here are my experimental conclusions...


* WSDL2Java :
- Ant target org.apache.axis2.tool.ant.AntCodegenTask
.. works ok
.. but doesn't accept some WSDLs that Axis1 accepts... including the
ones generated by Axis2 tools! ("error parsing WSDL")
.. generates differently from Axis1, notably doesn't hide the embedded
classes like Axis did. Unfortunately, Axis2 java2wsdl still generates
these intermediate classes (MyMethodReturn containing Integer, instead
of Integer...).

* Java2wsdl :
- I found an Ant target (org.apache.ws.java2wsdl.Java2WSDLTask)
I keep getting the following exception:

java.lang.RuntimeException: java.lang.ClassCastException:
org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver

Problem is, I don't have the stacktrace, and google yields nothing. I
have no idea what the problem could be.

- instead, I tried simply calling org.apache.ws.java2wsdl.Java2WSDL
from Ant (executing the Java class instead of using a target)
Pros...
.. it works :)
.. it supports annotations (so you don't have to use a class instead of
an interface to keep your variable names, like in Axis1)
.. it generates a WSDL file that can be used by Axis1
Cons...
.. it generates one port for wsdl1.1, one for wsdl1.2, and one for
http, which I don't need. This makes uselessly complicated WSDL, and
thus generated code (a common interface, and two stubs)
.. I can't find any formal documentation, especially concerning the
arguments. All I've found is code with the usage inside, and it only
provides the list of options, not their values!
.. as it's a Java class and not an Ant target, there's no syntax
correction for the arguments
.. it generates a namespace / package xsd (I haven't found how to
suppress that)
.. the generated WSDL with Axis2's wsdl2java raises an exception :
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
WSDL
(again, no stack trace, no detail)
(this of course is the worst)

- to try and get more info, I tried using the Eclipse plug-in. I
don't really want to, because I want my project to be usable in any
dev studio, Netbeans or another.
It seems I have what looks like a missing dependency, so that
annotations are not supported (strange, it compiles with Eclipse and
Ant). Other than that, it generates almost the same WSDL as the class.


What I've found on forums, stuff like the missing Ant task, and my
experiments make me feel that Axis2 is not quite mature enough for me.
OTOH, my experiments with JAX-RPC work quite well.

Does anyone have any comments?

I realize that I don't really have a question, but I think that people
might react to some of this stuff...

I've got a couple of examples ready, but they would make for a very
long post. :)
JR
 
T

Tomek

Does anyone have any comments?

I realize that I don't really have a question, but I think that people
might react to some of this stuff...

I've got a couple of examples ready, but they would make for a very
long post. :)


Yep, its really long post and i must confess i didn't read whole
text :) (sorry). But if you are looking for new webservice framework,
you should take a look at Apache CXF (http://incubator.apache.org/
cxf/). Seems to be easier to use then Axis, has lot of features and
really nice architecture what is very important when you need to add
some custom stuff.
In next few days new version (2.0.2) will be released so it can be a
good point to start. (This is another good thing about CXF, releases
are published pretty often, so you don't have to wait months for bug
fix).
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Tomek said:
But if you are looking for new webservice framework,
you should take a look at Apache CXF (http://incubator.apache.org/
cxf/). Seems to be easier to use then Axis, has lot of features and
really nice architecture what is very important when you need to add
some custom stuff.
In next few days new version (2.0.2) will be released so it can be a
good point to start. (This is another good thing about CXF, releases
are published pretty often, so you don't have to wait months for bug
fix).

http://incubator.apache.org/cxf/people.html

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top