You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jb...@nanthrax.net on 2009/03/19 16:57:24 UTC

Re: how to use http:soap-consumer and http:soap-provider with single wsdl

Hi,

Can you try to setup like this :

<http:soap-consumer service="loes:LOEventService"
                    endpoint="consumer"
                    wsdl="classpath:LOEventService.wsdl"
                    locationURI="http://localhost:8193/loes/"
                    targetService="loes:LOEventService"
                    targetEndpoint="provider"
                    useJbiWrapper="true"
                    validateWsdl="false"/>

<http:soap-provider service="loes:LOEventService"
                    endpoint="provider"
                    locationURI="http://localhost:1278/bluebox-web/services/LOEventService"
                    wsdl="classpath:LOEventService.wsdl"
                    useJbiWrapper="true"/>

With this configuration, all incoming soap envelopers to the consumer will be forwarded to the provider endpoint URI.

Regards
JB

On Thursday 19 March 2009 - 04:09, Milan Satala wrote:
> 
> I need servicemix to expose a webservice and route incoming messages to
> actual provider. The problem is that both http:soap-consumer and
> http:soap-provider forces me to use the same service and endpoint name as
> the wsdl.
> This naturally leads to following exception:
> javax.jbi.management.DeploymentException: More than one endpoint found in
> the SU for key:
> {http://www.prolixproject.org/loes}LOEventService:LOEventServiceSoap
> 
> Is there a way to route messages using a single wsdl?
> 
> Here's my xbean.xml:
> <http:soap-consumer service="loes:LOEventService"
>         endpoint="LOEventServiceSoap"
>         wsdl="classpath:LOEventService.wsdl"
>         locationURI="http://localhost:8193/loes/"             
>         targetService="loes:LOEventService"
>         targetEndpoint="LOEventServiceSoap"
>         useJbiWrapper="true"
>         validateWsdl="false"                          
>         />             
> 
> <http:soap-provider service="loes:LOEventService"
> 	locationURI="http://localhost:1278/bluebox-web/services/LOEventService"
> 	endpoint="LOEventServiceSoap"
> 	wsdl="classpath:LOEventService.wsdl"
>        useJbiWrapper="true"				
> 	/> 
> -- 
> View this message in context: http://www.nabble.com/how-to-use-http%3Asoap-consumer-and-http%3Asoap-provider-with-single-wsdl-tp22597992p22597992.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 

Re: how to use http:soap-consumer and http:soap-provider with single wsdl

Posted by Milan Satala <mi...@gmail.com>.
Thank you for your suggestion. It didn't really solve my problem but it gave
me an idea for a workaround.
You suggested using two different endpoints but that means that the wsdl
would need to contain two different endpoints as well. We used "wsdl first"
and our wsdls contain just one endpoint. I don't really want to modify wsdls
at this point. However I can create another wsdl (e.g.
LOEventServiceProvider.wsdl) with a dummy endpoint and use it for
<http:soap-provider>.
It's not perfect but it works. 

PS: If there was a better way to do this I'd be happy to learn about it.


Jean-Baptiste Onofré wrote:
> 
> Hi,
> 
> Can you try to setup like this :
> 
> <http:soap-consumer service="loes:LOEventService"
>                     endpoint="consumer"
>                     wsdl="classpath:LOEventService.wsdl"
>                     locationURI="http://localhost:8193/loes/"
>                     targetService="loes:LOEventService"
>                     targetEndpoint="provider"
>                     useJbiWrapper="true"
>                     validateWsdl="false"/>
> 
> <http:soap-provider service="loes:LOEventService"
>                     endpoint="provider"
>                    
> locationURI="http://localhost:1278/bluebox-web/services/LOEventService"
>                     wsdl="classpath:LOEventService.wsdl"
>                     useJbiWrapper="true"/>
> 
> With this configuration, all incoming soap envelopers to the consumer will
> be forwarded to the provider endpoint URI.
> 
> Regards
> JB
> 
> On Thursday 19 March 2009 - 04:09, Milan Satala wrote:
>> 
>> I need servicemix to expose a webservice and route incoming messages to
>> actual provider. The problem is that both http:soap-consumer and
>> http:soap-provider forces me to use the same service and endpoint name as
>> the wsdl.
>> This naturally leads to following exception:
>> javax.jbi.management.DeploymentException: More than one endpoint found in
>> the SU for key:
>> {http://www.prolixproject.org/loes}LOEventService:LOEventServiceSoap
>> 
>> Is there a way to route messages using a single wsdl?
>> 
>> Here's my xbean.xml:
>> <http:soap-consumer service="loes:LOEventService"
>>         endpoint="LOEventServiceSoap"
>>         wsdl="classpath:LOEventService.wsdl"
>>         locationURI="http://localhost:8193/loes/"             
>>         targetService="loes:LOEventService"
>>         targetEndpoint="LOEventServiceSoap"
>>         useJbiWrapper="true"
>>         validateWsdl="false"                          
>>         />             
>> 
>> <http:soap-provider service="loes:LOEventService"
>> 	locationURI="http://localhost:1278/bluebox-web/services/LOEventService"
>> 	endpoint="LOEventServiceSoap"
>> 	wsdl="classpath:LOEventService.wsdl"
>>        useJbiWrapper="true"				
>> 	/> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/how-to-use-http%3Asoap-consumer-and-http%3Asoap-provider-with-single-wsdl-tp22597992p22597992.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-use-http%3Asoap-consumer-and-http%3Asoap-provider-with-single-wsdl-tp22597992p22637801.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.