Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stripping away SOAP components using DOM

843834Aug 7 2002 — edited Aug 11 2002
Hi,

My application is reading in an XML message which has a SOAP wrapper:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="<http://schemas.xmlsoap.org/soap/envelope/>" SOAP-ENV:encodingStyle="<http://schemas.xmlsoap.org/soap/encoding/>">
<SOAP-ENV:Body>

   <ns:Message xmlns:ns="http://www.namespace.com">
      <...message content...>
   </ns:Message>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
While the SOAP components need to be there, they are of no use to my particular application so I want to strip them out. I want to end up with a DOM object which looks like the following, with no SOAP components or namespaces:
<?xml version="1.0" encoding="UTF-8"?>
   <Message>
      <...message content...>
   <Message>
The namespace prefix (ns) and the namespace value ("http://www.namespace.com") will not necessarily always be the same - however I will be assuming that these can be config-file driven.

Can anyone provide me with some DOM code for stripping out the SOAP components?

Any help would be greatly appreciated.

Haitham.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2002
Added on Aug 7 2002
5 comments
403 views