You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by PrakashT <Pr...@infosys.com> on 2006/12/13 11:08:11 UTC

How to bind multiple providers in servicemix.xml

Hi All, 

I'm new to Servicemix sea. I'm tried to bind more than one providers with
one consumer in servicemix.xml file by using http-binding, but i'm not able
to get the proper response. 

Can u tell me how to use more than one providers in servicemix.xml?.... or
any other way?... or existing messages? 

Here i'm using servicemix snapshot version
(incubating-servicemix-3.0-SNAPSHOT). 


Thanks,
Prakash T. 


-- 
View this message in context: http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7850179
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to bind multiple providers in servicemix.xml

Posted by Guillaume Nodet <gn...@gmail.com>.
If I understand you, you just need to route messages coming from
your http consumer endpoint to different providers.  You can use
an EIP router for that [1], or any kind of routing (drools, hand written ...)

[1] http://servicemix.goopen.org/site/servicemix-eip.html#servicemix-eip-ContentBasedrouter

On 12/14/06, PrakashT <Pr...@infosys.com> wrote:
>
> Thanks for ur response.
>
> I'm using servicemix-http component for accessing webservices running in
> tomcat server.
>
> This below code(plz find enclosed servicemix.xml file) works for accessing
> signle webservice, but i have lot of webservices with different urls like
> http://localhost:8082/genericws/services/Service1?WSDL,
> http://localhost:8082/genericws/services/Service2?WSDL... etc.,
>
> My question was how to bind multiple providers (means webservices) to one
> consumer component (i.e., http://localhost:8081/services/AxisService/).
>
>
> I hope u can grasp from this... or plz let me know.
>
> ----------------------------------------------servicemix.xml-----------------------------------------------------
>
> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"
>         xmlns:eip="http://servicemix.apache.org/eip/1.0"
>         xmlns:http="http://servicemix.apache.org/http/1.0"
>         xmlns:ns1="http://www.xyz.com/xyz"
>         xmlns:ns2="http://xfire.webservice.namespace"
>         xmlns:myns="http://myNameSpace/servicemix/1.0">
>
>     <classpath>
>         <location>.</location>
>     </classpath>
>
>     <sm:serviceunit id="jbi">
>        <sm:activationSpecs>
>             <sm:activationSpec componentName="consumer">
>                     <sm:component>
>                          <http:component>
>                               <http:endpoints>
>                                     <http:endpoint
> service="ns1:MyConsumerService"
>                                                    endpoint="myConsumer"
>                                                    role="consumer"
>
> targetService="ns1:Service1"
>
> locationURI="http://localhost:8081/services/AxisService/"
>                                                    soap="true"
>
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>
>                                     <http:endpoint service="ns1:Service1"
>                                                    endpoint="Service1"
>                                                    role="provider"
>
> locationURI="http://localhost:8082/genericws/services/Service1"
>                                                    soap="true"
>
> wsdlResource="http://localhost:8082/genericws/services/Service1?WSDL" />
>
>                                     <http:endpoint service="ns1:Service2"
>                                                    endpoint="Service2"
>                                                    role="provider"
>
> locationURI="http://localhost:8082/genericws/services/Service2"
>                                                    soap="true"
>
> wsdlResource="http://localhost:8082/genericws/services/Service2?WSDL" />
>                               </http:endpoints>
>                          </http:component>
>                     </sm:component>
>             </sm:activationSpec>
>          </sm:activationSpecs>
>     </sm:serviceunit>
> </beans>
>
> -------------------------------------------------------------------------------------------------------------------
>
>
>
>
> gnodet wrote:
> >
> > Could you please explain a bit more what you are trying to
> > achieve ? What do you mean by "bind more than one providers with
> > one consumer" ?
> >
> > On 12/13/06, PrakashT <Pr...@infosys.com> wrote:
> >>
> >> Hi All,
> >>
> >> I'm new to Servicemix sea. I'm tried to bind more than one providers with
> >> one consumer in servicemix.xml file by using http-binding, but i'm not
> >> able
> >> to get the proper response.
> >>
> >> Can u tell me how to use more than one providers in servicemix.xml?....
> >> or
> >> any other way?... or existing messages?
> >>
> >> Here i'm using servicemix snapshot version
> >> (incubating-servicemix-3.0-SNAPSHOT).
> >>
> >>
> >> Thanks,
> >> Prakash T.
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7850179
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7866308
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: How to bind multiple providers in servicemix.xml

Posted by PrakashT <Pr...@infosys.com>.
Thanks for ur response.

I'm using servicemix-http component for accessing webservices running in
tomcat server. 

This below code(plz find enclosed servicemix.xml file) works for accessing
signle webservice, but i have lot of webservices with different urls like
http://localhost:8082/genericws/services/Service1?WSDL,
http://localhost:8082/genericws/services/Service2?WSDL... etc., 

My question was how to bind multiple providers (means webservices) to one
consumer component (i.e., http://localhost:8081/services/AxisService/).  


I hope u can grasp from this... or plz let me know.

----------------------------------------------servicemix.xml-----------------------------------------------------

<beans xmlns:sm="http://servicemix.apache.org/config/1.0" 
        xmlns:eip="http://servicemix.apache.org/eip/1.0" 
        xmlns:http="http://servicemix.apache.org/http/1.0" 
        xmlns:ns1="http://www.xyz.com/xyz" 
        xmlns:ns2="http://xfire.webservice.namespace" 
        xmlns:myns="http://myNameSpace/servicemix/1.0"> 

    <classpath>
        <location>.</location>
    </classpath>
    
    <sm:serviceunit id="jbi">
       <sm:activationSpecs> 
            <sm:activationSpec componentName="consumer"> 
                    <sm:component> 
                         <http:component> 
                              <http:endpoints> 
                                    <http:endpoint
service="ns1:MyConsumerService"
                                                   endpoint="myConsumer"
                                                   role="consumer" 
                                                  
targetService="ns1:Service1"  
                                                  
locationURI="http://localhost:8081/services/AxisService/" 
                                                   soap="true" 
                                                  
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
                                        
                                    <http:endpoint service="ns1:Service1"
                                                   endpoint="Service1"
                                                   role="provider" 
                                                  
locationURI="http://localhost:8082/genericws/services/Service1" 
                                                   soap="true" 
                                                  
wsdlResource="http://localhost:8082/genericws/services/Service1?WSDL" />

                                    <http:endpoint service="ns1:Service2"
                                                   endpoint="Service2"
                                                   role="provider" 
                                                  
locationURI="http://localhost:8082/genericws/services/Service2" 
                                                   soap="true" 
                                                  
wsdlResource="http://localhost:8082/genericws/services/Service2?WSDL" />
                              </http:endpoints> 
                         </http:component> 
                    </sm:component> 
            </sm:activationSpec> 
         </sm:activationSpecs> 
    </sm:serviceunit>
</beans> 

-------------------------------------------------------------------------------------------------------------------




gnodet wrote:
> 
> Could you please explain a bit more what you are trying to
> achieve ? What do you mean by "bind more than one providers with
> one consumer" ?
> 
> On 12/13/06, PrakashT <Pr...@infosys.com> wrote:
>>
>> Hi All,
>>
>> I'm new to Servicemix sea. I'm tried to bind more than one providers with
>> one consumer in servicemix.xml file by using http-binding, but i'm not
>> able
>> to get the proper response.
>>
>> Can u tell me how to use more than one providers in servicemix.xml?....
>> or
>> any other way?... or existing messages?
>>
>> Here i'm using servicemix snapshot version
>> (incubating-servicemix-3.0-SNAPSHOT).
>>
>>
>> Thanks,
>> Prakash T.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7850179
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7866308
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to bind multiple providers in servicemix.xml

Posted by Guillaume Nodet <gn...@gmail.com>.
Could you please explain a bit more what you are trying to
achieve ? What do you mean by "bind more than one providers with
one consumer" ?

On 12/13/06, PrakashT <Pr...@infosys.com> wrote:
>
> Hi All,
>
> I'm new to Servicemix sea. I'm tried to bind more than one providers with
> one consumer in servicemix.xml file by using http-binding, but i'm not able
> to get the proper response.
>
> Can u tell me how to use more than one providers in servicemix.xml?.... or
> any other way?... or existing messages?
>
> Here i'm using servicemix snapshot version
> (incubating-servicemix-3.0-SNAPSHOT).
>
>
> Thanks,
> Prakash T.
>
>
> --
> View this message in context: http://www.nabble.com/How-to-bind-multiple-providers-in-servicemix.xml-tf2813079s12049.html#a7850179
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet