On 23/04/12 06:40, Thomas Pischulski wrote:
Hi,I'm trying to get WS-Policy definitions to my deployed web service. My source looks like this @Policies({ @Policy(uri = "ws-policy/HelloServicePolicy.xml", placement = Policy.Placement.DEFAULT), @Policy(uri = "ws-policy/HelloServicePolicyBinding.xml", placement = Policy.Placement.BINDING) }) @WebService(targetNamespace = "http://impl.helloservice.webaudraga.tis.iai.inf.tud.de/", name = "hello") public interface IHelloService { @WebMethod String sayHello(String name); } and I have ws-policy/HelloServicePolicy.xml ws-policy/HelloServicePolicyBinding.xml in my bundles root (and it's also added to the MANIFEST.MF classpath). However, when I deploy my web service I get those two warnings: WARNING: Resource classpath:ws-policy/HelloServicePolicy.xml was not found in the classloaders. WARNING: Resource classpath:ws-policy/HelloServicePolicyBinding.xml was not found in the classloaders. Those definitions now appear as wsp:PolicyReference in my autogenerated wsdl file: <wsdl:binding name="IHelloServiceServiceSoapBinding" type="tns:hello"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsp:PolicyReference URI="ws-policy/HelloServicePolicy.xml"/> <wsp:PolicyReference URI="ws-policy/HelloServicePolicyBinding.xml"/> So it seems like I somehow has to make those files accessable through the jetty webserver? If yes, how? Grateful for any other recommendations.
The above annotations are managed at the CXF level and it appears the class loader is not able to resolve the resource references. It appears the wsdl-first approach which does not seem to work well yet for DOSGi CXF is the only option.
Sergey
Cheers, Thomas
