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 Mati David <ma...@bitband.com> on 2006/07/23 10:54:17 UTC

SOAP method with many arguments

I went into a situation that one of my web-services method required many arguments in its signature, almost all of those arguments represent properties of a component. I was wondering what the best practice in such a case is.  Is it conventional to use an array of "property" objects that contains properties as pairs of key and value for update operations in web services? For example - 

 

void updateServer(int serverId,Property[] serverProperties)

 

when property is

 

class Property {

      private String key;

      private String value;

}

 

In this approach the client must know and set the specific keys and values just for the properties he wants to update.

In a more naïve approach, each property is an argument  in the method signature - 

 

Void updateServer(int serverId, String prop1, String prop2, String prop3....)

 

Here, user may call the update with all properties with some conventions for "leave unchanged". 

Is there any convention or better practice here?

 

Thanks,

 

Mati.