[jboss-user] [JBoss Web Services] New message: "@Action annotation -- where does it come from?"

Andrew Dinn do-not-reply at jboss.com
Fri Feb 12 11:30:17 EST 2010

User development,

A new message was posted in the thread "@Action annotation -- where does it come from?":


Author  : Andrew Dinn
Profile : http://community.jboss.org/people/adinn

I need to configure the WSA action associated with the response to an RPC style JaxWS call. I found that I can do this on the current trunk AS with JBossWS Native using the @Action annotation on my server endpoint implementation i.e.
> @WebService(targetNamespace = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06", name = "RegistrationPortType",
>         wsdlLocation = "/WEB-INF/wsdl/wscoor-registration-binding.wsdl",
>         serviceName = "RegistrationService",
>         portName = "RegistrationPortType"
>         // endpointInterface = "org.oasis_open.docs.ws_tx.wscoor._2006._06.RegistrationPortType",
> )
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> // @EndpointConfig(configName = "Standard WSAddressing Endpoint")
> @HandlerChain(file="/handlers.xml")
> @Addressing(required=true)
> public class RegistrationPortTypeImpl implements RegistrationPortType
> {
>     @Resource private WebServiceContext webServiceCtx;
>     @WebResult(targetNamespace = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName = "parameters", name = "RegisterResponse")
>     @WebMethod(operationName = "RegisterOperation", action = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06/Register")
>     @Action(input="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/Register", output="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/RegisterResponse")
>     public org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterResponseType registerOperation(
>         @WebParam(targetNamespace = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName = "parameters", name = "Register")
>         org.oasis_open.docs.ws_tx.wscoor._2006._06.RegisterType parameters
>     )
>     {
>         MessageContext ctx = webServiceCtx.getMessageContext();
>         HttpServletRequest request = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
>         . . .
This works fine apart from one detail, the package from whihc @Action is imported. I tried first of all to use the annotation class defined in the JSR 261 JaxWSA specification i.e.
> import javax.xml.ws.addressing.Action;
This had no effect. So, I checked the WS source and noticed that all occurences of @Action refer to this class:
> import javax.xml.ws.Action;
This includes a WSA-specific test and also the WS metadata processing code. I tried this and it does indeed ensure that the correct action is installed in the response message. However, this is not in accordance with the JSR 261 JaxWSA spec. Should JBossWS native not be using the annotation from the ws.addressing package?
I also need to know what  CXF does in response to either of these annotations? Whatever I implement needs to ensure the correct response action is used on both CFX and Native,


To reply to this message visit the message page: http://community.jboss.org/message/526080#526080

More information about the jboss-user mailing list