aspose file tools
The moose likes Web Services and the fly likes adding new field to a SOAP Object without having to change client side Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "adding new field to a SOAP Object without having to change client side" Watch "adding new field to a SOAP Object without having to change client side" New topic
Author

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

Gabo Manuel
Greenhorn

Joined: Oct 06, 2004
Posts: 5
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


Junior Developer - Java
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12269
    
    1
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

Joined: Oct 06, 2004
Posts: 5
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: adding new field to a SOAP Object without having to change client side
 
Similar Threads
Apache axis arraylist problem
Java client connect to soap server
RMI and object and thread sharing
SOAP Client using Java Sockets
Implementing Java SOAP client