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

Improve documentation of WS-RM client side usage

    XMLWordPrintableJSON

Details

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

    Description

      If a client proxy is build like this

      public void testBasicRMAccess() throws Exception

      { URL wsdlURL = new File("resources/jaxws/cxf/reliable/reliable.wsdl").toURL(); QName serviceName = new QName(targetNS, "RMService"); Service service = Service.create(wsdlURL, serviceName); RMEndpoint port = (RMEndpoint)service.getPort(RMEndpoint.class); Object retObj = port.echo("Hello"); assertEquals("Hello", retObj); }

      with a wsdl like this

      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns="http://org.jboss.ws.jaxws.cxf/reliable" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService"
      targetNamespace="http://org.jboss.ws.jaxws.cxf/reliable">

      <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>

      <wsdl:message name="echoResponse">
      <wsdl:part name="return" type="xsd:string">
      </wsdl:part>
      </wsdl:message>
      <wsdl:message name="echo">
      <wsdl:part name="arg0" type="xsd:string">
      </wsdl:part>
      </wsdl:message>
      <wsdl:portType name="RMEndpoint">
      <wsdl:operation name="echo">
      <wsdl:input message="tns:echo" name="echo">
      </wsdl:input>
      <wsdl:output message="tns:echoResponse" name="echoResponse">
      </wsdl:output>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="RMServiceSoapBinding" type="tns:RMEndpoint">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="echo">
      <soap:operation soapAction="" style="rpc"/>
      <wsdl:input name="echo">
      <soap:body namespace="http://org.jboss.ws.jaxws.cxf/reliable" use="literal"/>
      </wsdl:input>
      <wsdl:output name="echoResponse">
      <soap:body namespace="http://org.jboss.ws.jaxws.cxf/reliable" use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="RMService">
      <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
      <soap:address location="http://localhost:8080/jaxws-cxf-reliable"/>
      <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      I get

      Caused by: org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied.
      at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:86)
      at org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:92)
      at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:56)

      The incoming message is plain soap (i.e. not RM)

      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: