users@jax-rpc.java.net

extraxt rax xml using jaxb jaxrpc

From: StopSpam <swajixa02_at_sneakemail.com>
Date: Tue, 15 Feb 2005 19:25:14 +0100

Follow up on the discussion at:
https://jaxb.dev.java.net/servlets/BrowseList?listName=users&by=thread&from=167031&to=167031&first=1&count=4

I'm not too much into SOAP, but the problem I'm trying to solve seems
to be similar to extracting payloads from a SOAP envelope and it's SOAP body
without introducing any namespace decl., entity references etc... into the XML
payload.
This means that I'd like to retrieve the the payload as it is presented to the
parser (= exactly as enveloped).

As I think jaxrpc also uses jaxb to realize this, I'd like to know how payloads can be
extracted from SOAP envelopes as an octet stream or context free xml document using jaxb?

I hope this makes sense.
See http://www.w3.org/TR/xml-exc-c14n/#sec-ExclusiveNeed for further
details.

many thanks in advance

Konrad Lanz
Konrad(dot)Lanz[AT]iaik{dot}tugraz<dot>at

--- Please find the relevant parts of the previous discussion
--- from users_at_jaxb.dev.java.net below:

Kohsuke Kawaguchi wrote:

>> Btw. how is this solved for SOAP? I'm not too much into SOAP, but my problem
>> seems similar to SOAP envelopes and I think jaxrpc also uses jaxb.
>
>I'm curious, too. You might consider posting to users_at_jax-rpc.dev.java.net?
>
Konrad wrote:

>I need to access raw xml (an octet stream) as mentioned in
>http://java.sun.com/webservices/docs/1.5/jaxb/vendorCustomizations.html#dom
>for the creation of digital signatures over xml content.

>So far I can access the content using dom binding, but this destroys the
>document for
>signature verification purposes as the original RAW XML DATA is modified
>during
>unmarshalling and by introducing namespaces etc..

Kohsuke Kawaguchi wrote:

>> Is it possible to read the xml content (or input stream) as presented to
>> the parser between the <XMLData> tags?
>
>Hmm, not really. If XJC doesn't append proper namespaces on DOM
>elements, in general by the time you marshal it out, the meaning of
>those elements may change in an unexpected way.

Konrad wrote:

>Right, but in the case of an XML Protocol which envelops other XML data,
>it might not be desirable to inherit name spaces and other context into
>designated elements. This is also true in my case, where the xml wild card
>content inside the XMLData element should be independent.
>
>For a more detailed explanation of the problem please refer to
>http://www.w3.org/TR/xml-exc-c14n/#sec-ExclusiveNeed