This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi guys, having the same problem.
Is there any standard solution now for this (noticed the topic is from 2005...)?
I need to save the content of the SoapMessage simply as String, not some other fancy format.
But it has to match EXACTLY the content of the soap response (also indents and line breaks)
because it contains a digital signature and the validation of the signed document fails if some parts are edited
Thanks in advance for any help!!! It's kind of urgent
Laura
"Fatti non foste a viver come bruti, ma a seguir virtute e conoscenza"
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2193
posted
0
Hi!
Glittery Lally wrote:But it has to match EXACTLY the content of the soap response (also indents and line breaks)
because it contains a digital signature and the validation of the signed document fails if some parts are edited
Hi thanks for your prompt answer
The problem is not how to write the stuff in an xml file
the problem is how to take the content of a SOAPMessage object and put it into a string
when I do soapMessage.writeTo(myByteArrayOutputStream)
the byteArrayOutputStream doesn't contain the same white spaces and line breaks as the original one.
I'm gonna read the documents about the canonicalization you sent me now, thanks
R Srini
Ranch Hand
Joined: Feb 19, 2010
Posts: 215
posted
0
@Ivan, Thank you for that very helpful code example.
@Glittery Lally: After some searching based on Ivan's example, I found another link that may have exactly what you need: SOAP message handler for logging inbound SOAP results. I just tried it and it worked fine for me. Its the same as Ivan's example, except that it reads the XML from the soap message instead of from a file. Hope that helps.
Glittery Lally
Greenhorn
Joined: Apr 08, 2010
Posts: 6
posted
0
@R Srini: Thanks a lot for your message and your time.
I tried your code and it works but unfortunately I have the same problem.
Some line breaks are lost So I have to try another solution.