With the ‘Web Service Descriptor’ concept introduced in webMethods version 7.1.2 onwards, I am confused with the best ways to implement the web service versioning for my web services.
Are there any best practices for web service versioning from webMethods perspective?
Following was my approach in designing the WSDLs and flow services to achieve web service versioning.
Prior to 7.1.2:
it was fairly simple. We preferably used to have a single end point ([URL]http://localhost:5555/soap/default[/URL]) for accepting all inbound SOAP requests.
Suppose there is this simple web service with getEmployeeName operation, which accepts empId as input and returns firstName and lastName as output. Let us call this as version 1.1 of the web service.
If you ever wanted to create a new version of the operation to return firstName, middleName and lastName, without impacting existing clients, you could easily do it with a new version of the wsdl with namespace versioning and then creating a new flow service to process such requests.
Both old and new clients were still hitting the same endpoint ([URL]http://localhost:5555/soap/default[/URL]) and namespace was doing the trick of deciding which flow service to use to fetch the results. When old clients were ready to move to the new version of the service, all they have to do is change the namespace in their request.
7.1.2 and ahead:
With the web service descriptor functionality, it seems IS generates the service end point based on the fully qualified path of the web service descriptor. e.g. if my EmployeeInfoDescriptor WSD is located in Sandbox.webservices folder inside Sandbox package, the endpoint for my webservice looks something like this:
[URL]http://localhost:5555/ws/Sandbox.webservices:EmployeeInfoDescriptor[/URL]
Now, if I want to create a new version of the getEmployeeName operation, not only I have to go with a new WSDL and namespace versioning. I also need to create a new web service descriptor, which creates a new end point for my service like this
[URL=“http://localhost:5555/ws/Sandbox.webservices:EmployeeInfoDescriptor”]http://localhost:5555/ws/Sandbox.webservices:EmployeeInfoDescriptorV1[/URL]
When old clients are ready to move to the new version of the service,they have to make changes in the schema and hit the new end point as well.
Is this the only way to achieve service versioning in 7.1.2 and future webMethods product releases?
Can we customize the endpoint that is generated by WSD? This endpoint looks very long, specific to a WSDL and not generic.
Suppose for some reason I am forced to generate different WSDLs per operation for same client application. I have to create 5 WSDs,which results in 5 endpoints. The client system needs to hit these 5 endpoints (1 per service) and configure them appropriately. This looks ridiculous compared to the simplicity offered in 6.5.