I'm new to AXIS2, and I have to develop a web service which someone else
has supplied the WSDL, We also have to host a couple of operations as
well as make calls to them.

 

I have used WSDL2Java to generate the client code and service skeleton
and I have also deployed a service and put some debugging code in the
skeleton to verify that the methods can be called. SO far, all seems to
work ok.

 

With one particular operation, I have to validate the incoming SOAP
message against the schema using XMLBeand and either return a
"CERSErrorDocument" or a SOAPFaultException with details of the
exception in it. This is where my confusion starts.

 

I thought I would build a module (handler) and validate the SOAP message
here. This works fine and seems quite a tidy way of doing things.

 

The problem I'm having is - how do exceptions get out of the handler and
back to the client? Do I just throw them out of the handler?

 

Also - if the SOAP message is valid, I return an acknowledge document,
if it's invalid I return a SOAPFaultException - do I return those out of
the handler too?

 

Where is the best place to handle this kind of thing? The
module(handler) seems quite tidy, but I'm obviously missing the bit of
information which tells me how exceptions are handled from modules.

 

Or - should I modify the "MyServiceSkeleton.java" class and put the
validation and logic in that.

 

Any advice would be appreciated.

 

Thanks,

Pete

 

 

Reply via email to