This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Axis2: Incoming SOAP messages: logging and validation  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I need to log the content of incoming soap messages in Axis2, BEFORE any kind of elaboration from Axis2(for example, I need to log the message also if it isn't well-formed, or the Security Header is invalid). Is there a way to simply do this, for example enabling debug log for a particular Axis2 class/package? I've tried to enable debug for the whole org.apache package and I'm quite surprised that, in tons of log, the SOAP message is never printed!

Also, I need to enable XSD validation (in particular, validation of soap-body content based on WSDL) for the incoming messages, that it seems disabled by default in Axis2. Any idea?

Thanks.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use handlers to log as well as validate soap messages.
http://shivendra-tripathi.blogspot.com/search/label/AXIS2%20Handler
 
Roby Kappa
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

shivendra tripathi wrote:You can use handlers to log as well as validate soap messages.
http://shivendra-tripathi.blogspot.com/search/label/AXIS2%20Handler



It is a possibile solution, but I hope there is a more simple solution that doesn't imply writing a custom module. It is quite strange that logging of SOAP messages and schema validation are not embedded in a product that was designed to work with webservices and XML/SOAP!

By the way, custom handlers work at "MessageContext" level, and in this object, the SOAP message was already parsed and available as SOAPEnvelope Axiom object. In this case a non-well formed XML cannot be read and logged. I think the logging should be done at transport (http request) level.

In the second case, validating the XML in an handler is difficult because I don't think that the WSDL is referenced by the messageContext...

Thanks
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!