Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

General Methods for writing web method to update  RSS feed

 
John Farrel
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a design question...

Imagine you have an entry in a table and want to write a web method to update the entry.

The simplest version of this is supplying a web method with a parameter for each column, and updating each associated column in the row with the value received.

This is fine, assuming you also have a web method to return EVERY value in the row, and that you expect EVERY value to be sent in the update.

The question, how to create a request to update just some of the columns?

If your soap engine fills in a java object from the request, you could ensure all fields are objects and only update those columns in the row where the objects are not null.

The problems are that depending on the soap engine.
On receipt of the request,
a <param></param> tag may map to either an empty string or a null.
a <param></param> tag mapped to a Integer or similar may map to 0 and not null.

On the engine creating the request, similar mapping issues occur. Will a null object map to an empty tag or no tag?

Looking for a clean and elegant solution.


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