views:

30

answers:

1

I have a web service that I built with Axis2/Java. The web service will take in a list of objects and will process them. I'll use the following operation as an example.

public class AddToDatabaseService{

  public void addToDatabase(String name1, String name2, String name3, ....)
  {
    //add names to database
  }
}

I want the caller of my web service to use a URI like: http://localhost:8080/axis2/services/addToDatabase?name1=Joe&name2=Bob&name3=Kelly&name4=...

I'm aware this is not compilable code and the idea is still there. Is this even possible with SOAP-based web services? I know this is possible to do with RESTful services because you can just take the HttpServletRequest request object and do Enumeration enumeration = request.getParameterNames() and iterate through them.

I'm looking for the equivalent of that in web services POJO's with Axis2. A link or an sample program would be great!

Thanks.

A: 

Similar to the this question

Solution was to use a varargs parameter

Mark O'Connor