Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!