users@glassfish.java.net

SOAPHandlers are not triggered while deploying JWS on Glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Tue, 25 May 2010 03:19:26 PDT

I have followed
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_adv/handlers.html#wp222336

article that allows creating and using SOAP Message Handlers.
So, I have done the following steps:
1) Created a SOAP handler

public class AuthenticationHandler
    implements SOAPHandler<SOAPMessageContext>
{
            public boolean handleMessage( SOAPMessageContext messageContext ){...}
}

2) Created a handler-chain.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <javaee:handler-chain>
        <javaee:handler>
            <javaee:handler-class>
                security.AuthenticationHandler</javaee:handler-class>
        </javaee:handler>
    </javaee:handler-chain>
</javaee:handler-chains>

3) Configured the handler chain in the JWS File
@WebService( name = "PerformanceServicePort", serviceName = "PerformanceService", portName = "PerformanceServiceWSDLPort", targetNamespace = "http://xml.apt.com/schema/PerformanceServiceWSDL", wsdlLocation = "META-INF/wsdl/service.api.ws.wsdl" )
@HandlerChain (file = "META-INF/handler-chain.xml")
@SOAPBinding( parameterStyle = SOAPBinding.ParameterStyle.BARE )
@Stateless
public class PerformanceServiceBean
    implements PerformanceServicePortType
{
}

After deploying the JWS on Glassfish v3 and running SOAP requests to the deployed JWS I noticed that the SOAP handler that I configured is not invoked at all (just ignored). Do I miss something in the configurations?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apt="http://xml.apt.com/schema/AptPortfolioSchema" >
   <soapenv:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">
            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>TestUser</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TestPassword</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
  </soapenv:Header>
   <soapenv:Body>
         ...
   </soapenv:Body>
</soapenv:Envelope>

Here is a SOAP request that is comming from the client
[Message sent by forum member 'anatoliiusiumbeli']

http://forums.java.net/jive/thread.jspa?messageID=471322