Peter, Another way to approach this is to start by designing the interface (WSDL) first. Define a schema that represents your XML structure. You might consider using a tool like XML Spy to do the schema design. Then define a WSDL interface and corresponding operation(s) that would return this XML structure as a type. The logical choice is to do this as a document/literal, but you could also do this as a rpc/literal. Once you have defined the WSDL and schema, you can generate server and client side code appropriate for this interface. One thing you will have to consider is whether you actually want the document returned as an XML document or want to leverage the helper classes. By default, I think the Axis WSDL2Java will generate code that presumes the use of helper classes. The benefit is that it is pretty easy to programmatically construct and process a response (or similar input parameter). The disadvantage is that if you need the result as an XML document (DOM document or array of elements, etc) you may have to work a little harder. Perhaps the bigger question is what perspective are you coming from? Are you looking at simply exposing existing functionality as a web service? I've rarely seen that you typically want to directly expose functionality "as is" as a web service. If you are coming at this from the perspective of the client and simply adapting the web service to backend functionality, that is where I see the "WSDL first" approach to be useful.
Hope this helps, Mark -----Original Message----- From: Peter Ross [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 9:41 AM To: [EMAIL PROTECTED] Subject: Re: Getting a webservice to return it's result as XML. On Wed, Jul 09, 2003 at 12:45:18PM +0200, Andreas Bohnert wrote: > examples/message should be a good starting point > Thanks for the pointer. Does anyone else have anyother information sources about document and wrapper services?
