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();
}
}




Reply via email to