[wsas-java-dev] Concerns of bottom-up and top-down approach
saminda abeyruwan
saminda at wso2.com
Tue Nov 6 23:38:41 PST 2007
Hi All,
Looking at axis2-user mailing list and WSAS forums, it has been evident
that developers would like to create a web service with bottom-up
approach (code first) rather than top-down approach. If the time factor
get involved to the equation, bottom-up approach is the easiest and
fastest.
Axis2 provides good support for bottom-up approach. It provides entities
to generate WSDL out of POJOs if *RPCMessageReceivers have been used.
The current implementations of *RPCMR will be restricted to Java beans,
primitives and arrays.
But most of the developers ask, whether Axis2 can deal with collections.
Thus, it's apparent that if collection can be an argument passed into
to out from a web method is an viable option. But it has limitations.
Generic collection can hold any type of objects. That's too much. It has
to be limited too. Thus, one option would be to use Java 1.5 Generics. ex;
public List<Employee> getEmployees(List<Department> depts) throws AxisFault
or
public Map<String,Person> getPersons() throws AxisFault
or
public List getSomething(Vector some) throws AxisFault;
where List and Vector default to String.
One could argue that JAXWS/JSR 181 is the answer to the above problem.
That's right, but it's pretty sleekly and would not address the issue of
exposing an existing POJO as a web service.
If we could support the prior mentioned POJO support in next AXIS2
release, I believe, it would make the bottom-up approach aggrandize.
Your input on prior will be highly appreciated.
Thank you
Saminda
More information about the Wsas-java-dev
mailing list