Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing SOAP interfaces and deprecating web methods in java

Tags:

java

wsdl

My team is developing a service layer in java and a GUI in dot-net, using soap. The GUI developers keep getting upset because the service layer occasionally change the web service interface.

To keep the GUI chaps happy, rather than trashing the original web methods we are now writing new ones that live alongside the existing ones. Since our soap interface design is still being refined this is getting messy, surely there is a better way! Any suggestions?

Further, there are times when we want to deprecate a web service method - is there a java annotation for doing this (one that would show up in the WSDL)?

Thanks for any suggestions

like image 450
Dave Richardson Avatar asked Feb 17 '12 11:02

Dave Richardson


People also ask

Is SOAP being deprecated?

Beginning on October 3, 2022, Caspio deprecated SOAP API Web Services and this option was removed from API profile creation screen. Existing SOAP applications will continue to function until June 3, 2024.

Is SOAP API deprecated?

Using the SOAP API endpoints in ArcGIS Server is deprecated. The existing SOAP API continues to be supported but will receive no future enhancements or updates.

What is SOAP in Java Web service?

SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services. SOAP is a W3C recommendation for communication between two applications. SOAP is XML based protocol. It is platform independent and language independent.


1 Answers

There is no such deprecation annotation that I know of. This is the general pattern that I normally use:

  • Implement a SOAP api putting a version number (v1) in either the WSDL name or path
  • Write new (or improved) app code that deserves an updated SOAP api
  • Implement a completely new version of the SOAP api with a new version number (v2) beside the v1 code, but backed by the same domain classes
  • Change the implementation of the v1 web service to perform migration and (whenever possible) call the appropriate method of the v2 service
  • Notify clients that they should start using v2 instead of v1
  • Wait
  • If you're in a big enterprise environment, wait even longer ;-)
  • Once nobody is using v1 any more (verify this with logs, and conversations with users), remove the v1 interface

This approach only works really well when you have good separation between your web service code and your actual application code. It helps to think of web service code as a presentation layer.

like image 194
Sean Reilly Avatar answered Oct 13 '22 12:10

Sean Reilly