0 Replies Latest reply: Feb 15, 2011 11:39 AM by 839973 RSS

    backward compatibility for a JAX-RPC web service

    839973
      Hello everybody!


      I have an existing web service with the following signature

      AResponse aWebService(ARequest request)

      AResponse is a simple bean which has one ValueObject v ; and a pair of getter and setter for v.

      The ValueObject itself is a bean with 15 members and their corresponding getter/setter. This web service is implemented using JAX-RPC and works fine at the

      moment. The clients are able to aaccess all the 15 data members. I want now to change this webservice and add a 16-th attribute to the ValueObject because the clients required access to this extra data field in the DB.

      The way I'd like to tackle this is:
      - keep the existing signature
      - define a ValueObjectV2 extends ValueObject and add that 16-th member
      - add the business logic that handle the new added field

      I implemented that and works. Now the question is:

      Will this new service break the backward compatibility for the existing clients?

      I would say no, because what the client finally wants to get is a ValueObject2 object which ISA ValueObject so theoretically any operation which previously was invoked on an ValueObject object should presumably work on the ValueObjectV2 object as well.

      I'm not sure about this, though, maybe there are other points I'm missing.

      Do you have any idea?

      Thank you very much
      With best regards,
      Sorin