Methods Summary |
---|
public void | destroy()
qname = null;
|
public javax.xml.namespace.QName[] | getHeaders()
return qname;
|
public boolean | handleFault(javax.xml.rpc.handler.MessageContext messageContext)
// no need to do any special processing
if(_logger.isLoggable(Level.FINE)){
_logger.log(Level.FINE, "wss-auth-client: ClientHandler does not handle" +
" SOAP faults");
}
return true;
|
public boolean | handleRequest(javax.xml.rpc.handler.MessageContext messageContext)
boolean retValue;
if(!isSoapMessageContext(messageContext)){
// cannot process this, as this is not a soap message context
throw new JAXRPCException(errMsg);
}
if (config_ == null) {
return true;
}
// get the ClientAuthContext
SOAPMessageContext smc = (SOAPMessageContext) messageContext;
SOAPMessage request = smc.getMessage();
ClientAuthContext cAC = config_.getAuthContext(null,request);
if (cAC == null) {
return true;
}
smc.setProperty(CLIENT_AUTH_CONTEXT, cAC);
smc.setProperty(javax.xml.ws.handler.MessageContext.WSDL_SERVICE,
serviceName);
try{
WebServiceSecurity.secureRequest(smc,cAC,isAppclientContainer);
} catch(Exception e){
if (_logger.isLoggable(Level.WARNING)){
_logger.log(Level.WARNING, "ws.error_secure_request", e);
}
throw new JAXRPCException(e);
}
return true;
|
public boolean | handleResponse(javax.xml.rpc.handler.MessageContext messageContext)
boolean retValue;
if(!isSoapMessageContext(messageContext)){
// cannot process this, as this is not a soap message context
throw new JAXRPCException(errMsg);
}
if (config_ == null) {
return true;
}
// get the ClientAuthContext
SOAPMessageContext smc = (SOAPMessageContext) messageContext;
ClientAuthContext cAC =
(ClientAuthContext) smc.getProperty(CLIENT_AUTH_CONTEXT);
if (cAC == null) {
return true;
}
try{
retValue = WebServiceSecurity.validateResponse(smc,cAC);
}catch(Exception e){
if (_logger.isLoggable(Level.WARNING)){
_logger.log(Level.WARNING, "ws.error_validate_response", e);
}
throw new JAXRPCException(e);
}
return retValue;
|
public void | init(javax.xml.rpc.handler.HandlerInfo info)
// 109 mandates saving qnames in init
qname = info.getHeaders();
config_ = (ClientAuthConfig) info.getHandlerConfig().get(CLIENT_AUTH_CONFIG);
serviceName = (QName)info.getHandlerConfig().get(javax.xml.ws.handler.MessageContext.WSDL_SERVICE);
|
private boolean | isSoapMessageContext(javax.xml.rpc.handler.MessageContext mc)109 mandates that each MessageContext be checked to see if it is a
a SOAPMessageContext and whether the handler processes it
boolean retValue =
(mc instanceof SOAPMessageContext)? true: false;
if(!retValue && _logger.isLoggable(Level.WARNING)){
_logger.log(Level.WARNING, "ws.error_not_soap");
}
return retValue;
|