You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Salgar, Mehmet (external)" <Me...@external.t-mobile.de> on 2009/09/07 10:44:02 UTC
Beginer question - cxfbc:consumer and camel routes
Hi everybody,
I have an interesting concept problem with cxf-wsdl-first-osgi-package
example project...
I had deployed the example project with success, then I try to modified
according to my needs....
If I understand correctly cxfbc-bundle project with the cxfbc:consumer
receives the request and redirects it to the cxfse-bundle
cxfse:endpoint....
Now, what I am trying to place in middle a camel route that would apply
a transformation to received message and then send it to service but I
can't successfully build the route...
I am always getting NoSuchEndpointException from camel with
PersonalServicePort as Endpoint name there....
Do you see something wrong in the configuration or the way I am trying
to achieve this scenario is wrong or what would you recommend me to
implement this scenario...
Below you can see the router configuration I have and the consumer and
service projects...
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ctx="http://www.springframework.org/schema/context"
xmlns:osgi="http://activemq.apache.org/camel/schema/osgi"
xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://activemq.apache.org/camel/schema/osgi
http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compen
dium.xsd">
<osgi:camelContext
xmlns="http://activemq.apache.org/camel/schema/spring">
<!-- install the Java DSL route builder -->
<package>org.apache.servicemix.examples.camel</package>
<!-- install the route which is defined with xml tags -->
<route>
<from uri="PersonalServicePort"/>
<bean ref="myTransform" method="transform"/>
<to uri="PersonImplPort"/>
</route>
</osgi:camelContext>
<bean id="myTransform" class="de.tmobile.xxxx.MyTransform" />
</beans>
So at cxfbc-bundle project it looks like
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:person="http://servicemix.apache.org/samples/wsdl-first"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/schema/servicemix-cxf-bc-2009.01.xsd">
<cxfbc:consumer wsdl="classpath:person.wsdl"
endpoint="PersonalServicePort" />
<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
</beans>
and cxfse-bundle project looks like...
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://servicemix.apache.org/cxfse/1.0
http://servicemix.apache.org/schema/servicemix-cxf-se-2009.01.xsd">
<cxfse:endpoint endpoint="PersonImplPort">
<cxfse:pojo>
<bean
class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
</cxfse:pojo>
</cxfse:endpoint>
<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
</beans>
T-Mobile Deutschland GmbH
Aufsichtsrat: Timotheus Hottges (Vorsitzender)
Geschaftsfuhrung: Dr. Georg Polzl (Sprecher), Thomas Berlemann, Thomas Dannenfeldt, Albert Henn,
Dr. Christian P. Illek, Dr. Bruno Jacobfeuerborn, Dr. Dirk Rohweder
Handelsregister: Amtsgericht Bonn, HRB 59 19
Sitz der Gesellschaft: Bonn
WEEE-Reg.-Nr.: DE60800328
AW: Beginer question - cxfbc:consumer and camel routes
Posted by "Salgar, Mehmet (external)" <Me...@external.t-mobile.de>.
Hi,
Thx for the answer.....
unfortunately that didn't function.....
The error message is nearly the same, NoSuchEndpointException: No Endpoint could be found for ref:PersonServicePort, please check your classpath contains the needed cam component.....
Now one question, I have 3 beans.xml files there, can ref element can see an Endpoint from an another beans.xml (actually from another osgi bundle)
Or can I have a deployment order problem here, so router bundles deploys for then cxfse bundle?
Thx,
Mehmet
T-Mobile Deutschland GmbH
Aufsichtsrat: Timotheus Höttges (Vorsitzender)
Geschäftsführung: Dr. Georg Pölzl (Sprecher), Thomas Berlemann, Thomas Dannenfeldt, Albert Henn,
Dr. Christian P. Illek, Dr. Bruno Jacobfeuerborn, Dr. Dirk Rohweder
Handelsregister: Amtsgericht Bonn, HRB 59 19
Sitz der Gesellschaft: Bonn
WEEE-Reg.-Nr.: DE60800328
-----Ursprüngliche Nachricht-----
Von: Claus Ibsen [mailto:claus.ibsen@gmail.com]
Gesendet: Montag, 7. September 2009 10:59
An: users@servicemix.apache.org
Betreff: Re: Beginer question - cxfbc:consumer and camel routes
Hi
> <from uri="PersonalServicePort"/>
Try using ref to refer to the id of the endpoint
<from ref="PersonalServicePort"/>
On Mon, Sep 7, 2009 at 10:44 AM, Salgar, Mehmet (external)<Me...@external.t-mobile.de> wrote:
> Hi everybody,
>
> I have an interesting concept problem with cxf-wsdl-first-osgi-package
> example project...
>
> I had deployed the example project with success, then I try to
> modified according to my needs....
>
> If I understand correctly cxfbc-bundle project with the cxfbc:consumer
> receives the request and redirects it to the cxfse-bundle
> cxfse:endpoint....
>
> Now, what I am trying to place in middle a camel route that would
> apply a transformation to received message and then send it to service
> but I can't successfully build the route...
>
> I am always getting NoSuchEndpointException from camel with
> PersonalServicePort as Endpoint name there....
>
> Do you see something wrong in the configuration or the way I am trying
> to achieve this scenario is wrong or what would you recommend me to
> implement this scenario...
>
> Below you can see the router configuration I have and the consumer and
> service projects...
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ctx="http://www.springframework.org/schema/context"
> xmlns:osgi="http://activemq.apache.org/camel/schema/osgi"
>
> xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
> http://activemq.apache.org/camel/schema/osgi
> http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
> http://www.springframework.org/schema/osgi-compendium
> http://www.springframework.org/schema/osgi-compendium/spring-osgi-comp
> en
> dium.xsd">
>
> <osgi:camelContext
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <!-- install the Java DSL route builder -->
> <package>org.apache.servicemix.examples.camel</package>
> <!-- install the route which is defined with xml tags -->
> <route>
> <from uri="PersonalServicePort"/>
> <bean ref="myTransform" method="transform"/>
> <to uri="PersonImplPort"/>
> </route>
> </osgi:camelContext>
>
> <bean id="myTransform" class="de.tmobile.xxxx.MyTransform" />
>
> </beans>
>
> So at cxfbc-bundle project it looks like
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
> xmlns:person="http://servicemix.apache.org/samples/wsdl-first"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://servicemix.apache.org/cxfbc/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-bc-2009.01.xsd">
>
> <cxfbc:consumer wsdl="classpath:person.wsdl"
> endpoint="PersonalServicePort" />
> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
>
> </beans>
>
> and cxfse-bundle project looks like...
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://servicemix.apache.org/cxfse/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-se-2009.01.xsd">
>
>
> <cxfse:endpoint endpoint="PersonImplPort">
> <cxfse:pojo>
> <bean
> class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
> </cxfse:pojo>
> </cxfse:endpoint>
>
> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
>
> </beans>
>
>
> T-Mobile Deutschland GmbH
> Aufsichtsrat: Timotheus Hottges (Vorsitzender)
> Geschaftsfuhrung: Dr. Georg Polzl (Sprecher), Thomas Berlemann, Thomas
> Dannenfeldt, Albert Henn, Dr. Christian P. Illek, Dr. Bruno
> Jacobfeuerborn, Dr. Dirk Rohweder
> Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft:
> Bonn
> WEEE-Reg.-Nr.: DE60800328
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Beginer question - cxfbc:consumer and camel routes
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
> <from uri="PersonalServicePort"/>
Try using ref to refer to the id of the endpoint
<from ref="PersonalServicePort"/>
On Mon, Sep 7, 2009 at 10:44 AM, Salgar, Mehmet
(external)<Me...@external.t-mobile.de> wrote:
> Hi everybody,
>
> I have an interesting concept problem with cxf-wsdl-first-osgi-package
> example project...
>
> I had deployed the example project with success, then I try to modified
> according to my needs....
>
> If I understand correctly cxfbc-bundle project with the cxfbc:consumer
> receives the request and redirects it to the cxfse-bundle
> cxfse:endpoint....
>
> Now, what I am trying to place in middle a camel route that would apply
> a transformation to received message and then send it to service but I
> can't successfully build the route...
>
> I am always getting NoSuchEndpointException from camel with
> PersonalServicePort as Endpoint name there....
>
> Do you see something wrong in the configuration or the way I am trying
> to achieve this scenario is wrong or what would you recommend me to
> implement this scenario...
>
> Below you can see the router configuration I have and the consumer and
> service projects...
>
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ctx="http://www.springframework.org/schema/context"
> xmlns:osgi="http://activemq.apache.org/camel/schema/osgi"
>
> xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
> http://activemq.apache.org/camel/schema/osgi
> http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
> http://www.springframework.org/schema/osgi-compendium
> http://www.springframework.org/schema/osgi-compendium/spring-osgi-compen
> dium.xsd">
>
> <osgi:camelContext
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <!-- install the Java DSL route builder -->
> <package>org.apache.servicemix.examples.camel</package>
> <!-- install the route which is defined with xml tags -->
> <route>
> <from uri="PersonalServicePort"/>
> <bean ref="myTransform" method="transform"/>
> <to uri="PersonImplPort"/>
> </route>
> </osgi:camelContext>
>
> <bean id="myTransform" class="de.tmobile.xxxx.MyTransform" />
>
> </beans>
>
> So at cxfbc-bundle project it looks like
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
> xmlns:person="http://servicemix.apache.org/samples/wsdl-first"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://servicemix.apache.org/cxfbc/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-bc-2009.01.xsd">
>
> <cxfbc:consumer wsdl="classpath:person.wsdl"
> endpoint="PersonalServicePort" />
> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
>
> </beans>
>
> and cxfse-bundle project looks like...
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://servicemix.apache.org/cxfse/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-se-2009.01.xsd">
>
>
> <cxfse:endpoint endpoint="PersonImplPort">
> <cxfse:pojo>
> <bean
> class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
> </cxfse:pojo>
> </cxfse:endpoint>
>
> <bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
>
> </beans>
>
>
> T-Mobile Deutschland GmbH
> Aufsichtsrat: Timotheus Hottges (Vorsitzender)
> Geschaftsfuhrung: Dr. Georg Polzl (Sprecher), Thomas Berlemann, Thomas Dannenfeldt, Albert Henn,
> Dr. Christian P. Illek, Dr. Bruno Jacobfeuerborn, Dr. Dirk Rohweder
> Handelsregister: Amtsgericht Bonn, HRB 59 19
> Sitz der Gesellschaft: Bonn
> WEEE-Reg.-Nr.: DE60800328
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus