Title: RE: wrapped services
Wendy,
 
Document/literal means that you have defined a schema element definition for the SOAP message (the contents of soap:body) and that the message conforms to that schema.
 
RPC/encoded means that you have defined the types of the message elements that you wish to pass, and you let your SOAP implementation generate the SOAP message structure using the SOAP encoding data model. The generated input SOAP message structure always consists of a top-level element (immediate child of the soap:body element) with a local name equal to the method name, which contains a subelement for each input parameter. The generate output SOAP message structure always consists of a top-level element with some arbitrary name, which contains a subelement for the return value and each output parameter. Since the message structure is generated on the fly, there is no schema that defines the message, so you can't validate the message.
 
Anne
----- Original Message -----
Sent: Wednesday, July 30, 2003 11:53 AM
Subject: RE: wrapped services

Cory wrote:
> I'm curious as to what the under-pinnings of a message style service are?

Do you mean the code inside the method that ultimately gets called?  I'm currently planning to use JDOM to work directly with the XML.

> When the service is described via wsdl, surely it's doc/lit? 
> Else I could be handed an envelope whose contents can't be
> validated against a given schema.

My current lifeline is the Axis User Guide.  So I understand "Document" and "Wrapped" as these two method signatures:
   public void method(PurchaseOrder po)
   public void purchaseOrder(String item, int quantity, String description)

But I'm still trying to understand what "document/literal" means. Sorry!  I do intend for there to be a schema that describes what is allowed/required in the body of the SOAP message. 

> The default microsoft implementation is a "wrapped" doc/literal service (I believe).
> You have little to worry about if your folk are only *consuming*,
> it's just that if you're developing web services on the ms platform,
> by default, you get a "wrapped" style of service in order to emulate RPC.
 
Still confused, but it's sounding like as long as I stay away from java:RPC, I can deal with the body of the message however I please.  They just need to send the body as

<purchaseOrder>
  <item>123</item>
</purchaseOrder>

And they won't know or care that I use "Document" "Wrapped" or "Message" on the Axis side.  Does that sound right?

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

Reply via email to