cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Pischulski <nephi...@googlemail.com>
Subject Re: @Policy-Annotation in DOSGi
Date Mon, 23 Apr 2012 16:19:24 GMT
How are those internally resolved by CXF? I have three bundles
1) Bundle with registration of interface+implementation
2) Bundle with implementation of interface
3) Bundle with interface for sharing purposes

I applied the Policy-Annotations on the interface so I put those
policy-XML files into the same bundle. I tried to deploy it from the
registration bundle too with same results

On 4/23/2012 5:39 PM, Sergey Beryozkin wrote:
> 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
> 

Mime
View raw message