So,

my understanding and please correct me if I am wrong, somebody,

is that if you declare a checked exception in your impl class and throw
one, your response handler will not get called. The exception will
immediately propagate back to the client, bypassing any response
handlers you may have declared on the way back. (I just tested that with
a very simple web service, and that is the behavior I see, using Axis
1.4/Tomcat 5.5).

 

Now, if I throw a RuntimeException from my implementation class (that
is, not checked), then my onFault() method in my response handler class
did get called. So I ask, what kind of exception did you see, one that
is a runtime exception or a checked exception (declared in the wsdl,
that is, for each operation in the portType and binding sections)?

 

In summary, I would try to catch the exception in your impl class, and
rethrow a new exception that isn't declared in your wsdl. There is a
decent chance you will get a chance to see it in the response handler if
you write a onFault() method. (If you're doing JAX-RPC handlers, then
you will need to write a handleFault() method).

-jeff

  _____  

From: pp pp [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 17, 2007 8:57 AM
To: axis-user@ws.apache.org
Subject: axis handler being omitted



        hi everyone, 
        I am a bit puzzled about axis handler mechanism. Is there any
way to invoke axis handler after web service operation 
        rises an exception? whenever I invoke web service it goes
through the 
        handler as long as the service does not rise exception. if it
does 
        throw, the handler is omitted. 
        web service is defined as follows 
         <service name="zonk" provider="java:RPC"> 
          <parameter name="wsdlServicePort" value="zonk"/> 
          <parameter name="className" 
        value="zonk.example.ZonkSoapBindingSkeleton"/> 
          <parameter name="typeMappingVersion" value=" 1.2"/> 
          <parameter name="allowedMethods" value="*"/> 
          <parameter name="wsdlServiceElement"
value="MyServiceService"/> 
          <parameter name="wsdlTargetNamespace" value="urn:MyService"/> 
          <parameter name="wsdlPortType" value="MyService"/> 
          <parameter name="scope" value="Session"/> 
          <parameter name="schemaUnqualified" value="urn:MyService"/> 
          <typeMapping 
        
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" 
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ " 
        qname="ns9:DMSException" 
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" 
        type="java:zonk.example.DMSException"
xmlns:ns9="urn:MyService"/> 
           <responseFlow> 
           <handler name="monitorHandler"
type="java:monitor.MonitorHandler"> 
            </handler> 
                </responseFlow> 
         </service> 

Reply via email to