This discussion is archived
1 Reply Latest reply: Feb 22, 2013 5:57 AM by 945123 RSS

JAX-WS handler not running

945123 Newbie
Currently Being Moderated
I have a very simple web service. I would like to use a handler with the web service.
I followed the directions here:

I am using the HandlerChain annotation in the jws file:

These are the contents of the security-context-handler.xml:
<?xml version="1.0" encoding="UTF-8"?>
<handler-chains xmlns="">

Here is the handler:

import java.util.Set;
import java.util.Collections;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;

public class SecurityContextHandler implements SOAPHandler<SOAPMessageContext>
public Set<QName> getHeaders()
{ System.out.println("getHeaders()\n");
return Collections.emptySet();
public boolean handleMessage(SOAPMessageContext messageContext)
{  System.out.println("handleMessage()\n");
return true;

public boolean handleFault(SOAPMessageContext messageContext)
{ System.out.println("handleFault()\n");
return true;

public void close(MessageContext messageContext)
{ System.out.println("Close()\n");

I can see the compiled handler class in the WAR file. When the web service is invoked it completes without error, but the handler never runs (it only has a System.out.println()).

I tried turning off the "Work Context Propagation Enabled" flag in the domain where the web service application is deployed, but that did not work.

What could I have done wrong? How may I enable a JAX-WS web service handler in weblogic?
Any pointers or advice are greatly appreciated.

Thank you.

Edited by: 942120 on Feb 15, 2013 8:24 AM


  • Correct Answers - 10 points
  • Helpful Answers - 5 points