Andrew Dinn [
http://community.jboss.org/people/adinn] replied to the discussion
"XTS tests broken in AS trunk after switch to CXF stack in 3.3.0"
To view the discussion, visit:
http://community.jboss.org/message/546743#546743
--------------------------------------------------------------
Alessio Soldano wrote:
Let's clarify the situation a bit first then: it seems to me the problem here is that
cxf does not consider the action provided in the message, which is what you'd expect,
right?
CXF instead goes throught the model constructed from the wsdl and try to get the action
from that. That's why it's looking at the soap binding part of ws-addressing (
http://www.w3.org/TR/ws-addr-wsdl/ http://www.w3.org/TR/ws-addr-wsdl/), which defines
namespace +http://www.w3.org/2006/05/addressing/wsdl
http://www.w3.org/2006/05/addressing/wsdl+ for the Action element.
I don't think
that is what is happening here. I believe it is the endpoint annotations not the WSDL
which is being used. My endpoint implemenation bean and the method which is failing are
coded as follows
@WebService(targetNamespace =
"http://docs.oasis-open.org/ws-tx/wscoor/2006/06", name =
"ActivationPortType",
wsdlLocation = "/WEB-INF/wsdl/wscoor-activation-binding.wsdl",
serviceName = "ActivationService",
portName = "ActivationPortType"
)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
@HandlerChain(file="/handlers.xml")
@Addressing(required=true)
public class ActivationPortTypeImpl implements ActivationPortType
{
@Resource private WebServiceContext webServiceCtx;
@WebMethod(operationName = "CreateCoordinationContextOperation", action =
"http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordinationContext")
@WebResult(name = "CreateCoordinationContextResponse", targetNamespace =
"http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName =
"parameters")
@Action(input="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordinationContext",
output="http://docs.oasis-open.org/ws-tx/wscoor/2006/06/CreateCoordi...)
public CreateCoordinationContextResponseType createCoordinationContextOperation(
@WebParam(name = "CreateCoordinationContext", targetNamespace =
"http://docs.oasis-open.org/ws-tx/wscoor/2006/06", partName =
"parameters")
CreateCoordinationContextType parameters)
{
. . .
As you can see the output response action is specified using the @Action annotation.
Now looking at the exception stack you cqan see that when MAPAggregator executes as part
of the output pipeline processing it tries to obtain the action associated with the
response message by calling ContextUtils.getAction(message). This calls
Contextutils.getActionFromServiceModel(message, null) which obtains the outbound message
info and calls Contextutils.getActionFromMessageAttributes(msgInfo). The latter makes the
call to ContextUtils.getAction(msgInfo) which blows up.
Now the odd thing is that message info has an action associated with it in the extension
attributes hashmap and CXF has put it there. The key for the atribute is {
http://www.w3.org/2005/08/addressing http://www.w3.org/2005/08/addressing}Action and the
value is the one I specified in the @Action annotation. The lookup in MAPAggregator is
trying to look it up using all the other possible keys (2006/05, 2007/05 etc) but not the
one for the value which has been installed in the attributes map. Since this causes it to
fall over when it fails to find an entry in the map I suspect the problem is that it is
using the wrong key for the first test in ContextUtils.getAction(). Where it says
Object o =
ext.getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
I believe it should
say
Object o =
ext.getExtensionAttribute(JAXWSAConstants.WSA_ACTION_QNAME);
However, I don't
see how this could ever have passed any sensible sort of QA process.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/546743#546743]
Start a new discussion in JBoss Web Services CXF at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]