Axis doc/literal works with both message style and rpc style services. The message vs. rpc attribute refers to the "provider", which is a WSDD attribute. It indicates whether or not Axis should marshal/unmarshal the message for you. If you use "message", then Axis passes the message payload as XML to the service agent. If you use "rpc", then Axis translates the XML into Java and invokes the appropriate method in the service agent. The behavior associated with this attribute isn't exposed to the client application. The client application only cares about what the WSDL says. It's completely unaware of what the WSDD says.
Likewise, an Axis client should be totally unaware of what's going on behind the scenes in a .NET service. All it cares about is the WSDL. The rpc vs. document attribute refers the the SOAP message structure, so this is an important piece of information to both the client and the service "provider" (although not to the service agent -- the service agent only cares about what's specified in the WSDD). If you're trying to build a client application in Axis that will access some remote doc/lit service -- whether or not it's "wrapped" -- all you have to do is compile the WSDL file using wsdl2java and generate your client interface, and you can then invoke methods on this interface. If the doc/lit service passes a complex element (likely), then you may need to develop a JavaBean that corresponds to the complex element (many SOAP implementations will do this for you, though). If the complex element can't be mapped to a JavaBean (e.g., it contains a <choice> group), then you'll need to develop a custom deserializer. If you're building a service agent in Axis, then you can use java2wsdl to generate the WSDL file, although there are still some bugs in this process. (The design center for doc/literal assumes that you start with a WSDL file. I think this is an invalid assumption, though.) What you should do is generate the WSDL, then tweak it so that the WSDL is valid, and then run wsdl2java and regen the service agent class. If you prefer to work with Java constructs, you should use an "rpc" provider. If you prefer to work with XML constructs, you should use a "message" provider. Both are acceptable. One isn't "better" than the other. It depends on how you want to write your service code. Anne ----- Original Message ----- From: "Cory Wilkerson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 30, 2003 11:27 AM Subject: RE: wrapped services > This thread is getting hairy: > > 1. If Axis is given a doc/lit WSDL (that isn't implemented as wrapped by virtue of anonymous complex types and "parameters" in the message element) and you run wsdl2java on the thing...what will the behavior be. > > 2. Inversely, if I have a Java class and wan't to expose it as doc/lit via Axis -- does Axis generated "wrapped" wsdl? I know I submitted a bug in/around this topic that is still sitting in the queue. > > 3. Finally, what is the *best* way to use doc/lit with Axis? A message style service? Perhaps I'm not understanding what a "message" style service is -- I thought we were talking doc/lit when we said message style? > > -----Original Message----- > From: Davanum Srinivas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 30, 2003 10:21 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: wrapped services > > > Not really - > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfsystemwebservicesprotocolssoapparameterstyleclasstopic.asp > > -- dims > > --- Krzysztof Swietlinski <[EMAIL PROTECTED]> wrote: > > I think doc/lit is the only mode supported by WS-I > > Basic Profile 1.0, so it's not only MSFT. > > Also Sun's JAX-RPC 1.1 is doc/lit by default (as > > opposed to v. 1.0). > > > > I think you can use the same doc\lit WSDL to have > > either one of Document/Wrapped/Message service > > depending what you want Axis to do for you. Note that > > those service styles are Axis proprietary thingy and > > if you talking to MSFT guys, they probably won't > > understand it. > > > > -- Krzysztof > > > > --- Cory Wilkerson <[EMAIL PROTECTED]> wrote: > > > Wendy, > > > > > > I'm curious as to what the under-pinnings of a > > > message style service are? 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. > > > > > > 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. > > > > > > Cory > > > > > > > > > -----Original Message----- > > > From: Wendy Smoak [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 30, 2003 9:51 AM > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: wrapped services > > > > > > > > > > > > > From what I can gather -- wrapped services are > > > simply a clever hack > > > > to buy me rpc-like functionality via a doc/literal > > > service? > > > > Seems like a dangerous leg to stand on considering > > > that it's not > > > > standard (regardless of msft defaults ;)) and the > > > interpretation of > > > > what represents a wrapped service is left to the > > > framework (even > > > > though there's a general understanding). > > > > That said, if I go pure doc/literal, I'm likely to > > > be handed the > > > > root of the envelope by Axis (is this the case?) > > > > > > I don't think you get the root of the envelope > > > unless you go with Message style and use this > > > signature: > > > public void method(SOAPEnvelope req, SOAPEnvelope > > > resp); > > > > > > Can you clarify what you mean by "msft defaults"? > > > I'm trying to do some services that will be consumed > > > by people doing ASP stuff on IIS. It's definitely a > > > case of the blind leading the blind, and I'm trying > > > to figure out which of Axis' styles would make life > > > easiest on them. > > > > > > -- > > > Wendy Smoak > > > Applications Systems Analyst, Sr. > > > Arizona State University, PA, IRM > > > > > > > > > ===== > Davanum Srinivas - http://webservices.apache.org/~dims/ > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com >
