Forums Register Login

Multi WebService Clients

+Pie Number of slices to send: Send
Hi,
I'm currently using spring web services with jaxb. I have created a single endpoint containing my operations and a single xsd schema.
If I have two different clients:-
Client A requires operation 1, 4, 5
Client B requires operations 1, 3
Then how do I provide unique wsdls for each client, so that they both have the agreed contract?
Do I create two different xsd schemas and enpoints?

MatD

+Pie Number of slices to send: Send
If your web service is not serving specific data for specific clients, you can use one WSDL which avoids duplication of logic and you can host only one web service.

But if your web service is specific to a client then it is better to have two separate WSDLs to avoid maintenance problems later in the future.

+Pie Number of slices to send: Send
Hi Meghana,
thanks for the reply. I think I have got it working, but I'm not sure if I have done the correct architecture.
I have created specific schemas to cover specific tasks (example:- createOrder, checkCredit, checkSupplier etc)
For each of the schemas, I created an endpoint containing all of the specific operations. I used anntotation to ref the
data structure objects defined in the scheams used by the operations. For each client that had a specific contract I created
a unique schema that included in the the other schemas that I required (i.e. chechCredit & createOrder). This approach looks like
it works. Since I'm using spring ws +jaxb the schemas automatically create the wsdls that I can publish. My only question is
that inside the generated wsdl it defines different operation names than the ones that I have created within my endpoints.
Can you somehow specify the operation names that you want in the wsdl?
Sorry about the question, but i'm new to spring ws with jaxb.

Mat
+Pie Number of slices to send: Send
I do not know if there's a way to customize the operation names while generating the WSDL in Spring. I've customized the namespace to package names mapping.
But you can manually edit the WSDL and change the names which is a tedious task(atleast to me) and in general,
it is not a good practice to play around with generated stuff because your maintenance will become a hassle.
I wouldn't do that unless absolutely needed.
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 926 times.
Similar Threads
Can we have more than one WSDL file for same service
client server programming which supports both TCP and UDP
JAXB: Two xsd - Create single JAXBContext
OO vs Procedural?
Different Message Exchange Pattern interfaces
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 01:00:11.