Rob,
Is this what are you looking for ?
try {
Body b = requestEnvelope.getBody();
Vector v = b.getBodyEntries();
String inElementAsXML;
for (int i=0;i<v.size();i++) {
Element elem = (Element) v.elementAt(i);
System.out.println( "Body element with index " + i +
" is " + elem.getNodeName());
//convert this element to XML using domwriter or equivalent...
//inElementAsXML = XMLUtils.domWriter(elem, new StringBuffer());
System.out.println(inElementAsXML);
}
}catch(Exception e ) {
//handle yr exception here..
}
Daniel Zhang <[EMAIL PROTECTED]> wrote:
Body b = requestEnvelope.getBody();
Vector v = b.getBodyEntries();
String inElementAsXML;
for (int i=0;i<v.size();i++) {
Element elem = (Element) v.elementAt(i);
System.out.println( "Body element with index " + i +
" is " + elem.getNodeName());
//convert this element to XML using domwriter or equivalent...
//inElementAsXML = XMLUtils.domWriter(elem, new StringBuffer());
System.out.println(inElementAsXML);
}
}catch(Exception e ) {
//handle yr exception here..
}
Daniel Zhang <[EMAIL PROTECTED]> wrote:
The SOAP message itself is an xml-structured. SOAP is a light-weight,
xml-based transmission protocol. My understanding here is that you want
to transform the SOAP xml into another form of xml, isn't it? If so, you
could use XSLT for that purpose.
-Daniel
Robert Wilson wrote:
>
>Hi
>I have been looking through the FAQs but have not found what I need.
>
>Given a SOAPHeaderElement or a SOAPBodyElement
>Could anybody tell me what the preferred method is for getting the
>contents of the soap body or soap headers into a String as XML that
>includes the soap elements.
>
>In other words transform them to xml.
>
>Thanks in advance.
>
>Rob Wilson
>
>
>
>
>
>
>
>
>
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
