• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Expose only specific webservice methods to specific clients

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have wsdl created which exposes different webservice methods. I need to give wsdl path to different clients with only their required service methods to be exposed.
How do i achieve this?
I have used apache cxf with spring, created separate bean.xml which describes serviceImpl as the endpoint for the webservice.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Say you have different services like
a) CreditCardDtls,b)AddressDtls, c)SubmitApplDtls.
And you want to have a& b service to be given to one client and C for other client.

You can create separate XSD's and import the resource accordingly in different wsdl.

WSDL1:
<wsdl:types><xsd:import namespace=""schemaLocation="AddressTypes.xsd" />
<xsd:import namespace="" schemaLocation="CreditCardDtlsTypes.xsd" /></wsdl:types>

WSDL2:
<wsdl:types><xsd:import namespace=""schemaLocation="SubmitAppliDtlsTypes.xsd" /></wsdl:types>


Hope this will help!!
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
If you are using WLSD 2.0, then an interface can extend another interface.
In this case, you can set up a hierarchy which shares operations; the operations in the interface at the bottom of the hierarchy is available to all interfaces higher up in the hierarchy.

If you are use WSDL 1.1, then you cannot extend <portType> declarations. What I would consider is having multiple portType declarations; one for each kind of client.
Then you can assign endpoints depending on the type of client; client A would only be able to access and endpoint on which the operations in PortTypeA are available while, for instance, client B would be able to access two endpoints, one on which the operations in PortTypeA are available and another on which the operations in PortTypeB are available.
The different kind of clients would still be able to know about other kinds of operations being available to other clients, albeit not be able to invoke them.
If you want to completely hide operations not available to a client, then one WSDL per client is the only way I can think of that will accomplish this.
Best wishes!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic