[jboss-jira] [JBoss JIRA] (WFLY-4643) SOAP Handlers only executing on prestage when using JAX-WS standards

Derrick Sutherland (JIRA) issues at jboss.org
Mon May 18 13:07:19 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068941#comment-13068941 ] 

Derrick Sutherland edited comment on WFLY-4643 at 5/18/15 1:06 PM:
-------------------------------------------------------------------

No need to apologize.  I'm not saying it's not matching the current JavaEE spec.  What I am saying is the spec doesn't specifically state whether the handleMessage will and/or won't be called on a SOAPFault.  That being said, because it's not explicitally stated I assumed that both the handleMessage and handleFault functions would be called on a SOAPFault (which I was very wrong).  The JavaEE spec should be updated to explicitally state that if a SOAPFault occurs the handleMessage will not.


was (Author: derrick.sutherland):
No need to apologize.  I'm not saying it's not matching the current JavaEE spec.  What I am saying is the spec doesn't specifically state whether the handleMessage will and/or won't be called on a SOAPFault.  That being said, because it's not explicitally stated I assumed that both the handleMessage and handleFault functions would be called on a SOAPFault.  The JavaEE spec should be updated to explicitally state that if a SOAPFault occurs the handleMessage will not.

> SOAP Handlers only executing on prestage when using JAX-WS standards
> --------------------------------------------------------------------
>
>                 Key: WFLY-4643
>                 URL: https://issues.jboss.org/browse/WFLY-4643
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: Web Services
>         Environment: Wildfly 8.2.0.Final on RHEL 6.5
>            Reporter: Derrick Sutherland
>            Assignee: Alessio Soldano
>
> When a handler is attached the client of a JAX-WS service, only the outbound request is intercepted.  The inbound reponse isn't.  Furthermore, the reverse applies to any JAX-WS service handle when using the @HandlerChain annotation.  An example of a client-side handlers usage is depicted below:
> {code:title=TestServlet.java|borderStyle=solid}
>     List<Handler> handlers=new ArrayList<Handler>();
>     handlers.add(new DemoHandler());
>     Service service = Service.create(new URL(http://example.com/demoWs?wsdl"), new QName(DemoWsInterface.TARGET_NAMESPACE, "DemoWs"));
>     demoWs=service.getPort(DemoWsInterface.class);
>     ((BindingProvider) demoyWs).getBinding().setHandlerChain(handlers);
> {code}
> And the handleMessage function in my handler is as such:
> {code:title=DemoHandler.java|borderStyle=solid}
>     public boolean handleMessage(SOAPMessageContext msgContext) {
>        Boolean outbound = (Boolean) msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
>        if(outbound)
>            System.out.print("Outbound soap request");
>        else
>            System.out.print("Inbound soap response");
>        return true;
>     }
> {code}
> Everytime the client is used, the message "Outbound soap request" is displayed.  However, the inbound message is never displayed when the response comes back.  This should not be the case as the J2EE specification states a handler should receive the inbound and outbound soap messages on both the client and service.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list