You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Eric Rodriguez <to...@gmail.com> on 2008/01/08 12:07:51 UTC
Camel and CXF Endpoint
Hi,
I'm trying to route a SOAP message from a CXF endpoint. I have the
service working on CXF fine, but when following the example from
http://activemq.apache.org/camel/cxf.html i keep getting:
Failed to read schema document
'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
I'm using apache-camel-1.2.0.jar and I can see it does have
schema/cxfEndpoint but it seems my system can't find it.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/cxfEndpoint
http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
">
<cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:8080/BusDemo/notifier"
serviceClass="com.openwave.routing.bus.NotifierBusImp"
wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
On the other hand, if I try to do it from Java:
CxfComponent cxf = new CxfComponent(context);
cxf.createEndpoint("router");
....
I get a:
java.lang.NoClassDefFoundError:
org/apache/cxf/frontend/AbstractEndpointFactory
I can't find that class on Camel or on CXF, any hint please?
Thx,
Eric
Re: Camel and CXF Endpoint
Posted by Eric Rodriguez <to...@gmail.com>.
First of all, thx for the reply!
I am on a Windows XPSP2 box with JSDK1.6
1. I downloaded the Camel 1.2 binary, no such thing as
org.apache.cxf.frontend.AbstractEndpointFactory there
2. I downloaded Camel 1.2-src (it does have the camel-cxf dependency),
normal build failed on CXF Tests
sun.reflect.NativeMethodAccessorImpl invoke0
WARNING: failed Server@15fb38
java.net.BindException: Address already in use: bind
after that I got many of the following exceptions:
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
3. Since I use Eclipse, I tried the mvn eclipse:eclipse build wich seems
to work, at least i can see the cxf-rt-core module now but i'm still
adding libraries from .m2/repositories so i'll let you know.
Eric
Freeman Fang wrote:
> Hi Eric,
>
> It seems that camel-cxf-1.2.jar is not in your class path,
>
> please add
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-cxf</artifactId>
> <version>${camel.version}</version>
> </dependency>
> in your pom.
>
> Btw, org/apache/cxf/frontend/AbstractEndpointFactory is in the cxf
> rt-core module, which camel-cxf depend on.
>
> Best Regards
>
> Freeman
>
> Eric Rodriguez wrote:
>> Hi,
>>
>> I'm trying to route a SOAP message from a CXF endpoint. I have the
>> service working on CXF fine, but when following the example from
>> http://activemq.apache.org/camel/cxf.html i keep getting:
>>
>> Failed to read schema document
>> 'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>
>> I'm using apache-camel-1.2.0.jar and I can see it does have
>> schema/cxfEndpoint but it seems my system can't find it.
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
>>
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> http://activemq.apache.org/camel/schema/cxfEndpoint
>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>> http://activemq.apache.org/camel/schema/spring
>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>> ">
>>
>> <cxf:cxfEndpoint id="routerEndpoint"
>> address="http://localhost:8080/BusDemo/notifier"
>> serviceClass="com.openwave.routing.bus.NotifierBusImp"
>> wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
>>
>> On the other hand, if I try to do it from Java:
>>
>> CxfComponent cxf = new CxfComponent(context);
>> cxf.createEndpoint("router");
>> ....
>>
>> I get a:
>> java.lang.NoClassDefFoundError:
>> org/apache/cxf/frontend/AbstractEndpointFactory
>>
>> I can't find that class on Camel or on CXF, any hint please?
>>
>> Thx,
>> Eric
>>
Re: Camel and CXF Endpoint
Posted by Willem Jiang <wi...@gmail.com>.
Hi Eric
1. You can find the solution from CXF user mail list [1], all you need
to do just replace the jaxws.xsd to cxfEndpoint.xsd
2. If you do not want to get touch with the camel codes, you can try out
the 1.3 snapshot by set the mvn repository to
http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/
Since Camel will build one snapshot per night.
[1]http://www.nabble.com/Eclipse-XSD-validation-for-jaxws.xsd-td11691580.html
Willem.
Eric Rodriguez wrote:
> Hi, thanks for the reply!
>
> 1. I am using eclipse (windows XP SP2 jsdk1.6) I tried putting the
> schema on my classpath but i'm pretty unsure about how to tell Eclipse
> to look for it there.
>
> 2. where can I find a snapshot of came 1.3? on
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/?
> or should i try from svn trunk?
>
> Thanks,
> Eric
>
> Willem Jiang wrote:
>> I think we could put the cxfEndpoint.xsd into the location of
>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd.
>> Before that we just leverage the Spring's local schema's
>> configuration and put the schema into the camel-cxf-*.jar.
>>
>> If you are using the tool such as eclipse to validate the spring
>> configuration file , you had to extract the cxfEndpoint.xsd and put
>> it to where the tool can find the schema.
>>
>> BTW, we fixed some issues of cxf camel component in the 1.3.0
>> snapshot, please feel free to try it out.
>>
>> Willem.
>>
>>
>> Freeman Fang wrote:
>>> Hi Eric,
>>>
>>> It seems that camel-cxf-1.2.jar is not in your class path,
>>>
>>> please add
>>> <dependency>
>>> <groupId>org.apache.camel</groupId>
>>> <artifactId>camel-cxf</artifactId>
>>> <version>${camel.version}</version>
>>> </dependency>
>>> in your pom.
>>>
>>> Btw, org/apache/cxf/frontend/AbstractEndpointFactory is in the cxf
>>> rt-core module, which camel-cxf depend on.
>>>
>>> Best Regards
>>>
>>> Freeman
>>>
>>> Eric Rodriguez wrote:
>>>> Hi,
>>>>
>>>> I'm trying to route a SOAP message from a CXF endpoint. I have the
>>>> service working on CXF fine, but when following the example from
>>>> http://activemq.apache.org/camel/cxf.html i keep getting:
>>>>
>>>> Failed to read schema document
>>>> 'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>>>
>>>> I'm using apache-camel-1.2.0.jar and I can see it does have
>>>> schema/cxfEndpoint but it seems my system can't find it.
>>>>
>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
>>>>
>>>> xsi:schemaLocation="
>>>> http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>>> http://activemq.apache.org/camel/schema/cxfEndpoint
>>>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>>> http://activemq.apache.org/camel/schema/spring
>>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>>>> ">
>>>>
>>>> <cxf:cxfEndpoint id="routerEndpoint"
>>>> address="http://localhost:8080/BusDemo/notifier"
>>>> serviceClass="com.openwave.routing.bus.NotifierBusImp"
>>>> wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
>>>>
>>>> On the other hand, if I try to do it from Java:
>>>>
>>>> CxfComponent cxf = new CxfComponent(context);
>>>> cxf.createEndpoint("router");
>>>> ....
>>>>
>>>> I get a:
>>>> java.lang.NoClassDefFoundError:
>>>> org/apache/cxf/frontend/AbstractEndpointFactory
>>>>
>>>> I can't find that class on Camel or on CXF, any hint please?
>>>>
>>>> Thx,
>>>> Eric
>>>>
>>>
>>
>
Re: Camel and CXF Endpoint
Posted by Eric Rodriguez <to...@gmail.com>.
Hi, thanks for the reply!
1. I am using eclipse (windows XP SP2 jsdk1.6) I tried putting the
schema on my classpath but i'm pretty unsure about how to tell Eclipse
to look for it there.
2. where can I find a snapshot of came 1.3? on
http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/?
or should i try from svn trunk?
Thanks,
Eric
Willem Jiang wrote:
> I think we could put the cxfEndpoint.xsd into the location of
> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd.
> Before that we just leverage the Spring's local schema's configuration
> and put the schema into the camel-cxf-*.jar.
>
> If you are using the tool such as eclipse to validate the spring
> configuration file , you had to extract the cxfEndpoint.xsd and put it
> to where the tool can find the schema.
>
> BTW, we fixed some issues of cxf camel component in the 1.3.0 snapshot,
> please feel free to try it out.
>
> Willem.
>
>
> Freeman Fang wrote:
>> Hi Eric,
>>
>> It seems that camel-cxf-1.2.jar is not in your class path,
>>
>> please add
>> <dependency>
>> <groupId>org.apache.camel</groupId>
>> <artifactId>camel-cxf</artifactId>
>> <version>${camel.version}</version>
>> </dependency>
>> in your pom.
>>
>> Btw, org/apache/cxf/frontend/AbstractEndpointFactory is in the cxf
>> rt-core module, which camel-cxf depend on.
>>
>> Best Regards
>>
>> Freeman
>>
>> Eric Rodriguez wrote:
>>> Hi,
>>>
>>> I'm trying to route a SOAP message from a CXF endpoint. I have the
>>> service working on CXF fine, but when following the example from
>>> http://activemq.apache.org/camel/cxf.html i keep getting:
>>>
>>> Failed to read schema document
>>> 'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>>
>>> I'm using apache-camel-1.2.0.jar and I can see it does have
>>> schema/cxfEndpoint but it seems my system can't find it.
>>>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
>>>
>>> xsi:schemaLocation="
>>> http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>> http://activemq.apache.org/camel/schema/cxfEndpoint
>>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>> http://activemq.apache.org/camel/schema/spring
>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>>> ">
>>>
>>> <cxf:cxfEndpoint id="routerEndpoint"
>>> address="http://localhost:8080/BusDemo/notifier"
>>> serviceClass="com.openwave.routing.bus.NotifierBusImp"
>>> wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
>>>
>>> On the other hand, if I try to do it from Java:
>>>
>>> CxfComponent cxf = new CxfComponent(context);
>>> cxf.createEndpoint("router");
>>> ....
>>>
>>> I get a:
>>> java.lang.NoClassDefFoundError:
>>> org/apache/cxf/frontend/AbstractEndpointFactory
>>>
>>> I can't find that class on Camel or on CXF, any hint please?
>>>
>>> Thx,
>>> Eric
>>>
>>
>
Re: Camel and CXF Endpoint
Posted by Willem Jiang <wi...@gmail.com>.
I think we could put the cxfEndpoint.xsd into the location of
http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd.
Before that we just leverage the Spring's local schema's configuration
and put the schema into the camel-cxf-*.jar.
If you are using the tool such as eclipse to validate the spring
configuration file , you had to extract the cxfEndpoint.xsd and put it
to where the tool can find the schema.
BTW, we fixed some issues of cxf camel component in the 1.3.0 snapshot,
please feel free to try it out.
Willem.
Freeman Fang wrote:
> Hi Eric,
>
> It seems that camel-cxf-1.2.jar is not in your class path,
>
> please add
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-cxf</artifactId>
> <version>${camel.version}</version>
> </dependency>
> in your pom.
>
> Btw, org/apache/cxf/frontend/AbstractEndpointFactory is in the cxf
> rt-core module, which camel-cxf depend on.
>
> Best Regards
>
> Freeman
>
> Eric Rodriguez wrote:
>> Hi,
>>
>> I'm trying to route a SOAP message from a CXF endpoint. I have the
>> service working on CXF fine, but when following the example from
>> http://activemq.apache.org/camel/cxf.html i keep getting:
>>
>> Failed to read schema document
>> 'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>>
>> I'm using apache-camel-1.2.0.jar and I can see it does have
>> schema/cxfEndpoint but it seems my system can't find it.
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
>>
>> xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>> http://activemq.apache.org/camel/schema/cxfEndpoint
>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>> http://activemq.apache.org/camel/schema/spring
>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>> ">
>>
>> <cxf:cxfEndpoint id="routerEndpoint"
>> address="http://localhost:8080/BusDemo/notifier"
>> serviceClass="com.openwave.routing.bus.NotifierBusImp"
>> wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
>>
>> On the other hand, if I try to do it from Java:
>>
>> CxfComponent cxf = new CxfComponent(context);
>> cxf.createEndpoint("router");
>> ....
>>
>> I get a:
>> java.lang.NoClassDefFoundError:
>> org/apache/cxf/frontend/AbstractEndpointFactory
>>
>> I can't find that class on Camel or on CXF, any hint please?
>>
>> Thx,
>> Eric
>>
>
Re: Camel and CXF Endpoint
Posted by Freeman Fang <fr...@gmail.com>.
Hi Eric,
It seems that camel-cxf-1.2.jar is not in your class path,
please add
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>${camel.version}</version>
</dependency>
in your pom.
Btw, org/apache/cxf/frontend/AbstractEndpointFactory is in the cxf
rt-core module, which camel-cxf depend on.
Best Regards
Freeman
Eric Rodriguez wrote:
> Hi,
>
> I'm trying to route a SOAP message from a CXF endpoint. I have the
> service working on CXF fine, but when following the example from
> http://activemq.apache.org/camel/cxf.html i keep getting:
>
> Failed to read schema document
> 'http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
>
> I'm using apache-camel-1.2.0.jar and I can see it does have
> schema/cxfEndpoint but it seems my system can't find it.
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxf="http://activemq.apache.org/camel/schema/cxfEndpoint"
>
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/camel/schema/cxfEndpoint
> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
> ">
>
> <cxf:cxfEndpoint id="routerEndpoint"
> address="http://localhost:8080/BusDemo/notifier"
> serviceClass="com.openwave.routing.bus.NotifierBusImp"
> wsdlURL="http://localhost:8080/BusDemo/notifier?wsdl"/>
>
> On the other hand, if I try to do it from Java:
>
> CxfComponent cxf = new CxfComponent(context);
> cxf.createEndpoint("router");
> ....
>
> I get a:
> java.lang.NoClassDefFoundError:
> org/apache/cxf/frontend/AbstractEndpointFactory
>
> I can't find that class on Camel or on CXF, any hint please?
>
> Thx,
> Eric
>