Thanks Freeman,

Got it working without duplicate endpoints.

In BC I added targetEndpoint:

<cxfbc:consumer wsdl="classpath:wsdl/person.wsdl"
targetInterface="person:Person" targetService="person:PersonService"
targetEndpoint="CamelRoute" useJBIWrapper="false"
useSOAPEnvelope="false" />

In Camel I got:

<from 
uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonService/CamelRoute"/>

in nmr:list I got:

{http://servicemix.apache.org/samples/wsdl-first}PersonService:PersonImplPort
(SE)
{http://servicemix.apache.org/samples/wsdl-first}PersonService:soap (BC)
{http://servicemix.apache.org/samples/wsdl-first}PersonService:CamelRoute
(Camel)

thanks,
Łukasz

On 8 June 2010 09:39, Freeman Fang <[email protected]> wrote:
>
> On 2010-6-8, at 下午3:33, Freeman Fang wrote:
>
>> Hi,
>>
>> My comment inline.
>> On 2010-6-8, at 下午3:21, Łukasz Budnik wrote:
>>
>>> Hi Freeman,
>>>
>>> I restarted both CXF BC and SE units, when I test it with soapUI Camel
>>> got called and in nmr:list I saw:
>>>
>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
>>>
>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:PersonImplPort
>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
>>>
>>> {http://camel.apache.org/schema/jbi}provider:ID:91.94.149.51-12916050960-1:0
>>>
>>> When it comes to my configuration I used Fuse archetypes for osgi
>>> components.
>>>
>>> I first created BC and SE. It worked like a charm. Then I decided to
>>> introduce Camel between them.
>>>
>>> in BC I have:
>>>
>>> <cxfbc:consumer wsdl="classpath:wsdl/person.wsdl"
>>> targetInterface="person:Person" targetService="person:PersonService"
>>> useJBIWrapper="false" useSOAPEnvelope="false">
>>> </cxfbc:consumer>
>>>
>>> person:PersonService is CXF SE endpoint...
>>
>> Well, when you insert camel router between cxf bc and se, you should
>> ensure the targetService/targetEndpoint of cxfbc is the one used as from uri
>> for camel router(so that the message could be sent to camel router).
>> Also you need ensure cxf bc endpoint name is different with
>> targetEndpoint.
>>
>> Freeman
>
> The key point is that you should ensure the endpoint name used for cxf se
> and camel from uri is different, and specify cxf bc targetEndpoint as the
> one used for camel from uri.
>
> Freeman
>>>
>>> But when Camel unit gets started first it works as expected BC ->
>>> Camel -> SE. If BC gets started first it routes SOAP messages directly
>>> to CXF SE. Startup order is important here - and I know it's wrong.
>>> That is why I'm asking if there a better approach for this.
>>>
>>> thanks,
>>> Łukasz
>>>
>>>
>>> On 8 June 2010 09:00, Freeman Fang <[email protected]> wrote:
>>>>
>>>> On 2010-6-8, at 下午2:52, Łukasz Budnik wrote:
>>>>
>>>>> Hi SM users,
>>>>>
>>>>> I want to create a simple flow: CXF BC -> Camel -> CXF SE
>>>>>
>>>>> I wrote something like that:
>>>>>
>>>>> <osgi:camelContext xmlns="http://camel.apache.org/schema/spring";>
>>>>>       <route id="order-processing-route">
>>>>>               <from
>>>>>
>>>>> uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonService/soap"/>
>>>>>               <convertBodyTo type="org.w3c.dom.Document"/>
>>>>>               <bean ref="myTransform" method="transform" />
>>>>>               <to uri="log:TransformedInput" />
>>>>>               <to
>>>>>
>>>>> uri="jbi:endpoint:http://servicemix.apache.org/samples/wsdl-first/PersonService/PersonImplPort"/>
>>>>>               <to uri="log:Output" />
>>>>>       </route>
>>>>> </osgi:camelContext>
>>>>>
>>>>> where
>>>>> http://servicemix.apache.org/samples/wsdl-first/PersonService/soap
>>>>> is BC and
>>>>>
>>>>> http://servicemix.apache.org/samples/wsdl-first/PersonService/PersonImplPort
>>>>> is SE.
>>>>>
>>>> Hi,
>>>>
>>>> I can't understand
>>>>  http://servicemix.apache.org/samples/wsdl-first/PersonService/soap is
>>>> bc
>>>> endpoint, IMHO it should be target of cxf bc endpoint.
>>>>
>>>> Freeman
>>>>
>>>>> After I deployed it to SM 4 (in fact it's FUSE ESB 4.2) in nmr:list I
>>>>> saw that camel exported a second PersonService:soap endpoint:
>>>>>
>>>>>
>>>>>
>>>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:PersonImplPort
>>>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
>>>>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
>>>>>
>>>>> After I tested my BC with soapUI, Camel route was executed, I also saw
>>>>> in nmr:list a new endpoint, it was some kind of random-unique camel
>>>>> route id.
>>>>>
>>>>> Most surprisingly it worked yesterday, but does not work today. So
>>>>> there has to be something wrong with my approach :)
>>>>>
>>>>> What is the best approach for this?
>>>>>
>>>>> thanks,
>>>>> Łukasz
>>>>
>>>>
>>>> --
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>
>>
>> --
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>

Reply via email to