Hello,
It would be beneficial if you'd post the error (Exception) you're
getting and the way you've configured your service. I've just recently
managed to get a WS-RM service running, although I'm using CXF on both
sides (WebLogic and JBoss).
Anyway, there are various ways to configure WS-RM on CXF. The basic
steps for configuring a spring-based client using the JAX-WS front-end
would be to:
1) Add a WS-Policy declaration and binding to your WSDL
<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">
<wswa:UsingAddressing
xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl" />
<wsrmp:RMAssertion
xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
<wsrmp:BaseRetransmissionInterval Milliseconds="10000" />
<wsrmp:DeliveryAssurance>
<wsp:Policy>
<wsrmp:ExactlyOnce />
<wsrmp:InOrder />
</wsp:Policy>
</wsrmp:DeliveryAssurance>
</wsrmp:RMAssertion>
</wsp:Policy>
<service name='YourService'>
<wsp:PolicyReference URI="#RM"
xmlns:wsp="http://www.w3.org/2006/07/ws-policy" />
2) Enable the WS-Policy parser in your Bus configuration (e.g. a sample
my-cxf-beans.xml)
* <cxf:bus>
<cxf:features>
<cxf:logging />
<wsa:addressing />
<wsrm-mgr:reliableMessaging>
<wsrm-policy:RMAssertion>
<wsrm-policy:BaseRetransmissionInterval
Milliseconds="4000" />
<wsrm-policy:AcknowledgementInterval
Milliseconds="2000" />
</wsrm-policy:RMAssertion>
<wsrm-mgr:destinationPolicy>
<wsrm-mgr:acksPolicy intraMessageThreshold="0" />
</wsrm-mgr:destinationPolicy>
</wsrm-mgr:reliableMessaging>
</cxf:features>
</cxf:bus>
*3) Create a Bus factory that use the above Bus configuration. The
snippet below does that and then uses that bus as the default, so any
service / port created will use it:
SpringBusFactory busFactory = new SpringBusFactory();
URL cxfConfig = getClass().getClassLoader().getResource(
"my-cxf-beans.xml");
Bus bus = busFactory.createBus(cxfConfig);
BusFactory.setDefaultBus(bus);
Hope this helps.
arkadye wrote:
Hi everyone,
I have WCF based WS-RM web service exposed thru the wsdl file. I am trying
to configure the client for this web service (for WS-Reliable Messaging). I
tried the approaches described in
http://cxf.apache.org/docs/wsrmconfiguration.html
http://cxf.apache.org/docs/wsrmconfiguration.html but sending the
CreateSequence message is failing. Is there some configuration specific for
the client?
Any help will be greatly appreciated.
Best regards,
Arkady.