--- Ted Jones <[EMAIL PROTECTED]> wrote: > Thanks for the response. I am really looking for a > programatic solution since my XML document will be > dynamic. > > Thanks, > Ted > > P.S. I am using Axis 1.1 > > > -----Original Message----- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: Mon 1/2/2006 4:24 PM > To: [email protected] > Subject: Re: Objectify XML Nodes > > Define a schema for this XML document, import the > schema into your WSDL, and > run wsdl2java. It will generate the Java objects > that map to the XML. > > Anne > > On 1/1/06, Ted Jones <[EMAIL PROTECTED]> wrote: > > > > I have an XML document that I need to convert to > Axis objects. The XML > > nodes will make-up the SOAPBody. Here's an example > of what an XML document > > might look like: > > > > ------------- > > <?xml version="1.0" > encoding="UTF-8"?><BooksNS:bookCollection > xmlns:xsd=" > > http://www.w3.org/2001/XMLSchema" xmlns:BooksNS=" > > > http://www.metamatrix.com/XMLSchema/DataSets/Books" > xmlns:BookTypesNS=" > > > http://www.metamatrix.com/XMLSchema/DataSets/Books/BookDatatypes"><book<http://www.metamatrix.com/XMLSchema/DataSets/Books/BookDatatypes%22%3E%3Cbook>isbn="0-201-10088-6"><title>Compilers</title><subtitle>Principles, > > Techniques, and > > > Tools</subtitle><edition>1</edition><authors><author>Aho</author><author>Sethi</author><author>Ullman</author></authors><publishingInformation><publisher>Addison-Wesley</publisher><publishDate>1985</publishDate></publishingInformation></book></BooksNS:bookCollection> > > -------------- > > > > I will strip off the top XML node and the SOAPBody > will contain the rest > > of the document. Are there any Axis utilities (or > third party tools) to > > accomplish this? I would prefer to avoid parsing > the document or using JDom > > to walk the nodes if at all possible. > > > > Thanks, > > Ted Jones > > > > > >
What you probably need to do is first define your wsdl. Make your sub xml a type...if nothing more than text. Then use wsdl to generate your web service classes. Create a schema for your specific document type of this type. Then use something like Castor to be able to generate your Objects. See http://www.castor.org/. Wade
