HandlerChain in Web Service Client - Websphere

This is a discussion on HandlerChain in Web Service Client - Websphere ; hi I have installed Websphere 6.1 with Feature Pack and I am able to run the web service sample. I am adding a soap message handler in this manner @WebServiceClient(...) @HandlerChain(file="handler.xml") public class PingService and the handler.xml is under WEB-INF/classes ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: HandlerChain in Web Service Client

  1. HandlerChain in Web Service Client

    hi

    I have installed Websphere 6.1 with Feature Pack and I am able to run the web service sample.

    I am adding a soap message handler in this manner

    @WebServiceClient(...)
    @HandlerChain(file="handler.xml")
    public class PingService

    and the handler.xml is under WEB-INF/classes directory

    the problem is that my handler class is not called.




    package com.ibm.was.wssample.sei.ping;

    import java.util.HashSet;
    import java.util.Set;
    import javax.xml.namespace.QName;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.handler.MessageContext;
    import javax.xml.ws.handler.soap.SOAPHandler;
    import javax.xml.ws.handler.soap.SOAPMessageContext;


    public class HelloHandler implements SOAPHandler {

    public boolean handleMessage(SOAPMessageContext smc) {
    System.out.println("here");
    return true;
    }

    public Set getHeaders() {
    Set qnames = new HashSet();
    return (qnames);
    }

    public boolean handleFault(SOAPMessageContext mc) {
    return true;
    }

    public void close(MessageContext context) {
    System.out.println("dennis close");
    }
    }


    any clue?


  2. Re: HandlerChain in Web Service Client

    *We have the same issue running as follows:*

    Start Display Current Environment
    WebSphere Platform 6.1 [BASE 6.1.0.21 cf210844.13] [WEBSERVICES 6.1.0.21 cf210844.03]
    Detailed IFix information: ID: 6.1.0-WS-WAS-WinX32-FP0000009 BuildVrsn: null Desc: WebSphere Application Server 6.1.0.9

    *The behavior appears to be in conflict with documentation at:*

    http://publib.boulder.ibm.com/infoce...wshandler.html

    *This declaration fails to invoke a handler:*

    @WebServiceClient(name = "PartsCatalogService", targetNamespace = "urn:xxxx//manufacturing/partscatalog/interface/v1.0", wsdlLocation = "file:/C:/Projects/RSA7/PartsCatalogProvider/WebContent/WEB-INF/wsdl/PartsCatalog.wsdl")
    @HandlerChain(file = "ws-handler.xml")
    public class PartsCatalogService extends Service {

    *This declaration invokes a handler:*

    @WebServiceClient(name = "PartsCatalogService", targetNamespace = "urn:xxxx//manufacturing/partscatalog/interface/v1.0", wsdlLocation = "file:/C:/Projects/RSA7/PartsCatalogProvider/WebContent/WEB-INF/wsdl/PartsCatalog.wsdl")
    @HandlerChain(file = "file:C:/Projects/RSA7/PartsCatalogConsumer/src/ws-handler.xml")
    public class PartsCatalogService extends Service {

    *We have placed the 'ws-handler.xml' document in several folders on the classpath without success.*

  3. Re: HandlerChain in Web Service Client

    IBM has confirmed (PMR 93392 422 000) that our inability to annotate a Consumer for handler invocation is a bug:

    *After some investigation and discussion with our L3 team. I have found that the reason why the relative file paths in the @HandlerChain annotation did not work was due to a defect:

    APAR PK80182. This APAR is shipped in v6.1.0.25.

    Please read: http://www-01.ibm.com/support/docvie...id=swg1PK80182 for more *

+ Reply to Thread