Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6734

The nested policy reference can not be resolved [CXF-3544]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.2 ER1
    • EAP_EWP 5.1.0
    • Web Services
    • None
    • JBoss EAP 5.1 using JBossWS Apache CXF Stack

    • Workaround Exists
    • Hide

      If you can modify the wsdl, you can change from :
      <wsp:Policy>
      <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/>
      </wsp:Policy>

      To:
      <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/>

      Show
      If you can modify the wsdl, you can change from : <wsp:Policy> <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/> </wsp:Policy> To: <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/>
    • Hide
      The system threw a RuntimeException if a policy reference was wrapped in a &lt;wsp:policy&gt; element in a wsdl file. This happened because it failed to resolve the policy reference. The policy reference can now be either wrapped in the &lt;wsp:Policy&gt; element or defined as a standalone element (without being wrapped in the &lt;wsp:Policy&gt; element).
      Show
      The system threw a RuntimeException if a policy reference was wrapped in a &lt;wsp:policy&gt; element in a wsdl file. This happened because it failed to resolve the policy reference. The policy reference can now be either wrapped in the &lt;wsp:Policy&gt; element or defined as a standalone element (without being wrapped in the &lt;wsp:Policy&gt; element).
    • Documented as Resolved Issue
    • NEW

    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

        Issue Links

          Activity

            People

              rhn-support-bmaxwell Brad Maxwell
              rhn-support-bmaxwell Brad Maxwell
              Eva Kopalova Eva Kopalova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: