问题
I have a web service operation that I am exposing with Axis2.
Let's say it's like this:
public class MyService{
public String helloworld(String yourName){
return "Hello " + yourName;
}
}
This is a pretty simple web service. My question is how do I parse more complex parameters? For example, I want to pass more than just strings, and I also want some parameters to be optional and some parameters to may also be nested.
回答1:
Use varargs and method overloading.
来源:https://stackoverflow.com/questions/2390249/parsing-custom-parameters-from-an-axis2-exposed-pojo