I believe WS-Policy is not yet completely implemented in CXF.  I think
that is targeted for 2.1.

Glen

Am Mittwoch, den 16.04.2008, 00:39 -0700 schrieb Gerhard Schlager:
> Hello!
> 
> I'm currently trying to create a web service with CXF that can be used by a
> .NET client (WCF).
> In the documentation of Sun's Metro I read about WSIT which supports the
> interoperability between Java and .NET.
> 
> WSIT in NetBeans is automatically adding a few things to the WSDL:
> 
> <wsp:Policy wsu:Id="HelloWorld_policy">
>   <wsp:ExactlyOne>
>     <wsp:All>
>       <wsrm:RMAssertion>
>         <wsrm:InactivityTimeout Milliseconds="600000"/>
>         <wsrm:AcknowledgementInterval Milliseconds="200"/>
>       </wsrm:RMAssertion>
>       <wsoma:OptimizedMimeSerialization/> 
>     </wsp:All>
>   </wsp:ExactlyOne>
> </wsp:Policy>
> 
> Can I do the same thing with CXF? I tried adding the following to the
> endpoint's Spring bean:
> 
> <bean id="classifierService" class="com.example.HelloWorldImpl">
>   <!-- properties -->
> </bean>
> 
> <jaxws:endpoint id="helloWorldEndpoint"
> implementorClass="com.example.HelloWorldImpl" implementor="#helloWorld"
> address="/helloWorld">
>   <jaxws:properties>
>     <entry key="mtom-enabled" value="true" />
>   </jaxws:properties>
>   <jaxws:features>
>     <wsp:Policy>
>       <wsrm:RMAssertion>
>         <wsrm:InactivityTimeout Milliseconds="600000"/>
>         <wsrm:AcknowledgementInterval Milliseconds="200" />
>       </wsrm:RMAssertion>
>       <wsam:Addressing/>
>       <mtom:OptimizedMimeSerialization />
>     </wsp:Policy>
>   </jaxws:features>
> </jaxws:endpoint>
> 
> However, that didn't work as expected. Spring throws some type conversion
> exceptions when I add the <jaxws:features> to the endpoint's bean. Am I
> doing something completely wrong?
> I'd be really grateful if somebody could provide a working example that
> shows a complete Spring configuration file with namespaces, schemaLocations
> and the policy configuration.
> 
> Thanks in advance for your help.
> 
> Best regards,
> Gerhard

Reply via email to