You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Kumako22 <ku...@gmail.com> on 2009/10/20 09:21:18 UTC

servicemix-cxf-bc Redirect to ESB and then to service problem

Hello,
There is a problem.

I have to connect to ESB through servicemix-cxf-bc and then the ESB is going
to connect to my service and send something to that service. How should I
configure servicemix-cxf-bc xbean.xml ??

<cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
                      service="calculator:CalculatorService"
                      endpoint="CalculatorPort"
                      targetEndpoint="CalculatorPortProxy"
                      targetService="calculator:CalculatorService"
                      targetInterface="calculator:CalculatorPortType">
          
</cxfbc:consumer>

and

<cxfbc:provider wsdl="/wsdl/calculator.wsdl"
                      locationURI="http://localhost:9001/bridgetest"
                      service="calculator:CalculatorService"
                      endpoint="CalculatorPortProxy"
                      interfaceName="calculator:CalculatorPortType">

</cxfbc:provider>

The service is load from server.

MK.
-- 
View this message in context: http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc Redirect to ESB and then to service problem

Posted by Kumako22 <ku...@gmail.com>.
OK, so the idea should be like this:

1. There is external wsdl file on my server
2. The ESB is connecting to this wsdl
3. I'm connecting to esb to retreve wsdl through ESB

I've build cxf-bc service unit with xbean file like this:

<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0">


	<cxfbc:consumer wsdl="http://myserver.com/services/MyService?wsdl"
					service="MyService"
					locationURI="http://localhost:8193/MyService"
					endpoint="MyService"
                    targetEndpoint="MyService"
                    targetService="MyService">
					
	</cxfbc:consumer>
	
	<cxfbc:provider wsdl="http://myserver.com/services/MyService?wsdl"
                    service="MyService"
                    endpoint="MyService">

	</cxfbc:provider>

</beans>

Is something missing in my xbean.xml ??
What about if I don't have define name="" in wsdl file. 
service="name:MyService" ??
Am I missing xmlns??

And main question: How can I test it to see how it works??

MK



Kumako22 wrote:
> 
> Thanks!
> One more thing. What about wsdl="" tag??
> 
> MK
> 
> 
> Gert Vanthienen wrote:
>> 
>> L.S.,
>> 
>> In the <cxf:provider> element, you can choose the name of the endpoint
>> but you'll have to make sure that the service name and namespace are
>> matching the one defined in the external service's wsdl.
>> 
>> In the <cxf:consumer>, you'll need to add a locationURI attribute to
>> specifiy what URI ServiceMix will make the service available on.  You
>> can choose the endpoint name, but you have to make sure that the
>> targetService/targetEndpoint name match the service/endpoint name on
>> the <cxf:provider/> because you want the consumer to send the
>> information to the provider endpoint.
>> 
>> Regards,
>> 
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>> 
>> 
>> 
>> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>>
>>> Thank you very much! So i should do something like that:
>>>
>>>
>>> <beans xmlns:http="http://servicemix.apache.org/cxfbc/1.0">
>>>
>>>
>>>   <cxfbc:provider wsdl="calculator.wsdl"
>>>                   locationURI="http://localhost:9001/calculator"  <-
>>> where
>>> external wsdl is
>>>                   service="calculator:CalculatorService"
>>>                   endpoint="CalculatorPortProxy">    <-what here??
>>>
>>>    </cxfbc:provider>
>>>
>>>   <cxfbc:consumer wsdl="calculator.wsdl"
>>>                   service="calculator:CalculatorService"
>>>                   endpoint="CalculatorPort"                        
>>> <-what
>>> here??
>>>                   targetEndpoint="CalculatorPortProxy"          <-what
>>> here??
>>>                   targetService="calculator:CalculatorService">   <-what
>>> here??
>>>
>>>    </cxfbc:consumer>
>>>
>>>
>>>
>>> </beans>
>>>
>>>
>>> MK
>>>
>>>
>>>
>>> Gert Vanthienen wrote:
>>>>
>>>> MK,
>>>>
>>>> The <cxf:provider> is used to call an existing service from the ESB.
>>>> In the locationUri, you can specify the url where the external service
>>>> is available, the service name should match the external service name.
>>>>
>>>> To expose a webservice from the ESB, you need to define a
>>>> <cxf:consumer/> element, which allows you to define a locationUri and
>>>> the wsdl to expose.  With the target service/endpoint endpoint
>>>> attribute, you can refer to the <cxf:provider/> endpoint you created
>>>> earlier and that should do the trick.
>>>>
>>>> Regards,
>>>>
>>>> Gert Vanthienen
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>> Blog: http://gertvanthienen.blogspot.com/
>>>>
>>>>
>>>>
>>>> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>>>>
>>>>> Hello,
>>>>> There is a problem.
>>>>>
>>>>> I have to connect to ESB through servicemix-cxf-bc and then the ESB is
>>>>> going
>>>>> to connect to my service and send something to that service. How
>>>>> should I
>>>>> configure servicemix-cxf-bc xbean.xml ??
>>>>>
>>>>> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
>>>>>                      service="calculator:CalculatorService"
>>>>>                      endpoint="CalculatorPort"
>>>>>                      targetEndpoint="CalculatorPortProxy"
>>>>>                      targetService="calculator:CalculatorService"
>>>>>                      targetInterface="calculator:CalculatorPortType">
>>>>>
>>>>> </cxfbc:consumer>
>>>>>
>>>>> and
>>>>>
>>>>> <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
>>>>>                      locationURI="http://localhost:9001/bridgetest"
>>>>>                      service="calculator:CalculatorService"
>>>>>                      endpoint="CalculatorPortProxy"
>>>>>                      interfaceName="calculator:CalculatorPortType">
>>>>>
>>>>> </cxfbc:provider>
>>>>>
>>>>> The service is load from server.
>>>>>
>>>>> MK.
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25973656.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p26005410.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc Redirect to ESB and then to service problem

Posted by Kumako22 <ku...@gmail.com>.
Thanks!
One more thing. What about wsdl="" tag??

MK


Gert Vanthienen wrote:
> 
> L.S.,
> 
> In the <cxf:provider> element, you can choose the name of the endpoint
> but you'll have to make sure that the service name and namespace are
> matching the one defined in the external service's wsdl.
> 
> In the <cxf:consumer>, you'll need to add a locationURI attribute to
> specifiy what URI ServiceMix will make the service available on.  You
> can choose the endpoint name, but you have to make sure that the
> targetService/targetEndpoint name match the service/endpoint name on
> the <cxf:provider/> because you want the consumer to send the
> information to the provider endpoint.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>
>> Thank you very much! So i should do something like that:
>>
>>
>> <beans xmlns:http="http://servicemix.apache.org/cxfbc/1.0">
>>
>>
>>   <cxfbc:provider wsdl="calculator.wsdl"
>>                   locationURI="http://localhost:9001/calculator"  <-
>> where
>> external wsdl is
>>                   service="calculator:CalculatorService"
>>                   endpoint="CalculatorPortProxy">    <-what here??
>>
>>    </cxfbc:provider>
>>
>>   <cxfbc:consumer wsdl="calculator.wsdl"
>>                   service="calculator:CalculatorService"
>>                   endpoint="CalculatorPort"                        
>> <-what
>> here??
>>                   targetEndpoint="CalculatorPortProxy"          <-what
>> here??
>>                   targetService="calculator:CalculatorService">   <-what
>> here??
>>
>>    </cxfbc:consumer>
>>
>>
>>
>> </beans>
>>
>>
>> MK
>>
>>
>>
>> Gert Vanthienen wrote:
>>>
>>> MK,
>>>
>>> The <cxf:provider> is used to call an existing service from the ESB.
>>> In the locationUri, you can specify the url where the external service
>>> is available, the service name should match the external service name.
>>>
>>> To expose a webservice from the ESB, you need to define a
>>> <cxf:consumer/> element, which allows you to define a locationUri and
>>> the wsdl to expose.  With the target service/endpoint endpoint
>>> attribute, you can refer to the <cxf:provider/> endpoint you created
>>> earlier and that should do the trick.
>>>
>>> Regards,
>>>
>>> Gert Vanthienen
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>>
>>>
>>>
>>> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>>>
>>>> Hello,
>>>> There is a problem.
>>>>
>>>> I have to connect to ESB through servicemix-cxf-bc and then the ESB is
>>>> going
>>>> to connect to my service and send something to that service. How should
>>>> I
>>>> configure servicemix-cxf-bc xbean.xml ??
>>>>
>>>> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
>>>>                      service="calculator:CalculatorService"
>>>>                      endpoint="CalculatorPort"
>>>>                      targetEndpoint="CalculatorPortProxy"
>>>>                      targetService="calculator:CalculatorService"
>>>>                      targetInterface="calculator:CalculatorPortType">
>>>>
>>>> </cxfbc:consumer>
>>>>
>>>> and
>>>>
>>>> <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
>>>>                      locationURI="http://localhost:9001/bridgetest"
>>>>                      service="calculator:CalculatorService"
>>>>                      endpoint="CalculatorPortProxy"
>>>>                      interfaceName="calculator:CalculatorPortType">
>>>>
>>>> </cxfbc:provider>
>>>>
>>>> The service is load from server.
>>>>
>>>> MK.
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25973656.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25981850.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc Redirect to ESB and then to service problem

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

In the <cxf:provider> element, you can choose the name of the endpoint
but you'll have to make sure that the service name and namespace are
matching the one defined in the external service's wsdl.

In the <cxf:consumer>, you'll need to add a locationURI attribute to
specifiy what URI ServiceMix will make the service available on.  You
can choose the endpoint name, but you have to make sure that the
targetService/targetEndpoint name match the service/endpoint name on
the <cxf:provider/> because you want the consumer to send the
information to the provider endpoint.

Regards,

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



2009/10/20 Kumako22 <ku...@gmail.com>:
>
> Thank you very much! So i should do something like that:
>
>
> <beans xmlns:http="http://servicemix.apache.org/cxfbc/1.0">
>
>
>   <cxfbc:provider wsdl="calculator.wsdl"
>                   locationURI="http://localhost:9001/calculator"  <- where
> external wsdl is
>                   service="calculator:CalculatorService"
>                   endpoint="CalculatorPortProxy">    <-what here??
>
>    </cxfbc:provider>
>
>   <cxfbc:consumer wsdl="calculator.wsdl"
>                   service="calculator:CalculatorService"
>                   endpoint="CalculatorPort"                         <-what
> here??
>                   targetEndpoint="CalculatorPortProxy"          <-what
> here??
>                   targetService="calculator:CalculatorService">   <-what
> here??
>
>    </cxfbc:consumer>
>
>
>
> </beans>
>
>
> MK
>
>
>
> Gert Vanthienen wrote:
>>
>> MK,
>>
>> The <cxf:provider> is used to call an existing service from the ESB.
>> In the locationUri, you can specify the url where the external service
>> is available, the service name should match the external service name.
>>
>> To expose a webservice from the ESB, you need to define a
>> <cxf:consumer/> element, which allows you to define a locationUri and
>> the wsdl to expose.  With the target service/endpoint endpoint
>> attribute, you can refer to the <cxf:provider/> endpoint you created
>> earlier and that should do the trick.
>>
>> Regards,
>>
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>>
>> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>>
>>> Hello,
>>> There is a problem.
>>>
>>> I have to connect to ESB through servicemix-cxf-bc and then the ESB is
>>> going
>>> to connect to my service and send something to that service. How should I
>>> configure servicemix-cxf-bc xbean.xml ??
>>>
>>> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
>>>                      service="calculator:CalculatorService"
>>>                      endpoint="CalculatorPort"
>>>                      targetEndpoint="CalculatorPortProxy"
>>>                      targetService="calculator:CalculatorService"
>>>                      targetInterface="calculator:CalculatorPortType">
>>>
>>> </cxfbc:consumer>
>>>
>>> and
>>>
>>> <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
>>>                      locationURI="http://localhost:9001/bridgetest"
>>>                      service="calculator:CalculatorService"
>>>                      endpoint="CalculatorPortProxy"
>>>                      interfaceName="calculator:CalculatorPortType">
>>>
>>> </cxfbc:provider>
>>>
>>> The service is load from server.
>>>
>>> MK.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25973656.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: servicemix-cxf-bc Redirect to ESB and then to service problem

Posted by Kumako22 <ku...@gmail.com>.
Thank you very much! So i should do something like that:


<beans xmlns:http="http://servicemix.apache.org/cxfbc/1.0">
   
   
   <cxfbc:provider wsdl="calculator.wsdl"
                   locationURI="http://localhost:9001/calculator"  <- where
external wsdl is
                   service="calculator:CalculatorService"
                   endpoint="CalculatorPortProxy">    <-what here??

    </cxfbc:provider>

   <cxfbc:consumer wsdl="calculator.wsdl"
                   service="calculator:CalculatorService"
                   endpoint="CalculatorPort"                         <-what
here??
                   targetEndpoint="CalculatorPortProxy"          <-what
here??
                   targetService="calculator:CalculatorService">   <-what
here??
          
    </cxfbc:consumer>

   
   
</beans>


MK



Gert Vanthienen wrote:
> 
> MK,
> 
> The <cxf:provider> is used to call an existing service from the ESB.
> In the locationUri, you can specify the url where the external service
> is available, the service name should match the external service name.
> 
> To expose a webservice from the ESB, you need to define a
> <cxf:consumer/> element, which allows you to define a locationUri and
> the wsdl to expose.  With the target service/endpoint endpoint
> attribute, you can refer to the <cxf:provider/> endpoint you created
> earlier and that should do the trick.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/10/20 Kumako22 <ku...@gmail.com>:
>>
>> Hello,
>> There is a problem.
>>
>> I have to connect to ESB through servicemix-cxf-bc and then the ESB is
>> going
>> to connect to my service and send something to that service. How should I
>> configure servicemix-cxf-bc xbean.xml ??
>>
>> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
>>                      service="calculator:CalculatorService"
>>                      endpoint="CalculatorPort"
>>                      targetEndpoint="CalculatorPortProxy"
>>                      targetService="calculator:CalculatorService"
>>                      targetInterface="calculator:CalculatorPortType">
>>
>> </cxfbc:consumer>
>>
>> and
>>
>> <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
>>                      locationURI="http://localhost:9001/bridgetest"
>>                      service="calculator:CalculatorService"
>>                      endpoint="CalculatorPortProxy"
>>                      interfaceName="calculator:CalculatorPortType">
>>
>> </cxfbc:provider>
>>
>> The service is load from server.
>>
>> MK.
>> --
>> View this message in context:
>> http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.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/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25973656.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-cxf-bc Redirect to ESB and then to service problem

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

The <cxf:provider> is used to call an existing service from the ESB.
In the locationUri, you can specify the url where the external service
is available, the service name should match the external service name.

To expose a webservice from the ESB, you need to define a
<cxf:consumer/> element, which allows you to define a locationUri and
the wsdl to expose.  With the target service/endpoint endpoint
attribute, you can refer to the <cxf:provider/> endpoint you created
earlier and that should do the trick.

Regards,

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



2009/10/20 Kumako22 <ku...@gmail.com>:
>
> Hello,
> There is a problem.
>
> I have to connect to ESB through servicemix-cxf-bc and then the ESB is going
> to connect to my service and send something to that service. How should I
> configure servicemix-cxf-bc xbean.xml ??
>
> <cxfbc:consumer wsdl="/wsdl/calculator.wsdl"
>                      service="calculator:CalculatorService"
>                      endpoint="CalculatorPort"
>                      targetEndpoint="CalculatorPortProxy"
>                      targetService="calculator:CalculatorService"
>                      targetInterface="calculator:CalculatorPortType">
>
> </cxfbc:consumer>
>
> and
>
> <cxfbc:provider wsdl="/wsdl/calculator.wsdl"
>                      locationURI="http://localhost:9001/bridgetest"
>                      service="calculator:CalculatorService"
>                      endpoint="CalculatorPortProxy"
>                      interfaceName="calculator:CalculatorPortType">
>
> </cxfbc:provider>
>
> The service is load from server.
>
> MK.
> --
> View this message in context: http://www.nabble.com/servicemix-cxf-bc-Redirect-to-ESB-and-then-to-service-problem-tp25970764p25970764.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>