cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Diesler (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-1320) Configure WS-RM client from WSDL only
Date Thu, 20 Dec 2007 11:19:43 GMT
Configure WS-RM client from WSDL only
-------------------------------------

                 Key: CXF-1320
                 URL: https://issues.apache.org/jira/browse/CXF-1320
             Project: CXF
          Issue Type: Improvement
    Affects Versions: 2.0.3
            Reporter: Thomas Diesler


[tdiesler@tddell trunk]$ ant -Dtest=org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase one-test

one-test:
    [junit] Running org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.64 sec
    [junit] Test org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase FAILED 

The RM client should work like this

   public void testStandardAPIClient() 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:service name="RMService">
    <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
      <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-reliable"/>
      <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Note, that the addressing + rm interceptors would be added and the policy engine would be
enabled automatically.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message