Dennis, This is a pretty antiquated view of document style. Document style is no longer used just for XML messaging. Most SOAP implementations support automatic marshalling of both RPC-style and document-style messages. As long as you have a WSDL description of the message structure, there's no problem building automatic serializers.
The predominant consensus in the industry at this point is to use document-style by default. Document style is much easier to validate, transform, and manipulate. The primary reason to consider using rpc/encoded is if you need to send multi-referencing object structures. SOAP encoding does a really nice job marshalling these structures. It's much harded to represent them using literal XML Schema. But if you're not using multi-refs, it's a better practice to use document-style. Regards, Anne > -----Original Message----- > From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 21, 2002 1:25 PM > To: [EMAIL PROTECTED] > Subject: Re: Document style web services > > > Hi Matt, > > The whole point of document style is that your application gets passed > the XML message payload as XML document fragments. See the "message" > sample for an example of this. With a document style interface your > class would look like: > > public class SomeXMLService { > public Element[] someXMLMethod(Element[] elems) { > ... > } > } > > If you want to convert the XML into objects you need to do it yourself, > perhaps using a framework such as Castor (http://www.castor.org). I know > there's been some integration of Castor with Axis, though I think this > was for custom serialization with RPC style. > > This brings up an interesting point, though. Why not have a Java > DataBindingProvider as a replacement for the MsgProvider? This should > allow easy use of document style while converting seamlessly between XML > and objects without the application needing any special code. I'm > looking into some data binding code currently, perhaps I'll see if I can > work in this direction. > > - Dennis > > Dennis M. Sosnoski > Enterprise Java, XML, and Web Services Support > http://www.sosnoski.com > > Crawford, Matt wrote: > > >Hello, > > > >Has anyone had experience with document style web services similar to the > >one shown below? The users guide indicates that "Document services do not > >use any encoding (so in particular, you won't see multiref object > >serialization or SOAP-style arrays on the wire) but DO still do > XML<->Java > >databinding." > > > >I'm looking to leverage this databinding to serialize and deserialize xml > >documents in the body, but the samples/encoding (from what I can > tell) deals > >with rpc style, not document style. > > > >Thanks, > >Matt Crawford > >Enterprise Rent-A-Car > > > > > ><SOAP-ENV:Envelope > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > >xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > ><SOAP-ENV:Body> > > <SomeXmlElement xmlns="http://www.somUri.org/someClassName" > >anAttribute="foo"> > > <AnotherXmlElement value="X"/> > > <AThirdXmlElement value="three"/> > > </SomeXmlElement> > ></SOAP-ENV:Body> > ></SOAP-ENV:Envelope> > > > >Would somehow map to (with appropriate typeMapping entries) > > > >public class SomeXmlService() { > > public SomeXmlResponse method(SomeXmlElement arg0) { > > return new SomeXmlReponse(); > > } > >} > > > > > > >