wood burning stoves 2.0*
The moose likes Web Services and the fly likes optional elements and null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "optional elements and null" Watch "optional elements and null" New topic

optional elements and null

Thomas V�lk

Joined: Jul 26, 2005
Posts: 7

If a client does not transfer an optional element to the service, the attribute in the corresponding Java object on the service will be set to "null" or the default value.
On the other hand it is possible, that the client transfers the same attribute with the value "null".

In my scenario it is a big difference if the client did not transfer the element or if the client explicitly sets the element to "null"

In both cases the service receives a Java object with the corresponding attribute set to "null".

So how can the service distinguish between these two scenarios?

[ November 10, 2006: Message edited by: Thomas V�lk ]
I agree. Here's the link: http://aspose.com/file-tools
subject: optional elements and null
Similar Threads
Padding fields with the empty string introduces a limitation - acceptable or not?
JNDI Port number issue while strating JBoss server 4.2.2.GA
How to identify that a room is booked?
Web services :Facing problem on setting value of xs:ID
Castor | Default Element Value