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

The nested policy reference can not be resolved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.1, 2.3.5
    • WS-* Components
    • None

    Description

      The policy reference wrapped in a <wsp:policy> element can not be resolved:
      <wsdl:definitions>
      ...
      <wsdl:binding name="GreeterSOAPBinding" type="tns:Greeter">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsp:Policy>
      <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/>
      </wsp:Policy>
      ....
      </wsdl:binding>
      <wsp:Policy wsu:Id="WSAM_Addressing_Policy"
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsam:Addressing>
      <wsp:Policy>
      <wsam:Addressing/>
      </wsp:Policy>
      </wsam:Addressing>
      </wsp:Policy>
      </wsdl:definitions>

      Error message:
      --------------

      INFO: Creating Service

      {http://cxf.apache.org/greeter_control}

      BasicGreeterService from WSDL: org/apache/cxf/systest/ws/policy/http_server_greeter.wsdl
      javax.xml.ws.WebServiceException: java.lang.RuntimeException: #WSAM_Addressing_Policy can't be resolved server startup failed (not a log message)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
      at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:144)
      at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
      at org.apache.cxf.systest.ws.policy.HTTPServerPolicyTest$Server.run(HTTPServerPolicyTest.java:65)
      at org.apache.cxf.testutil.common.AbstractTestServerBase.start(AbstractTestServerBase.java:68)
      at org.apache.cxf.systest.ws.policy.HTTPServerPolicyTest$Server.main(HTTPServerPolicyTest.java:81)
      Caused by: java.lang.RuntimeException: #WSAM_Addressing_Policy can't be resolved
      at org.apache.neethi.AbstractPolicyOperator.normalizeOperator(AbstractPolicyOperator.java:130)
      at org.apache.neethi.AbstractPolicyOperator.normalize(AbstractPolicyOperator.java:87)
      at org.apache.neethi.Policy.normalize(Policy.java:95)
      at org.apache.cxf.ws.policy.EndpointPolicyImpl.initializePolicy(EndpointPolicyImpl.java:154)
      at org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
      at org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:533)
      at org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:285)
      at org.apache.cxf.ws.policy.PolicyEngineImpl.getServerEndpointPolicy(PolicyEngineImpl.java:273)
      at org.apache.cxf.transport.http.policy.PolicyUtils.getServer(PolicyUtils.java:180)
      at org.apache.cxf.transport.http.AbstractHTTPDestination.initConfig(AbstractHTTPDestination.java:404)
      at org.apache.cxf.transport.http.AbstractHTTPDestination.<init>(AbstractHTTPDestination.java:142)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.<init>(JettyHTTPDestination.java:90)
      at org.apache.cxf.transport.http_jetty.JettyDestinationFactory.createDestination(JettyDestinationFactory.java:37)
      at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:263)
      at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:134)
      at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:92)
      at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:71)
      at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:161)
      at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
      at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:433)
      at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:322)
      ... 6 more

      Attachments

        Activity

          People

            ema Jim Ma
            ema Jim Ma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: