This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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.
Joined: May 21, 2008
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.
Joined: Jan 29, 2002
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com