Hi,

The developers at WS02 OxygenTank provided a very good example of  
implementing
Web Services Security with Rampart (http://wso2.org/library/3190).

In this example, they incorporated the WS-Policy information into the  
service WSDL definition,
and then used the tool, wsdl2java to generate the service stub.
This generated stub incorporated the ws-policy, and so no changes or  
extensions were required
in the client (except to set username/password options).

However, when I tried to do the same with a service that I had  
written, the generated
service stub did not include the ws-policy information.
The key difference between the original example and my code was that  
the example
described the service using WSDL 1.1, and I had a WSDL 2.0 definition  
for my service.

Why doesn't wsdl2java incorporate the ws-policy information in the  
stub when given WSDL 2.0 input?
Have I overlooked some command line option?
Or is it dependent upon where in the WSDL the policy information is  
included
(I have placed the policy element inside the wsdl2:binding element)?

The alternative of attaching the policy to the service stub in the  
client code using,
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,  <policy-
string>);
as in the Rampart samples, is much less desirable for our environment.
thanks for your help !

leon

-- 
Leon S. Searl, Software/Hardware Research Engineer
Information and Telecommunication Technology Center, University of Kansas
Nichols Hall, 2335 Irving Hill Road, Lawrence, KS 66045-7612
Ph: 785-864-7820     Fax: 785-864-0387
http://www.ittc.ku.edu

Reply via email to