You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Pavlo Fenoga <pf...@gmail.com> on 2010/01/29 14:07:02 UTC

Several SAs with the same wsdl file

Hi, All,
We are using servicemix-http in order to expose web services. So wsdl  file
is set to http consumer endpoint, soap=true. Endpoint service and endpoint
name and targetEndpoint is set to the same values as specified in wsdl to
make all work.
Now we need to have several implementations of the same web service deployed
to the same SMX instance.
So, we create several SA with http consumer endpoints. Each http endpoint
has the same wsdl file but different locationURI parameter.
But it is impossible to deploy such SA at the same time because all SAs has
endpoint with the same keys, got exception:

<loc-message>An endpoint is already registered for key:
{http://servicemix.apache.org/samples/wsdl-first}PersonService:soap</loc-message>
					<stack-trace><![CDATA[java.lang.IllegalStateException: An endpoint is
already registered for key:
{http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
	at org.apache.servicemix.common.Registry.registerEndpoint(Registry.java:55)
	at
org.apache.servicemix.common.Registry.registerServiceUnit(Registry.java:67)
	at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:73)
	at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:520)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:349)

Is it really possible to expose several implementations of the same
WebServices within one SMX instance?
How it can be done?
Thank you.
-- 
View this message in context: http://old.nabble.com/Several-SAs-with-the-same-wsdl-file-tp27371668p27371668.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Several SAs with the same wsdl file

Posted by Pavlo Fenoga <pf...@gmail.com>.
Thank you for answer.
But, it seems that only this change doesn’t resolve the issue. 
There are at least two endpoints which names should be different for
different WSDL implementations.
1 – http consumer endpoint
2 – target endpoint which receives messages from http consumer.
So, I have changed endpoint name for http endpoint and for targetEndpoint as
well by adding SA name to the endpoint name. After that http endpoint is
deployed well, can acsept and process messages, but WSDL file is not
provided by request to <locationURL>?wsdl

>From SMX point of view enpoints names can be any, but http component work
well only if target endpoint corresponds to wsdl content. If some name is
not found in WSDL, http endpoint does not work or doesn’t provide WSDL on
request.
As for now I think that having two SAs with the same WSDL  and 100% working
http consumer endpoint is impossible. In case of different name of endpoints
messages can be processed but WSDL is not provided when requested.
Is it a feature or defect? Or maybe I missed something.



Freeman Fang wrote:
> 
> Hi,
> 
> You can use same servicename but specify different endpoint name for  
> different http consumer endpoint.
> 
> Freeman
> On 2010-1-29, at 下午9:07, Pavlo Fenoga wrote:
> 
>>
>> Hi, All,
>> We are using servicemix-http in order to expose web services. So  
>> wsdl  file
>> is set to http consumer endpoint, soap=true. Endpoint service and  
>> endpoint
>> name and targetEndpoint is set to the same values as specified in  
>> wsdl to
>> make all work.
>> Now we need to have several implementations of the same web service  
>> deployed
>> to the same SMX instance.
>> So, we create several SA with http consumer endpoints. Each http  
>> endpoint
>> has the same wsdl file but different locationURI parameter.
>> But it is impossible to deploy such SA at the same time because all  
>> SAs has
>> endpoint with the same keys, got exception:
>>
>> <loc-message>An endpoint is already registered for key:
>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap</ 
>> loc-message>
>> 					<stack-trace><![CDATA[java.lang.IllegalStateException: An  
>> endpoint is
>> already registered for key:
>> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
>> 	at  
>> org.apache.servicemix.common.Registry.registerEndpoint(Registry.java: 
>> 55)
>> 	at
>> org 
>> .apache.servicemix.common.Registry.registerServiceUnit(Registry.java: 
>> 67)
>> 	at
>> org 
>> .apache 
>> .servicemix 
>> .common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:73)
>> 	at
>> org 
>> .apache 
>> .servicemix 
>> .jbi 
>> .framework 
>> .DeploymentService.deployServiceAssembly(DeploymentService.java:520)
>> 	at
>> org 
>> .apache 
>> .servicemix 
>> .jbi 
>> .framework 
>> .AutoDeploymentService 
>> .updateServiceAssembly(AutoDeploymentService.java:349)
>>
>> Is it really possible to expose several implementations of the same
>> WebServices within one SMX instance?
>> How it can be done?
>> Thank you.
>> -- 
>> View this message in context:
>> http://old.nabble.com/Several-SAs-with-the-same-wsdl-file-tp27371668p27371668.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Several-SAs-with-the-same-wsdl-file-tp27371668p27417009.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Several SAs with the same wsdl file

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You can use same servicename but specify different endpoint name for  
different http consumer endpoint.

Freeman
On 2010-1-29, at 下午9:07, Pavlo Fenoga wrote:

>
> Hi, All,
> We are using servicemix-http in order to expose web services. So  
> wsdl  file
> is set to http consumer endpoint, soap=true. Endpoint service and  
> endpoint
> name and targetEndpoint is set to the same values as specified in  
> wsdl to
> make all work.
> Now we need to have several implementations of the same web service  
> deployed
> to the same SMX instance.
> So, we create several SA with http consumer endpoints. Each http  
> endpoint
> has the same wsdl file but different locationURI parameter.
> But it is impossible to deploy such SA at the same time because all  
> SAs has
> endpoint with the same keys, got exception:
>
> <loc-message>An endpoint is already registered for key:
> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap</ 
> loc-message>
> 					<stack-trace><![CDATA[java.lang.IllegalStateException: An  
> endpoint is
> already registered for key:
> {http://servicemix.apache.org/samples/wsdl-first}PersonService:soap
> 	at  
> org.apache.servicemix.common.Registry.registerEndpoint(Registry.java: 
> 55)
> 	at
> org 
> .apache.servicemix.common.Registry.registerServiceUnit(Registry.java: 
> 67)
> 	at
> org 
> .apache 
> .servicemix 
> .common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:73)
> 	at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .DeploymentService.deployServiceAssembly(DeploymentService.java:520)
> 	at
> org 
> .apache 
> .servicemix 
> .jbi 
> .framework 
> .AutoDeploymentService 
> .updateServiceAssembly(AutoDeploymentService.java:349)
>
> Is it really possible to expose several implementations of the same
> WebServices within one SMX instance?
> How it can be done?
> Thank you.
> -- 
> View this message in context: http://old.nabble.com/Several-SAs-with-the-same-wsdl-file-tp27371668p27371668.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com