解Unmarshalling Error: unexpected element (uri:"", local:"name"). Expected elements are <{}arg0>
解决方法:
调用webservice接口传参时报错Unmarshalling Error: unexpected element (uri:"", local:"name"). Expected elements are <{}arg0>
原因是服务端的服务接口参数前没加@WebParam(name = "name")
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
@WebService(targetNamespace="http://test.com/")
public interface WebServiceServerI {
@WebMethod
public String sayHello(@WebParam(name = "name")String name);
}