camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Wsdl file not find by cxf or camel-cxf endpoint in OSGI server ?
Date Sun, 06 Sep 2009 14:49:03 GMT
I just went through the code of CXF and found adding a "classpath:" 
prefix to the wsdlURL will do the trick.
Just like this :

<cxf:cxfEndpoint id="invoicingService"
                 address="http://0.0.0.0:${port}/Invoicing"
 
serviceClass="com.fusesource.ps.invoicing.camel_payload.DOMSourcePayloadProvider"
          *wsdlURL="classpath:wsdl/InvoicingService.wsdl"*
          endpointName="ns:SOAPOverHTTP"
          serviceName="ns:InvoicingService"
          xmlns:ns="http://www.progress.com/ps/courseware/InvoicingService"
         >

CXF will try to use the thread context classloader to load the WSDL as a 
resource, if your application bundle import a right package, CXF will 
load the WSDL rightly.

Willem

Willem Jiang wrote:
> Ah, another OSGi issue.
> Charles, you are exploring a new world with CXF and Camel.
> Please feel free to fill a JIRA when you get into trouble.
> 
> Maybe we could use the OSGi resolver to look up the wsdl file.
> Since we just pass the wsdl location as a String into CXF in
> the camel-cxf component, we may need do some work on CXF side.
> 
> Willem
> 
> cmoulliard wrote:
>> Hi,
>>
>> I have created two bundles :  
>> - one for the files generated by wsdl2java of CXF = bundle
>> reportingincident.service (= bundle A)
>> - and the other for my camel-context using these files = bundle
>> reportingincident.camel (= bundle B)
>>
>> In the bundle A, I have created a directory under META-INF called wsdl where
>> my reporting_incident.wsdl file is and exported the package (in this case,
>> the wsdl file) using the syntax :
>> <Export-Package>META-INF.wsdl</Export-Package>
>>
>> The bundle B imports the package META-INF.wsdl using the following syntax
>> <Import-Package>META-INF.wsdl</Import-Package>
>>
>> Unfortunately, when Camel-cxf endpoint and CXF are created and started
>> during the load of the camel-context, Cxf claims that it does not find the
>> file under
>> c:/xxxx/vvvv/apache-servicemix-kernet-1.1.0-SNAPSHOT/bin/reporting_incident.wsdl
>>
>> According to the documentation of camel-cxf endpoint, the wsdl file defined
>> for the parameter wsdlUrl is loaded through the classpath.
>>
>> This is not the case here, why ?
>>
>> Regards,
>>
>> -----
>> Charles Moulliard
>> SOA Architect
>>
>> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
> 
> 


Mime
View raw message