Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3252

org.apache.cxf.ws.addressing.ContextUtils.getAction should support namespace "http://www.w3.org/2005/08/addressing"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.9, 2.1.10, 2.0.13, 2.2.10, 2.3, 2.2.11, 2.2.12, 2.3.1
    • 2.3.2, 2.4
    • None
    • None

    Description

      Current CXF dosen't support the get the Address Action with the namespace " http://www.w3.org/2005/08/addressing",
      You will get the NPE if the wsdl definition like this.
      The test case can be ran successfully with JDK 1.6 's JAXWS implementation.

       <wsdl:portType name="AccountStatusService"  xmlns:wsa="http://www.w3.org/2005/08/addressing">
              <wsdl:operation name="getAccountStatus">
                  <wsdl:input message="tns:getAccountStatusRequest"
                              wsa:Action="http://example.com/webservices/AccountStatusRequest">
                  </wsdl:input>
                  <wsdl:output message="tns:getAccountStatusResponse"
                               wsa:Action="http://example.com/webservices/AccountStatusResponse" />            
              </wsdl:operation>
      

      The stack trace is with CXF 2.2.9, I can also reproduce the error with CXF trunk code.

      Caused by: java.lang.NullPointerException
      at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:830)
      at org.apache.cxf.ws.addressing.ContextUtils.getActionFromMessageAttributes(ContextUtils.java:808)
      at org.apache.cxf.ws.addressing.ContextUtils.getActionFromServiceModel(ContextUtils.java:744)
      at org.apache.cxf.ws.addressing.ContextUtils.getAction(ContextUtils.java:712)
      at org.apache.cxf.ws.addressing.MAPAggregator.assembleGeneric(MAPAggregator.java:511)
      at org.apache.cxf.ws.addressing.MAPAggregator.aggregate(MAPAggregator.java:484)
      at org.apache.cxf.ws.addressing.MAPAggregator.mediate(MAPAggregator.java:411)
      at org.apache.cxf.ws.addressing.MAPAggregator.handleMessage(MAPAggregator.java:166)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:487)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
      ... 25 more
      

      Attachments

        Activity

          People

            njiang Willem Jiang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: