Title: WSDL2Java... Is all that REALLY necessary?
Wendy,
 
Yes, you can have Web services without RMI. If your applications wants to work with raw XML, and not have Axis translate it for you, then you should use the MsgProvider (style="message").
 
Although you wouldn't be using the Axis serialization engine in this case, I still think that Axis is a great solution, and I don't think it's overkill. The Axis engine implements the SOAP processing model for you -- which means that you can ask Axis to manage security, logging, auditing, compression, transformation, and all kinds of other functions for your application. It also manages the lifecycle of your application agents (equivalent to what a servlet engine does for your servlets).
 
WSDL2Java and Java2WSDL are tools that work with the serialization engine. They autogenerate the mappings between XML and Java. If you aren't using the serialization engine, you may not need to use them, although most people prefer to use WSDL2Java to generate client interfaces. The resulting client code autogens the SOAP envelope for you so you don't have to set all the WSDL parameters manually (as you do with the call interface).
 
Some of the reasons why you had as much trouble as you did are:
1. Axis still has some bugs to work out regarding its support for doc/literal. If Java2WSDL worked better, I think you would have found the entire process to be much easier.
2. The names for the four types of Axis services are very misleading and confusing (RPC, WRAPPED, DOCUMENT, and MESSAGE).
 
Let me now summarize these options for you
RPC:
- produces a parameterized RMI interface
- performs automatic serialization
- uses RPC/encoded
WRAPPED:
- produces a parameterized RMI interface
- performs automatic serialization
- uses doc/literal
DOCUMENT:
- produces a non-parameterized RMI interface (client must wrap parameters in a JavaBean)
- performs automatic serialization
- uses doc/literal
MESSAGE:
- uses a call interface passing XML
- applications must process XML
- uses doc/literal
 
As Dennis said, some of the commercial implementations (WASP and GLUE) provide more comprehensive support for doc/literal. You might find one of these tools a little simpler to use when first learning the technology.
 
Anne
 
----- Original Message -----
Sent: Thursday, July 31, 2003 8:05 PM
Subject: WSDL2Java... Is all that REALLY necessary?


I'm looking at the stuff generated by WSDL2Java and wondering... Can't you have web services without RMI?  I just want to receive a SOAP Message, and have the body of it passed to a method.  The part where the XML gets turned into a Java object (wrapped) is nice, but not necessary.

Perhaps Axis isn't overkill for me.  Just as I did not go with EJB's, but instead stuck with Servlets & JSP and a simpler persistance layer, is there a simpler way to receive and process SOAP messages?  Axis (Apache SOAP) is certainly what popped up on search after search, so here I am, but maybe I should go elsewhere.

--
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM

Reply via email to