Hi Gerhard,

I'm not expert of ws-policy, but add spring configure to jaxws:endpoint per as below just works for me
<jaxws:features>
   <wsp:Policy>
     <wsrm:RMAssertion>
       <wsrm:InactivityTimeout Milliseconds="600000"/>
       <wsrm:AcknowledgementInterval Milliseconds="200" />
     </wsrm:RMAssertion>
     <wsam:Addressing>
        <wsp:Policy/>
     </wsam:Addressing>
     <mtom:OptimizedMimeSerialization />
   </wsp:Policy>
 </jaxws:features>
Also you need add namespace definition
     xmlns:wsp="http://www.w3.org/2006/07/ws-policy";
     xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy";
     xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata";
xmlns:mtom="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization";

Regards

Freeman

Gerhard Schlager wrote:
Hello Sergey,


Sergey Beryozkin wrote:
I'm sorry to say it but I've never got to ensuring that for java-first
services WS-Policy expressions get automatically added to a (generated)
WSDL. I can't commit myself to fixing this issue at this stage, but
whenever I get a chance to look at a WS-Policy stuff, I'll get it fixed
first as it's obvious it's a major blocket to utilizing the CXF WS-Policy
framework at a wider scale.

Current WS-Policy implementation is a bit complicated, but the fix for
this issue should be reasonably simple, it would probably require an
update to a WS-PolicyFeature implementation which should register the
policy extensors it discovers from a spring configuration with either the
Endpoint or WSDLManager...


Now I'm a little bit confused. After reading [1] I thought it would be
possible to configure the WS-Policy with Spring. I just couldn't get it
working because of some exceptions (I can post them in a few hours if you
need them) that Spring was throwing at me. ;-)
So, are you saying it currently can't be done at all? That would be too bad.
I had some problems with Sun's Metro in conjunction with Spring and
Hibernate so I switched back to CXF. It looks like I can't use both of them.
Writing my own patch is not possible since I need a solution within the next
few days.

Would it work if I used WSDL first? However, I guess I won't be able to use
Spring's dependency injection then, will I? :-(

[1] http://netzooid.com/blog/2007/04/23/cxf-spring-and-ws-policy-internals/

Reply via email to