Hi Glynn
>1. In a previous mail on this thread you talked about adding the >RMInterceptors explicitly in code - I presume you're no longer doing >this and are now just relying on the RMAssertion & Addressing policies >attached to the WSDL and the PolicyEngine config bean? Yes Glenn, now I do not add the interceptors explicitly. Just that I explicitly enable the RMFeature at the server side programmatically as below: RMTxStore txStore = new RMTxStore(); txStore.setConnection(connection); RMFeature feature = new RMFeature(); feature.setStore(txStore); ep.getFeatures().add(feature); This is done to set the connection to be used for the store. >2. What version of CXF are you using? Up to quite recently, the ><wsaw:UsingAddressing> extension element was also required in the WSDL >in order to enable WS-A. Try adding the following child element to your ><wsdl:port>: > <wswa:UsingAddressing > xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> I am using the CXF version which was put on stage by DanK for 2.0.2 release (Take 2) I also tried changing the wsdl to have the <wswa:UsingAddressing> extension. The snapshot of the wsdl is below: <wsdl:service name="CartSLSBBeanService"> <wsdl:port binding="ns1:CartSLSBBeanServiceSoapBinding" name="CartSLSBBeanPort"> <wswa:UsingAddressing xmlns:wswa=" http://www.w3.org/2005/02/addressing/wsdl"/> <soap:address location="http://localhost:8181/cart/cart"/> <wsp:PolicyReference xmlns:wsp=" http://www.w3.org/2006/07/ws-policy" URI="#RM"/> </wsdl:port> </wsdl:service> <wsp:Policy 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 " wsu:Id="RM"> <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> I hope this is ok. After using this wsdl at the client and server still I get the below exception: Main message ID: ;Failed to retrieve message addressing properties from context - not ensuring reliable delivery. Messages Trace: retrieving MAPs from context property {0};( org.apache.cxf.ws.addressing.ContextUtils) WS-Addressing - failed to retrieve Message Addressing Properties from context;(org.apache.cxf.ws.addressing.ContextUtils) retrieving MAPs from context property {0};( org.apache.cxf.ws.addressing.ContextUtils) WS-Addressing - failed to retrieve Message Addressing Properties from context;(org.apache.cxf.ws.addressing.ContextUtils) retrieving MAPs from context property {0};( org.apache.cxf.ws.addressing.ContextUtils) WS-Addressing - failed to retrieve Message Addressing Properties from context;(org.apache.cxf.ws.addressing.ContextUtils) Failed to retrieve message addressing properties from context - not ensuring reliable delivery.;(org.apache.cxf.ws.rm.RMOutInterceptor) Hope this is the correct way of doing this. Or am I missing something? Any help would be appreciated. -Bharath On 9/26/07, Glynn, Eoghan <[EMAIL PROTECTED]> wrote: > > > > The problem here seems to be that the WS-RM layer cannot retrieve the > addressing properties that WS-A layer should have stored in the context. > > A couple of questions: > > 1. In a previous mail on this thread you talked about adding the > RMInterceptors explicitly in code - I presume you're no longer doing > this and are now just relying on the RMAssertion & Addressing policies > attached to the WSDL and the PolicyEngine config bean? > > 2. What version of CXF are you using? Up to quite recently, the > <wsaw:UsingAddressing> extension element was also required in the WSDL > in order to enable WS-A. Try adding the following child element to your > <wsdl:port>: > > <wswa:UsingAddressing > xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/> > > Cheers, > Eoghan > > > > -----Original Message----- > > From: Bharath Ganesh [mailto:[EMAIL PROTECTED] > > Sent: 26 September 2007 05:43 > > To: cxf-user@incubator.apache.org > > Subject: Re: WS-RM Usage > > > > My wsdl now contains the RM-Assertion and I have enabled the > > policy engine (by getting hold of PolicyEngine from the bus). > > > > But when I invoke the webservice, I get the following message: > > > > Failed to retrieve message addressing properties from context > > - not ensuring reliable delivery. > > Messages Trace: > > retrieving MAPs from context property {0};( > > org.apache.cxf.ws.addressing.ContextUtils) > > WS-Addressing - failed to retrieve Message Addressing > > Properties from > > context;(org.apache.cxf.ws.addressing.ContextUtils) > > retrieving MAPs from context property {0};( > > org.apache.cxf.ws.addressing.ContextUtils) > > WS-Addressing - failed to retrieve Message Addressing > > Properties from > > context;(org.apache.cxf.ws.addressing.ContextUtils) > > retrieving MAPs from context property {0};( > > org.apache.cxf.ws.addressing.ContextUtils) > > WS-Addressing - failed to retrieve Message Addressing > > Properties from > > context;(org.apache.cxf.ws.addressing.ContextUtils) > > Failed to retrieve message addressing properties from > > context - not ensuring reliable > > delivery.;(org.apache.cxf.ws.rm.RMOutInterceptor) > > > > > > What could have gone wrong? > > > > -Bharath > > > > > > > > > > On 9/25/07, Glynn, Eoghan <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > The presence of RMAssertion in the WSDL is enough for WS-RM to be > > > engaged in the client-runtime *if* the policy engine is > > turned on the > > > client config, via something like the following: > > > > > > <bean id="org.apache.cxf.ws.policy.PolicyEngine" > > > class="org.apache.cxf.ws.policy.spring.InitializingPolicyEngine"> > > > <property name="bus" ref="cxf"/> > > > <property name="enabled" value="true"/> > > > </bean> > > > > > > See the ws_policy demo for an example of this usage and also the > > > docco[1] for more details. > > > > > > This automatic injection of capability into the runtime > > triggered by > > > the presence of policy assertions is one of the main goals > > of the CXF > > > WS-Policy framework[2]. > > > > > > Cheers, > > > Eoghan > > > > > > [1] http://cwiki.apache.org/CXF20DOC/wspconfiguration.html > > > [2] > > http://cwiki.apache.org/CXF20DOC/ws-policy-framework-overview.html > > > > > > > > > > -----Original Message----- > > > > From: Bharath Ganesh [mailto:[EMAIL PROTECTED] > > > > Sent: 25 September 2007 14:12 > > > > To: cxf-user@incubator.apache.org > > > > Subject: WS-RM Usage > > > > > > > > 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.cacheUnacknowledge > > > > d > > > > (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$MessageSen > > > > derEndingInterceptor.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? > > > > > > > > > > ---------------------------- > > > IONA Technologies PLC (registered in Ireland) Registered Number: > > > 171387 Registered Address: The IONA Building, Shelbourne > > Road, Dublin > > > 4, Ireland > > > > > > > ---------------------------- > IONA Technologies PLC (registered in Ireland) > Registered Number: 171387 > Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland >