You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alexander Hachmann <ax...@thesofa.de> on 2006/11/08 16:02:41 UTC

onFault() only Running the GlobalChain

Hello,

The following WSDD is for a Service I am running.
As I understood, the Handlers in the MyChain are sevicespecific handlers,
for the simple reason, that i put them in the
servicechain and not the globalchain or transportchain. 
No what confuses me is that when I throw a AxisFault in the Handler
Authentication, the onFault() Method will only be called
on the Handlers in the Globalchain. (JWSHandler etc)
I was asuming, that the exceptioncall would walk back up to SemaphoreHandler
and than jump over the Two chains before that back
to the serializer.

I need Axis to call the onFault() methods of the handlers in the
servicechain. SemaphoreHandler is implementing this Method, but it is not
being called.

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

 <handler name="PackageAttachmentHandler"
type="java:com.epgdata.axis.handlers.PackageFilesAttachmentHandler"/>

 <chain name="MyChain">
 	<handler type="SemaphoreHandler"/>
 	<handler type="Authentication"/>
 </chain>

 <service name="PackageService" provider="java:RPC" style="wrapped">
 	<parameter name="className"
value="com.epgdata.ws.SimplePackageService"/>
 	<parameter name="allowedMethods" value="*"/>
 	<parameter name="scope" value="request"/>
	<requestFlow>
		<chain type="MyChain"/>
	</requestFlow>
 	<responseFlow>
 		<handler type="SemaphoreHandler"/>
  	</responseFlow>
 </service>

</deployment>

Where am I making the fault?

Thx,
   Alexander


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


AW: onFault() only Running the GlobalChain

Posted by Alexander Hachmann <ax...@thesofa.de>.
Hello,
I was a bit too quick with going to ask the List. But perhaps this can help
someone having the same expirience.

What I did wrong was throwing a AxisFault with using
AxisFault.makeFault(null).

When doing this, the exception that is being thrown in the
SimpleChain.doVisiting() is not an AxisFault but an NullPointerException.
This will not be caught in the SimpleChain. Thats why the Exception has been
thrown back to the SoapService. The SoapService than seems to call the
GlobalChain.

So I Changed the Exceptioncreation to new AxisFault("Description");

Have a nice day,
              Alexander 

-----Ursprüngliche Nachricht-----
Von: Alexander Hachmann [mailto:axis.public@thesofa.de] 
Gesendet: Mittwoch, 8. November 2006 16:03
An: axis-user@ws.apache.org
Betreff: onFault() only Running the GlobalChain

Hello,

The following WSDD is for a Service I am running.
As I understood, the Handlers in the MyChain are sevicespecific handlers,
for the simple reason, that i put them in the servicechain and not the
globalchain or transportchain. 
No what confuses me is that when I throw a AxisFault in the Handler
Authentication, the onFault() Method will only be called on the Handlers in
the Globalchain. (JWSHandler etc) I was asuming, that the exceptioncall
would walk back up to SemaphoreHandler and than jump over the Two chains
before that back to the serializer.

I need Axis to call the onFault() methods of the handlers in the
servicechain. SemaphoreHandler is implementing this Method, but it is not
being called.

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

 <handler name="PackageAttachmentHandler"
type="java:com.epgdata.axis.handlers.PackageFilesAttachmentHandler"/>

 <chain name="MyChain">
 	<handler type="SemaphoreHandler"/>
 	<handler type="Authentication"/>
 </chain>

 <service name="PackageService" provider="java:RPC" style="wrapped">
 	<parameter name="className"
value="com.epgdata.ws.SimplePackageService"/>
 	<parameter name="allowedMethods" value="*"/>
 	<parameter name="scope" value="request"/>
	<requestFlow>
		<chain type="MyChain"/>
	</requestFlow>
 	<responseFlow>
 		<handler type="SemaphoreHandler"/>
  	</responseFlow>
 </service>

</deployment>

Where am I making the fault?

Thx,
   Alexander


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org