Hi
I have been trying to get WS-RM to work in CXF. These are the steps I
followed.
WSDL: Reference to a WS-policy, containing a RMAssertion.
<wsp:Policy wsu:Id="RM">
<wsam:Addressing>
<wsp:Policy/>
</wsam:Addressing>
<wsrmp:RMAssertion>
<wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
</wsrmp:RMAssertion>
</wsp:Policy>
But this was not enough for the client side RM configuration. The RM
Interceptors were not added even thought the service client (Generated
JAX-WS Service class) pointed to this wsdl.
So I chose to programatically get hold of the bus, enable WS-Policy, create
the RMFeature, set the RM Store and add the RMInterceptors explicitly.
Is that really needed? Shouldn't the runtime do this if wsdl contains a
WS-Policy reference, which has a RM assertion?
In added RMOutInterceptor, RMInInterceptor, RMSoapInterceptor (to in and
out), RetransmissionInterceptor (to in and out) to the client side
org.apache.cxf.endpoint.Endpoint.
After configuring all this when the message goes outward from the client I
get this exception:
Caused by: java.lang.NullPointerException
at org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.cacheUnacknowledged
(RetransmissionQueueImpl.java:202)
at org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.addUnacknowledged(
RetransmissionQueueImpl.java:92)
at org.apache.cxf.ws.rm.RetransmissionCallback.onClose(
RetransmissionCallback.java:56)
at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java
:113)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java
:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage
(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java
:135)
This means the RMProperties is not set in the message.
What could go wrong?