Hi

One thing I'd like to note is that we'll do some work to automatically enable 
the policy engine upon encountering
the policy expressions.

Cheers, Sergey

----- Original Message ----- 
From: "Glynn, Eoghan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, September 25, 2007 2:30 PM
Subject: RE: WS-RM Usage




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: [email protected]
> 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.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$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

Reply via email to