How to expose 2 SOAP webservices with the same wsdl?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to expose 2 SOAP webservices with the same wsdl?

Philip
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi
i am using Petals 4.0, withthe BC-SOAP component, and PetalsStudio 1.3.1
I have 2 webservices hosted on 2 different servers, but they have the same WSDL (different customers)
So, I have created 2 providers with PetalsStudio (without generate endpoint at runtime option), and deployed them on Petals in this order : provider1, provider2.

Now, I create 2 consumers ; in Petals Studio, I see the 2 providers I want to use, but they look totally similar ( I cannot tell which real webservice they are linked to !!). OK, so I choose the first for consumer1, and the second for consumer2.
I deploy consumer1 on Petals, test it, and it is linked to provider2 (the latest installed)
I then deploy consumer2, test it, and it is also linked to provider2.

So the question is :
How is it possible to link a provider to a specific consumer ASSUMING that both WSDL are identical?
I have tried to create the provider with autogenerate, but this does not help when creating the consumer in Petals Studio : I still see 2 "Autogenerated" endpointnames.

Thanks for any input.
Philip
Reply | Threaded
Open this post in threaded view
|

Re: How to expose 2 SOAP webservices with the same wsdl?

Christophe DENEUX
Administrator
This post has NOT been accepted by the mailing list yet.
Hi Philip,

Your concrete WSDLs are not completely the same because the endpoint parts should be different.

I think that you MUST use fixed endpoint names in your provider service units. In your consumer service units, you will use these fixed endpoint names to link a consumer (an URL) to a specific service provider (external web-service).

It's a strange use case. Can you give us why this use case ? In my mind, two webservices with the same WSDL are identical web-services and can be accessed through a load balancer for a high availability purpose.
Christophe DENEUX
Petals ESB Architect
Linagora
Twitter: @ChrisDENEUX
Reply | Threaded
Open this post in threaded view
|

Re: How to expose 2 SOAP webservices with the same wsdl?

Philip
prinstscreen in petalsstudioCorrect , the WSDLs contains different URIs for the real webservices, and PetalsStudio generates correctly then providers.
The problem is that when generating the consumers in Petalsstudio, I use the "selects service from petals Services..."  and in that screen, the 2 providers have the same name. So the consulers are not correctly linked to the providers.
Reply | Threaded
Open this post in threaded view
|

Re: How to expose 2 SOAP webservices with the same wsdl?

Philip
BTW, if I modify the jbi.xml of the provider ( with the edit source functionnality in petalsStudio), changing the enpoint name to something unique, PetaslStudio complaisn about "the endpoint  defined in the jbi.xml" does not match the declared wsdl.
From then on, I can create a cionsumer , and I can link it to the correct providers, but everything is marked with a red cross in Petals studio. Not clean ...

Thxs
philip
Reply | Threaded
Open this post in threaded view
|

Re: How to expose 2 SOAP webservices with the same wsdl?

Vincent Zurczak
In reply to this post by Christophe DENEUX
Hi,

Christophe DENEUX wrote
Your concrete WSDLs are not completely the same because the endpoint parts should be different.
True.
But if he checked "autogenerate" in the studio, the WSDL must have been updated automatically. So, I guess Philip has 2 WSDL with "autogenerate" as the end-point.

Christophe DENEUX wrote
I think that you MUST use fixed endpoint names in your provider service units. In your consumer service units, you will use these fixed endpoint names to link a consumer (an URL) to a specific service provider (external web-service).
I do not exactly agree.
I think you should keep the autogenerated end-point, but change the service name.

The interface name should identify a service contract. It is the same for both of your services.
The service name should identify an implementation of your service contract. Here, you have 2 implementations: one that points to one external resource, and the second one which points to another resource.

However, changing the service name in the jbi.xml means changing it in the WSDL too.
If I remember correctly, the service name is not used in SOAP messages. So, this should not impact the behavior of the SOAP BC. The only issue is that both providers have the same WSDL, while they should be different (they are not the same service after all, just implementations of a same contract).

And the end-point name defines a deployment identifier.
« Petals M.D. »