• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multi WebService Clients

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Mat Anthony
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Meghana Reddy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 been selected to go to the moon! All thanks to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic