• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Custom Authentication in Axis1.4

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have used my own AuthenticationHandler(extends HTTPAuthHandler of Axis), to authenticate all incoming requests, in an application which host multiple web services using Apache Axis 1.4.
There is a appropritely defined server-config.wsdd, snippet as follows:-
.
.
<handler name="auth"
type="java:X.Y.Z.handlers.authentication.AuthenticationHandler">
</handler>
<handler name="http" type="java rg.apache.axis.handlers.http.HTTPAuthHandler">
</handler>
.
.
<service name="getTrades" provider="java:RPC" >
<parameter name="className" value="X.Y.Z.service.trade.rpc.TradeExecutionReport"/>
<parameter name="allowedMethods" value="getTradeExecutionReport"/>

<requestFlow>
<handler type="soapmonitor"/>
<handler name="h" type="http"/>
<handler name="as" type="auth"/>
</requestFlow>

<responseFlow>
<handler type="soapmonitor"/>
</responseFlow>

<operation name="getTradeExecutionReport" returnQName="return" returnType="RTypeNS:String" xmlns:RTypeNS="http://xml.apache.org/xml-soap" >
<parameter name="companyName" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
<parameter name="userName" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
</operation>
</service>
____________________

Problem statement is:-
In case of authentication failure, I want to stop the further processing of request and respond back a specific XML message(NOT AxisFault), from AuthenticationHandler itself, containing adequate text: "Authentication Failed due to...xyz".

But I could not figure out any procedure to do this. I dont want to raise AxisFault because it has standard response format.

Putting it in other words: I want to send a response(for client: as if it is coming from the actual service called) from AuthenticationHandler itself, in event of Auth Failure.

Regards,
Jaideep
 
reply
    Bookmark Topic Watch Topic
  • New Topic