Hi Sergey,

Right, the wsdl is only contract between cxf server and .net client, so if cxf can't publish the policy assertion into wsdl, the .net client have no idea about the policy configuration. If client side is also cxf, we can use same spring way as server to enable ws-policy for client.
Thanks for clarifying this issue for me, :-)

Freeman

Sergey Beryozkin wrote:
Thanks Freeman. Yes, I need to clarify that it will work indeed this way, it's 
just that the automatic publication of such policy expressions into a published 
WSDL (to be consumed by a NET client in this case) is not supported at this 
stage so that's why I was suggesting to put them into an explicit WSDL document 
and then link to that wsdl document from a jaxws:endpoint definition

Cheers, Sergey


From: "Freeman Fang" <[EMAIL PROTECTED]>
To: <cxf-user@incubator.apache.org>
Sent: Wednesday, April 16, 2008 2:50 PM
Subject: Re: CXF, WS-Policy and Spring


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/


----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Reply via email to