Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-1328 Resolve JBossWS/CXF WS-RM integration issues
  3. CXF-1302

Documented WS-RM sample produces PolicyException

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.0.3
    • Invalid
    • WS-* Components
    • None

    Description

      I'm trying to integrate CXF WS-RM into JBoss

      From the example on the wiki

      http://cwiki.apache.org/CXF20DOC/wsrmconfiguration.html

      I use

      <beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans'
      xmlns:jaxws='http://cxf.apache.org/jaxws' xmlns="http://cxf.apache.org/policy"
      xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
      http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
      http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/11/ws-policy.xsd
      http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'>

      <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
      <wsp:Policy/>
      </wsam:Addressing>
      <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
      <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
      </wsrmp:RMAssertion>
      </wsp:Policy>

      <jaxws:endpoint id='TestService' address='http://@jboss.bind.address@:8080/jaxws-cxf-reliable' implementor='org.jboss.test.ws.jaxws.cxf.reliable.RMEndpointImpl'>

      <jaxws:invoker>
      <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
      </jaxws:invoker>

      <jaxws:features>
      <p:policies>
      <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
      </p:policies>
      </jaxws:features>

      </jaxws:endpoint>

      </beans>

      This leads to

      Caused by: org.apache.cxf.ws.policy.PolicyException: Expected exactly one child element of type

      {http://www.w3.org/ns/ws-policy}

      Policy.
      at org.apache.cxf.ws.policy.builder.primitive.NestedPrimitiveAssertion.<init>(NestedPrimitiveAssertion.java:70)
      at org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder.build(AddressingAssertionBuilder.java:74)
      at org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.build(AssertionBuilderRegistryImpl.java:102)
      at org.apache.cxf.ws.policy.PolicyBuilderImpl.processOperationElement(PolicyBuilderImpl.java:185)
      at org.apache.cxf.ws.policy.PolicyBuilderImpl.getPolicyOperator(PolicyBuilderImpl.java:123)
      at org.apache.cxf.ws.policy.PolicyBuilderImpl.getPolicy(PolicyBuilderImpl.java:119)

      Attachments

        Activity

          People

            asoldano Alessio Soldano
            tdiesler Thomas Diesler
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: