You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Phil Davies <ph...@firstondemand.com> on 2008/12/09 18:16:18 UTC

passing name-value pairs

Hello people,

 

I want to make a service which makes partial updates to a record. 

 

If I simply expose the record it's great, but I can't see which fields
the user chose to update and which they want left alone. So I looked at
using name-value pairs. On the server side it's great - I know the types
of the data I'm getting because I can get that from the given field
name, but it seems that when I declare the value as a (Java) Object,
axis makes it an OMElement, which I guess means it's up to the client
end to build the element manually. Fair enough I guess, but not very
useful.

 

I could pass in a bitmap of which fields I have updated, corresponding
to the fields in the class, but that's quite clumsy.

 

So I could happily use a simple class _if_ I could determine at the
server which fields have been set by the client. Or I could happily use
an array of name-value pairs _if_ there was a more elegant way of
passing an object (which happens to take 1 of only 3 different types).

 

Anyone solved a similar problem?

 

Thanks,

Phil