aspose file tools*
The moose likes Web Services and the fly likes Lost in Web Services... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Lost in Web Services..." Watch "Lost in Web Services..." New topic
Author

Lost in Web Services...

Toa van Steen
Greenhorn

Joined: Nov 19, 2007
Posts: 2
Howdy!

I'm totally new to web services, so I want to apologize prophylactically if these are dumb questions: :roll:

Okay, I want to exchange SOAP messages with a third party system, that is I want to deploy a SOAP message receiver (i.e. a Web Service) and a SOAP message sender to my application server. Furthermore, I'd like both of them to use simple beans, i.e. POJOs.

Receiver:
As far as I understand it, I'd take the bean, pass it to some magical tool that generates a WSDL file (which I would then make available to the third party system), pass that file to another magical tool that generates the service code - and then? If that code receives a SOAP message and translates it into a bean - how can I jump in and get that bean?

Sender:
Taking the third party's WSDL file and giving it to that magical tool results in some code, which I could invoke with a bean as an argument which in turn would be send as a SOAP message to the third party system.

Now, if that's how it could be done (and I'd prefer to generate code rather than mess around with Call objects and setting return types and bean (de-)serializers and so on...), what exactly are those magical tools to be used? I've read about Apache Axis, Axis2, JAX-WS, JAX-RPC, etc... it's hell of a jungle and I really don't know if they all accomplish the same. But it would be nice if there was a tool that could be integrated into the Maven2 build process.

And above all: would it matter to the third party system if I chose a particular tool (or even a particular tool's version)? Or would that just affect the way (and possibly the performance) the SOAP messages are generated/processed and NOT their structure?

Phew! ;-) Thanks in advance!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Welcome to JavaRanch.

It's not as simple as having some beans that magically get exposed as web service (WS); you need a SOAP engine to do that. Axis is a common choice, but it is a web app, so it needs a servlet container to run. That's true of all SOAP engines, though. And you'd need one on both sides of the connection if both are supposed to act as WS receivers (the sender doesn't need one).

The WebServicesFaq tries to explain some of the terms you mention. Axis 1 (which implements the JAX-RPC API) and Axis 2 (which implements JAX-WS) are both SOAP engines; if you haven't used either before, go with the more current Axis 2. In general, stay away from JAX-RPC - it's obsolete; JAX-WS is the way of the future.


Ping & DNS - my free Android networking tools app
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by Toa van Steen:
would it matter to the third party system if I chose a particular tool (or even a particular tool's version)?


Well you will have to decide whether you'll use WSDL 2.0/SOAP 1.2 or WSDL 1.1/SOAP 1.1. Only the newer tools support (WSDL 2.0/SOAP 1.2) and (WSDL 1.1/SOAP 1.1) is in more widespread use.
 
jQuery in Action, 2nd edition
 
subject: Lost in Web Services...