Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

digest value mismatch and disabling pretty printing/formatting of soap message

Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to validate a signature produced using AXIS+WSS4J client. The validation is performed by using AXIS+WSS4J on the provider side. The signature is performed on the body element in soap message

However during signature validation process I am getting an error "digest value mismatch". I think the message after it is signed is modified and this may be the reason of failure of signature validation.

If I try to print the request soap message using a handler using the api

or using the code

then I am seeing the soap message "somewhat" formatted and printed like this

I am not sure on how AXIS internally representing this soap message when
tranferring on the wire from one to other end but I am looking for below kind of soap message which does not have any indentation, formatting, new lien characters, line feeds, spaces etc.

and since the above soap message does not have any new line characters, line feeds, spaces etc. and so that even if I sign the above message there will not be any formatting issues that may cause the signature validation to fail on the provider end.

Can anyone please tell me how to remove such formatting of soap message and disable pretty printing/formatting of soap messages.
I tried these parameters in both client-config.wsdd on client side and server-config.wsdd on the provider side but no avail.

Thank you in advance.
Men call me Jim. Women look past me to this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic