Hi,

I haven't looked into the relevant code for a while, but I think that it has to be done in a WSPolicyFeature class. I think the policy expressions acquired from the config shouild be registered as (wsdl) EndpointInfo extensors. Perhaps, the wsdl generation code used in the java-first case will need to be updated too to have these extensors be taken into account when generating a wsdl for a given Java class. May be Dan can offer some more advice.

Cheers, Sergey

Can you give me any hints on how it should be implemented? e.g. which classes
need to be modified?

Thanks,


Sergey Beryozkin wrote:

Hi

That issue is still open - I may get a chance to look into it soon ...

Cheers, Sergey

Hi,

I've got some Axis 1.4 services and clients and I'm investigating moving
them to CXF.

One problem I'm having is with WS-PolicyAttachment. The Axis service
indicates policy requirements in the WSDL like this:

<wsdl:portType name="DataService">
 ...
 <wsdl:operation name="createStagingArea">
   <wsdl:input message="impl:createStagingAreaRequest"
name="createStagingAreaRequest"/>
   <wsdl:output message="impl:createStagingAreaResponse"
name="createStagingAreaResponse"/>
   <wsp:PolicyReference URI="#BillingHeaders" wsdl:required="true"/>
 </wsdl:operation>

...
 <wsp:Policy wsu:Id="BillingHeaders">
   <wsp:ExactlyOne>
     <ng:FederationContext
EPR-address="https://.../services/SLAService"/>
   </wsp:ExactlyOne>
 </wsp:Policy>

This tells the client that it will need to quote an SLA (service level
agreement) if it wants to invoke the createStagingArea operation.

I used CXF's policy framework to create an assertion for this, and the
policy is enforced correctly using some custom interceptors. However, the
policy doesn't appear in the WSDL.

This is a Java-first service, and the policy annotations are added
dynamically based on the service configuration. Is it possible to do this
in
CXF? I only found this:

https://issues.apache.org/jira/browse/CXF-1193

If not, hints on how to add it would be appreciated.


--
View this message in context: 
http://www.nabble.com/WS-PolicyAttachment-tp19800133p20014179.html
Sent from the cxf-user mailing list archive at Nabble.com.


Reply via email to