This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Web Services and the fly likes how to disable pretty printing soap messages with AXIS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to disable pretty printing soap messages with AXIS?" Watch "how to disable pretty printing soap messages with AXIS?" New topic

how to disable pretty printing soap messages with AXIS?

Akram Chotu
Ranch Hand

Joined: Apr 18, 2006
Posts: 43
Hi All,

I was doing some interropability testing between .NET and AXIS. .NET is consumer and AXIS is provider which uses WSS4J for implementing digital signatures. When the consumer signs a soap message and when I try to verify the signature using WSS4J on the provider side I am getting an error like "digest value mismatch". I think the message when it is sent to the provider, it somehow got modified after it is signed and this causing signature verification failure error on the provider side. I am not sure how to solve this error. Does anybody have ideas for me here ....

Also, when if I use AXIS as either provider or consumer and generate soap messages and try to view them in tcpmonitor, I find that the message is formatted and getting displayed in tcpmonitor. Is it tcpmonitor formatting the messages or AXIS doing that? Even if I write a simple handler to print the soap messages using XMLUtils api from AXIS I see that a formatted message is printed. Can anybody clarify here? If AXIS is formatting the messages then I think the indentation added in the AXIS soap message might be causing for signature verification on the provider side and I have found that AXIS providers these 2 parameters

<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="disablePrettyXML" value="true"/>

which can be used to disable pretty printing of XML. Now I dont know whether to configure these parameters on client side or provider side. Do we have to configure these parameters on provider side in server-config.wsdd?

Thank you for your time and reply.
subject: how to disable pretty printing soap messages with AXIS?
It's not a secret anymore!