Announcement Announcement Module
Collapse
No announcement yet.
WSDL versioning using URL parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WSDL versioning using URL parameter

    Hello,

    My application provides web services, and now I'm developing the first extension of it (v1.1). As I read, the preferred way to support both v1.1 and v1.0 simultaneously is to transform incoming v1.0 calls with XSLT, changing message namespace and adding/removing/changing elements and attributes as needed. My first tests are working fine.

    My issue is that I'd like to put the WSDL URLs apart using query string parameters, like this:

    Code:
    http://company.com/ws/service.wsdl
    http://company.com/ws/service.wsdl?version=1.1
    I searched quite some time, and nothing useful came up.

    My current WSDL definition is as follows. I know the docs state that dynamic wsdl can be troublesome, but it helps with different service URLs across different environments, and so far no problems with that.

    Code:
    <!-- produces http://company.com/ws/service.wsdl -->
    <sws:dynamic-wsdl id="service" portTypeName="service"
    	locationUri="/ws/"
    	targetNamespace="http://company.com/ws/definitions" >
    	<sws:xsd location="/WEB-INF/service_1.0.xsd" />
    </sws:dynamic-wsdl>
    
    <!-- produces http://company.com/ws/service_1.1.wsdl -->
    <sws:dynamic-wsdl id="service_1.1" portTypeName="service" 
    	locationUri="/ws/"
    	targetNamespace="http://company.com/ws/definitions" >
    	<sws:xsd location="/WEB-INF/service_1.1.xsd" />
    </sws:dynamic-wsdl>
    As the ID is unique, I can't set both to 'service'. Plus, if I somehow get to use a URL parameter, the URL for WS calls will probably need some handling as well, as both would be 'http://company.com/ws/service/' (soap address location).

    So, can I do this somehow, and fairly easily? I don't mind a few class extensions, but if the trouble is too much, maybe I should just stick with the way it is now.

    Tips and advices are welcome.
    Thanks!
    Last edited by mdrg; Jun 24th, 2013, 09:13 AM.

  • #2
    Sorry for not getting to this sooner. We are in the process of moving to StackOverflow for our forums.

    This question is probably a better candidate for StackOverflow, perhaps against the #spring-ws tag. If you do post it there, please reply here with the link. Thanks!

    Comment

    Working...
    X