Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Different approaches of developing webservice using Axis2?  RSS feed

 
Kumar Raja
Ranch Hand
Posts: 548
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I'm relatively new to webservices and specifically to Axis. I have not worked on Axis 1.x but started straight away with Axis2. In this link, on the left side under Documentation, I see lot of material about JAXWS guide, Spring guide, POJO guide etc.

1) Are these different ways of using Axis2?

2) I'm reading through Metro stack for certification purpose and I see completely a different approach defined by Axis2. Did I miss anything here?

3) Under POJO guide, I see couple of message receivers like "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" and "org.apache.axis2.rpc.receivers.RPCMessageReceiver". Are these about RPC style of webservices?

4)Do they have corresponding receivers for document style of WS?

5) I could not find a very detailed examples and explanation on how Axis2 work at their site (I might have overlooked). But can you suggest me a good link which talks about this
 
Imran Perwez
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following bookmarked, might be helpful:

Simple Webservice on JBoss using Axis
 
Kumar Raja
Ranch Hand
Posts: 548
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Imran, for the reference and I went through it.

The approach given in the reference is exactly the same what I'm learning for Metro stack (as both might be the implementations of same spec). But my question is what about the other approaches given at Axis2 site, like usage of OMElement and other receivers, which I did not see being used in Metro implementation.

Also, apparently there are several ways of implementing WS, but out of these which of these are used most prominently in production.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Are these different ways of using Axis2?

Yes. You may have to pick up a best approach suiting your requirements.
2) I'm reading through Metro stack for certification purpose and I see completely a different approach defined by Axis2. Did I miss anything here?

Never worked on Metro stack, but if you know about basic types of webservices in J2EE, all these different frameworks should be implementing either JAX-RPC & related APIs or JAX-WS & related APIs in J2EE 4 or JEE 5 respectively. Again, its up to the implementation on the way they model webservice specs. Axis2 is based on J2EE 1.4 API specs and when you say "completely a different approach", in what way is that different?
3) Under POJO guide, I see couple of message receivers like "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" and "org.apache.axis2.rpc.receivers.RPCMessageReceiver". Are these about RPC style of webservices?
4) Do they have corresponding receivers for document style of WS?

Yes, a good thing about Axis2 is it still provides support to RPC style webservices. You need to bother about these message receivers if you use Axis2 Data Binding Framework. I think data binding for document style is straightforward and simpler than RPC, so particular receivers are not quite obvious.
5) I could not find a very detailed examples and explanation on how Axis2 work at their site (I might have overlooked). But can you suggest me a good link which talks about this

try this Axis2. If the link doesn't work, download Axis2 and go through samples.
 
Kumar Raja
Ranch Hand
Posts: 548
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Naren.

In continuation to my question, I'm following the example given in Quickstart for the example "QuickStart" and generated the wsdl as instructed. When I looked into the wsdl file, I see that it is generated based on DOCUMENT/LITERAL.

Now, when I looked into services.xml that came with the sample, it has these receivers


As given, it seems to be based on RPC, where as my WSDL is DOCUMENT/LITERAL. How come these two files differ and how do they work together? Could you please explain me on that ?
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As given, it seems to be based on RPC, where as my WSDL is DOCUMENT/LITERAL. How come these two files differ and how do they work together? Could you please explain me on that ?

Well, <messageReceivers> can be provided at the service level or operation level, if someone wants to use RPC in WSDL at those respective levels. Try removing this and deploy with Document-Literal in your WSDL. It shouldn't have any impact.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!