I guess I have an easier time thinking about message-type services because I'm better with XML than with programming. What's important to remember is that a SOAPEnvelope _is_ an XML document. Everything that's being sent over the wire is XML. The code I sent just lets you say explicitly what comes inside the SOAP:Body tags in a SOAPEnvelope. So, the SOAPBodyElement is an Axis object that represents one sub-element of the SOAP:Body tag. Say you invoke a call with two SOAPBodyElements, named bodyElement1 and bodyElement2. This is what it looks like on the wire:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <bodyElement1> <thisCanBe/> <anyWell-Formed/> <XMLofYourChoosing/> </bodyElement2> <bodyElement1> <soCanThis/> </bodyElement2> </SOAP:Body> </SOAP:Envelope> by the way, your English is excellent. Makes me embarrassed to know little more than how to order a lemonade in Spanish. Andrew At 12:26 PM 5/14/2002 -0700, you wrote: >Andrew, > >So 'SOAPBodyElement' is an object type than can be passed through axis >easily, right? >I'll try to get it working..... > >Thanks a lot Andrew! >Mark. > > -----Original Message----- >From: Andrew Vardeman [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, May 14, 2002 12:11 PM >To: [EMAIL PROTECTED] >Subject: RE: object types for autom. serialization > >Mark, > >I suggest you do the following: > >parse the XML document. Use the DOM Document.getDocumentElement() method >to get the document element of the document. Create a SOAPBodyElement from >this DOM Element. Invoke the service with an array containing only this >SOAPBodyElement. On the wire, you can look at this SOAP Envelope and see >that your entire XML document, minus the xml declaration and any comments, >etc. you had outside the document's root element. Assuming you can afford >to lose these things, it's easy to write a service that extracts the whole >DOM on the other end (again, see the axis message example). Here is some >client code that I'm using to do the same thing: > > // parse document into Document object parsedDoc > > SOAPBodyElement[] input = new SOAPBodyElement[1]; > > Element bodyElement = parsedDoc.getDocumentElement(); > SOAPBodyElement sbe = new SOAPBodyElement(bodyElement); > sbe.setNamespaceURI(""); > input[0] = sbe; > > Vector elems = (Vector) call.invoke( input ); > > >Andrew
