Preserving *all* whitespace in incoming SOAP requests?
I've recently discovered (just today) that Metro/Glassfish/JAX-WS (I have no idea exactly what is responsible for this, but I'd go with Metro?) is removing all whitespace/newlines after the final element in the SOAP message. Thus, a message like
is turned into
That wouldn't be a problem, except that when signing the body it takes into account the whitespace/new lines as well. Thus, when Metro removes those newlines, it changes the signature of the body and verification of the message fails.
I'm using SOAP UI to send requests to my Glassfish V2 UR2 server, running on JDK 1.5, Ubuntu 7.10. Web Service endpoint was generated via wsimport (from an existing WSDL), and is done as a servlet.
First things first, is this due to my Signature Canonicalization? If that's the case, the fix should be relatively simple (use a different one!). C14N in question is . Pretty sure C14N just deals with namespace issues though, so I don't think it's related to that.
Alternatively, is it a problem with the signature algorithm I'm using? It would appear to be
If it's not a problem with the the C14N or the signature, then I guess it's probably Metro doing this? Is this expected behavior, and is it possible to turn it off? I mean, I'm glad that it preserves all the whitespace inside the element, at least, but I would have thought it would be more sensible to preserve all the whitespace inside the body element generally.