You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Rajesh_lakhotia <la...@gmail.com> on 2009/05/28 16:08:07 UTC

CXF-BC and camel combination issue

Hi,
My camel configuration is unable to route to CXF-BC provider.
Here is the set up ...
CXF_BC provider configuration ....
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
		xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
	   xmlns:ns1="http://myCompany.com"
	   xmlns:myns="http://myNameSpace/servicemix/1.0"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
					
<cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
                    service="ns1:rajESBService" 
					endpoint="rajESBSoapPort">
	      
</beans>

</cxfbc:provider>
	
WSDL service name and port name block ...
.....
.....
    <wsdl:service name="rajESBService">
        <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
            <wsdl:documentation>
                <wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0"
/>
            </wsdl:documentation>
            <soap:address location="http://localhost:8192/CamelServices/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Camel router code ....
 // Routes based on expression evaluation
		 
from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
		  .process(new Processor() {
			  public void process(Exchange exchange) {
				exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri"
, "http://myCompany.com/CONTEXTROOT/services/rajESBService");
		      }
			}).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");


I could see the message being logged as so its coming to camel piece and
logging it but then it errors out with 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>javax.jbi.messaging.MessagingException: Could not find
route for exchange: InOut[
  id: ID:172.25.237.64-121877ebe8f-9:0
  status: Active
  role: provider
  service: {http://myCompany.com/rajESBService}rajESBSoapPort
  operation: {http://myCompany.com}GetFeature
  in: null
] for service: {http://myCompany.com/rajESBService}rajESBSoapPort and
interface: null</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

I am sure I have not configured it right.
Could some one please point me to right direction.
Appreciate your help.

-- 
View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23762489.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF-BC and camel combination issue

Posted by Rajesh_lakhotia <la...@gmail.com>.
Hi Just an update...
I added  interfaceName="ns1:rajESBSoapType"
 to the provider xbean configuration and could see that its trying to route
to my server..but its erroring out with this now ...


ERROR - CxfBcComponent                 - Error processing exchange InOut[
  id: ID:172.25.237.64-12187c125b3-3:0
  status: Active
  role: provider
  endpoint: rajESBSoapPort
  operation: {http://http://myCompany.com/wsdl}GetFeature
  in: null
]
java.lang.NullPointerException
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:418)
        at
org.apache.servicemix.cxfbc.CxfBcProvider.convertMessageToInputStream(CxfBcProvider.java:571)
        at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:208)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

Any thoughts ?


Rajesh_lakhotia wrote:
> 
> Hi,
> My camel configuration is unable to route to CXF-BC provider.
> Here is the set up ...
> CXF_BC provider configuration ....
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> 		xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
> 	   xmlns:ns1="http://myCompany.com"
> 	   xmlns:myns="http://myNameSpace/servicemix/1.0"
>        xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="http://servicemix.apache.org/http/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> 					
> <cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
>                     service="ns1:rajESBService" 
> 					endpoint="rajESBSoapPort">
> 	      
> </beans>
> 
> </cxfbc:provider>
> 	
> WSDL service name and port name block ...
> .....
> .....
>     <wsdl:service name="rajESBService">
>         <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
>             <wsdl:documentation>
>                 <wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0"
> />
>             </wsdl:documentation>
>             <soap:address
> location="http://localhost:8192/CamelServices/"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
> 
> Camel router code ....
>  // Routes based on expression evaluation
> 		 
> from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
> 		  .process(new Processor() {
> 			  public void process(Exchange exchange) {
> 			
> exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri" ,
> "http://myCompany.com/CONTEXTROOT/services/rajESBService");
> 		      }
> 			}).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");
> 
> 
> I could see the message being logged as so its coming to camel piece and
> logging it but then it errors out with 
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Body>
>       <soap:Fault>
>          <faultcode>soap:Server</faultcode>
>          <faultstring>javax.jbi.messaging.MessagingException: Could not
> find route for exchange: InOut[
>   id: ID:172.25.237.64-121877ebe8f-9:0
>   status: Active
>   role: provider
>   service: {http://myCompany.com/rajESBService}rajESBSoapPort
>   operation: {http://myCompany.com}GetFeature
>   in: null
> ] for service: {http://myCompany.com/rajESBService}rajESBSoapPort and
> interface: null</faultstring>
>       </soap:Fault>
>    </soap:Body>
> </soap:Envelope>
> 
> I am sure I have not configured it right.
> Could some one please point me to right direction.
> Appreciate your help.
> 
> 

-- 
View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23763985.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF-BC and camel combination issue

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


Ah, it looks like you have run into a bit of a catch with Camel.
Let's take a look at the process method you added in your route.  When
the Exchange arrives, it only has an In message and no Out message.
Next, when you do the exchange.getOut().setHeader(...), you implicitly
create an empty Out message and set the header on there.
Unfortunately, once the route continues it will pick this empty Out
message with the one header in it and forward that to the next hop.
That's why you're seeing the InOut[ ... in: null] in your logging,
causing the NullPointerException.

If you want to use a Processor, you should either copy the body (and
potentially headers and attachment)  of the In message into the Out
message or alternatively (and probably simpler) add the header to the
In message instead.  You could also use the setHeader() DSL method
instead of the Processor and that would avoid this pitfall for you.


Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/5/28 Rajesh_lakhotia <la...@gmail.com>:
>
> That worked.Thanks. But now ran into new problem.
> Now CXF provider is giving this error :
>
> ERROR - CxfBcComponent                 - Error processing exchange InOut[
>  id: ID:172.25.237.64-12188adf4ec-3:4
>  status: Active
>  role: provider
>  service: {http://xxxx/wsdl}rajEsbService
>  endpoint: rajEsbSoapPort
>  operation: {http://xxxxx/wsdl}GetFeature
>  in: null
> ]
> java.lang.NullPointerException
>        at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:418)
>        at
> org.apache.servicemix.cxfbc.CxfBcProvider.convertMessageToInputStream(CxfBcProvider.java:571)
>        at
> org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:208)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
>        at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
>        at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
>        at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
>        at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
>        at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
>        at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>        at java.lang.Thread.run(Thread.java:595)
>
>
> I am passing a correct message as it works when passed to service directly.
>
>
> I have another problem with headers and cxf consumer , will post in separate
> thread. :(
>
>
> Gert Vanthienen wrote:
>>
>> L..S.,
>>
>> The only problem I see in your code is the to() uri in the Camel
>> route.  I think the URI should be
>> jbi:endpoint:http://myCompany.com/rajESBService/rajESBSoapPort.  That
>> would send the exchange to an endpoint named 'rajESBSoapPort' in a
>> service called 'rajESBService' in the given namespace.
>>
>> If your URI starts with jbi:endpoint:..., the final element in the URI
>> is the endpoint name.  If
>> you look at the error message, you will notice that it is trying to
>> route to {http://myCompany.com/rajESBService}rajESBSoapPort, so it
>> took the last element of the URI, rajESBSoapPort, as the service name
>> instead of as the endpoint name because the URI starts with
>> jbi:service...
>>
>> Regards,
>>
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>>
>>>
>>>
>>> 2009/5/28 Rajesh_lakhotia <la...@gmail.com>:
>>>>
>>>> Hi,
>>>> My camel configuration is unable to route to CXF-BC provider.
>>>> Here is the set up ...
>>>> CXF_BC provider configuration ....
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>                xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>>           xmlns:ns1="http://myCompany.com"
>>>>           xmlns:myns="http://myNameSpace/servicemix/1.0"
>>>>       xmlns="http://www.springframework.org/schema/beans"
>>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
>>>> http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
>>>>       http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>
>>>> <cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
>>>>                    service="ns1:rajESBService"
>>>>                                        endpoint="rajESBSoapPort">
>>>>
>>>> </beans>
>>>>
>>>> </cxfbc:provider>
>>>>
>>>> WSDL service name and port name block ...
>>>> .....
>>>> .....
>>>>    <wsdl:service name="rajESBService">
>>>>        <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
>>>>            <wsdl:documentation>
>>>>                <wsi:Claim
>>>> conformsTo="http://ws-i.org/profiles/basic/1.0"
>>>> />
>>>>            </wsdl:documentation>
>>>>            <soap:address
>>>> location="http://localhost:8192/CamelServices/"/>
>>>>        </wsdl:port>
>>>>    </wsdl:service>
>>>> </wsdl:definitions>
>>>>
>>>> Camel router code ....
>>>>  // Routes based on expression evaluation
>>>>
>>>> from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
>>>>                  .process(new Processor() {
>>>>                          public void process(Exchange exchange) {
>>>>
>>>>  exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri"
>>>> , "http://myCompany.com/CONTEXTROOT/services/rajESBService");
>>>>                      }
>>>>
>>>>  }).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");
>>>>
>>>>
>>>> I could see the message being logged as so its coming to camel piece and
>>>> logging it but then it errors out with
>>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>>   <soap:Body>
>>>>      <soap:Fault>
>>>>         <faultcode>soap:Server</faultcode>
>>>>         <faultstring>javax.jbi.messaging.MessagingException: Could not
>>>> find
>>>> route for exchange: InOut[
>>>>  id: ID:172.25.237.64-121877ebe8f-9:0
>>>>  status: Active
>>>>  role: provider
>>>>  service: {http://myCompany.com/rajESBService}rajESBSoapPort
>>>>  operation: {http://myCompany.com}GetFeature
>>>>  in: null
>>>> ] for service:   and
>>>> interface: null</faultstring>
>>>>      </soap:Fault>
>>>>   </soap:Body>
>>>> </soap:Envelope>
>>>>
>>>> I am sure I have not configured it right.
>>>> Could some one please point me to right direction.
>>>> Appreciate your help.
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23762489.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>
>>
>> -----
>> ---
>> Gert Vanthienen
>> http://gertvanthienen.blogspot.com
>>
>
> --
> View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23768493.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: CXF-BC and camel combination issue

Posted by Rajesh_lakhotia <la...@gmail.com>.
That worked.Thanks. But now ran into new problem.
Now CXF provider is giving this error :

ERROR - CxfBcComponent                 - Error processing exchange InOut[
  id: ID:172.25.237.64-12188adf4ec-3:4
  status: Active
  role: provider
  service: {http://xxxx/wsdl}rajEsbService
  endpoint: rajEsbSoapPort
  operation: {http://xxxxx/wsdl}GetFeature
  in: null
]
java.lang.NullPointerException
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:418)
        at
org.apache.servicemix.cxfbc.CxfBcProvider.convertMessageToInputStream(CxfBcProvider.java:571)
        at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:208)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)


I am passing a correct message as it works when passed to service directly.


I have another problem with headers and cxf consumer , will post in separate
thread. :(


Gert Vanthienen wrote:
> 
> L..S.,
> 
> The only problem I see in your code is the to() uri in the Camel
> route.  I think the URI should be
> jbi:endpoint:http://myCompany.com/rajESBService/rajESBSoapPort.  That
> would send the exchange to an endpoint named 'rajESBSoapPort' in a
> service called 'rajESBService' in the given namespace.
> 
> If your URI starts with jbi:endpoint:..., the final element in the URI
> is the endpoint name.  If
> you look at the error message, you will notice that it is trying to
> route to {http://myCompany.com/rajESBService}rajESBSoapPort, so it
> took the last element of the URI, rajESBSoapPort, as the service name
> instead of as the endpoint name because the URI starts with
> jbi:service...
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>>
>> 2009/5/28 Rajesh_lakhotia <la...@gmail.com>:
>>>
>>> Hi,
>>> My camel configuration is unable to route to CXF-BC provider.
>>> Here is the set up ...
>>> CXF_BC provider configuration ....
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>                xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>>           xmlns:ns1="http://myCompany.com"
>>>           xmlns:myns="http://myNameSpace/servicemix/1.0"
>>>       xmlns="http://www.springframework.org/schema/beans"
>>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
>>> http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
>>>       http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>
>>> <cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
>>>                    service="ns1:rajESBService"
>>>                                        endpoint="rajESBSoapPort">
>>>
>>> </beans>
>>>
>>> </cxfbc:provider>
>>>
>>> WSDL service name and port name block ...
>>> .....
>>> .....
>>>    <wsdl:service name="rajESBService">
>>>        <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
>>>            <wsdl:documentation>
>>>                <wsi:Claim
>>> conformsTo="http://ws-i.org/profiles/basic/1.0"
>>> />
>>>            </wsdl:documentation>
>>>            <soap:address
>>> location="http://localhost:8192/CamelServices/"/>
>>>        </wsdl:port>
>>>    </wsdl:service>
>>> </wsdl:definitions>
>>>
>>> Camel router code ....
>>>  // Routes based on expression evaluation
>>>
>>> from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
>>>                  .process(new Processor() {
>>>                          public void process(Exchange exchange) {
>>>                              
>>>  exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri"
>>> , "http://myCompany.com/CONTEXTROOT/services/rajESBService");
>>>                      }
>>>                      
>>>  }).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");
>>>
>>>
>>> I could see the message being logged as so its coming to camel piece and
>>> logging it but then it errors out with
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>   <soap:Body>
>>>      <soap:Fault>
>>>         <faultcode>soap:Server</faultcode>
>>>         <faultstring>javax.jbi.messaging.MessagingException: Could not
>>> find
>>> route for exchange: InOut[
>>>  id: ID:172.25.237.64-121877ebe8f-9:0
>>>  status: Active
>>>  role: provider
>>>  service: {http://myCompany.com/rajESBService}rajESBSoapPort
>>>  operation: {http://myCompany.com}GetFeature
>>>  in: null
>>> ] for service:   and
>>> interface: null</faultstring>
>>>      </soap:Fault>
>>>   </soap:Body>
>>> </soap:Envelope>
>>>
>>> I am sure I have not configured it right.
>>> Could some one please point me to right direction.
>>> Appreciate your help.
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23762489.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23768493.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF-BC and camel combination issue

Posted by Gert Vanthienen <ge...@gmail.com>.
L..S.,

The only problem I see in your code is the to() uri in the Camel
route.  I think the URI should be
jbi:endpoint:http://myCompany.com/rajESBService/rajESBSoapPort.  That
would send the exchange to an endpoint named 'rajESBSoapPort' in a
service called 'rajESBService' in the given namespace.

If your URI starts with jbi:endpoint:..., the final element in the URI
is the endpoint name.  If
you look at the error message, you will notice that it is trying to
route to {http://myCompany.com/rajESBService}rajESBSoapPort, so it
took the last element of the URI, rajESBSoapPort, as the service name
instead of as the endpoint name because the URI starts with
jbi:service...

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/5/28 Gert Vanthienen <ge...@gmail.com>:
> L..S.,
>
> The only problem I see in your code is the to() uri in the Camel
> route.  I think the URI should be
> jbi:endpoint:http://myCompany.com/rajESBService/rajESBSoapPort.  That
> would send the exchange to an endpoint named 'rajESBSoapPort' in a
> service called 'rajESBService' in the given namespace.
>
> If your URI starts with jbi:endpoint:..., the final element in the URI
> is the endpoint name.  However, if you start the URI starts with
> jbi:service:..., the final element of the URI is the service name.  If
> you look at the error message, you will notice that the
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/5/28 Rajesh_lakhotia <la...@gmail.com>:
>>
>> Hi,
>> My camel configuration is unable to route to CXF-BC provider.
>> Here is the set up ...
>> CXF_BC provider configuration ....
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>                xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>>           xmlns:ns1="http://myCompany.com"
>>           xmlns:myns="http://myNameSpace/servicemix/1.0"
>>       xmlns="http://www.springframework.org/schema/beans"
>>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
>> http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
>>       http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>> <cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
>>                    service="ns1:rajESBService"
>>                                        endpoint="rajESBSoapPort">
>>
>> </beans>
>>
>> </cxfbc:provider>
>>
>> WSDL service name and port name block ...
>> .....
>> .....
>>    <wsdl:service name="rajESBService">
>>        <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
>>            <wsdl:documentation>
>>                <wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0"
>> />
>>            </wsdl:documentation>
>>            <soap:address location="http://localhost:8192/CamelServices/"/>
>>        </wsdl:port>
>>    </wsdl:service>
>> </wsdl:definitions>
>>
>> Camel router code ....
>>  // Routes based on expression evaluation
>>
>> from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
>>                  .process(new Processor() {
>>                          public void process(Exchange exchange) {
>>                                exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri"
>> , "http://myCompany.com/CONTEXTROOT/services/rajESBService");
>>                      }
>>                        }).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");
>>
>>
>> I could see the message being logged as so its coming to camel piece and
>> logging it but then it errors out with
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>   <soap:Body>
>>      <soap:Fault>
>>         <faultcode>soap:Server</faultcode>
>>         <faultstring>javax.jbi.messaging.MessagingException: Could not find
>> route for exchange: InOut[
>>  id: ID:172.25.237.64-121877ebe8f-9:0
>>  status: Active
>>  role: provider
>>  service: {http://myCompany.com/rajESBService}rajESBSoapPort
>>  operation: {http://myCompany.com}GetFeature
>>  in: null
>> ] for service:   and
>> interface: null</faultstring>
>>      </soap:Fault>
>>   </soap:Body>
>> </soap:Envelope>
>>
>> I am sure I have not configured it right.
>> Could some one please point me to right direction.
>> Appreciate your help.
>>
>> --
>> View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23762489.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>

Re: CXF-BC and camel combination issue

Posted by Gert Vanthienen <ge...@gmail.com>.
L..S.,

The only problem I see in your code is the to() uri in the Camel
route.  I think the URI should be
jbi:endpoint:http://myCompany.com/rajESBService/rajESBSoapPort.  That
would send the exchange to an endpoint named 'rajESBSoapPort' in a
service called 'rajESBService' in the given namespace.

If your URI starts with jbi:endpoint:..., the final element in the URI
is the endpoint name.  However, if you start the URI starts with
jbi:service:..., the final element of the URI is the service name.  If
you look at the error message, you will notice that the

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/5/28 Rajesh_lakhotia <la...@gmail.com>:
>
> Hi,
> My camel configuration is unable to route to CXF-BC provider.
> Here is the set up ...
> CXF_BC provider configuration ....
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>                xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>           xmlns:ns1="http://myCompany.com"
>           xmlns:myns="http://myNameSpace/servicemix/1.0"
>       xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>       xsi:schemaLocation="http://servicemix.apache.org/http/1.0
> http://servicemix.apache.org/schema/servicemix-cxf-bc-3.2.3.xsd
>       http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
> <cxfbc:provider wsdl="classpath:raj/raj-services.wsdl"
>                    service="ns1:rajESBService"
>                                        endpoint="rajESBSoapPort">
>
> </beans>
>
> </cxfbc:provider>
>
> WSDL service name and port name block ...
> .....
> .....
>    <wsdl:service name="rajESBService">
>        <wsdl:port name="rajESBSoapPort" binding="tns:rajESBPortBinding">
>            <wsdl:documentation>
>                <wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0"
> />
>            </wsdl:documentation>
>            <soap:address location="http://localhost:8192/CamelServices/"/>
>        </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
>
> Camel router code ....
>  // Routes based on expression evaluation
>
> from("jbi:service:http://myNameSpace/servicemix/1.0/CamelEsbService").to("log:Example")
>                  .process(new Processor() {
>                          public void process(Exchange exchange) {
>                                exchange.getOut().setHeader("org.apache.servicemix.http.destination.uri"
> , "http://myCompany.com/CONTEXTROOT/services/rajESBService");
>                      }
>                        }).to("jbi:service:http://myCompany.com/rajESBService/rajESBSoapPort");
>
>
> I could see the message being logged as so its coming to camel piece and
> logging it but then it errors out with
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>      <soap:Fault>
>         <faultcode>soap:Server</faultcode>
>         <faultstring>javax.jbi.messaging.MessagingException: Could not find
> route for exchange: InOut[
>  id: ID:172.25.237.64-121877ebe8f-9:0
>  status: Active
>  role: provider
>  service: {http://myCompany.com/rajESBService}rajESBSoapPort
>  operation: {http://myCompany.com}GetFeature
>  in: null
> ] for service:   and
> interface: null</faultstring>
>      </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> I am sure I have not configured it right.
> Could some one please point me to right direction.
> Appreciate your help.
>
> --
> View this message in context: http://www.nabble.com/CXF-BC-and-camel-combination-issue-tp23762489p23762489.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>