Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding new field to a SOAP Object without having to change client side  RSS feed

 
Gabo Manuel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lets say i have a webservice that returns a soap object, say SOAPProfile, which initially contains name, address and phonenumber.

i publish it out and ppl would create a client program that would retrieve it and return it for updates and/or creation of new objects.

and then i decide to add a new field 'faxnumber'. this would cause serialization problems if the client would pass a soapProfile that has only three fields, ryt? how would it be possible to handle both types(old and new) by the same method, say updateProfile(SOAPProfile)?

tnx in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would try to have the SOAP service defined as returning a collection of name - value pairs. That way you can add or remove entries from the collection. Of course this means more work for the client side in terms of maintaining the collection, but it would be flexible.
Bill
 
Gabo Manuel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bill,

i was hoping to use a java.util.properties object to contain the data. unfortunately i am having problems creating the wsdd file. please advise

tnx.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!