<?xml version="1.0" encoding="UTF-8"?>---xsd:schema/xsd:schema----------下面是我的調(diào)用代碼: Service service = new Service();
Call call = (Call) service.createCall();
String url = "http://192.1.1.64:8082/Service/ServiceHello?wsdl";
call.setTargetEndpointAddress(url);
call.setOperationName(new QName("http://webservice_302/", "getValue"));
call.addParameter(new QName("http://webservice_302/", "name"), org.apache.axis.encoding.XMLType.XSD_STRING,
javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
String result = (String) call.invoke(new String[] { "11" });
System.out.println(result);下面是接口的方法點(diǎn): public String getValue(String name){
return "歡迎你! "+name;
}可以成功調(diào)用,返回結(jié)果是:歡迎你! null說明參數(shù)沒有傳進(jìn)去,請問這里我應(yīng)該怎么寫呢?
1 回答

慕的地10843
TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超8個(gè)贊
入?yún)㈩愋蛻?yīng)該是org.apache.axis.Constants.XSD_STRING,不認(rèn)為是org.apache.axis.encoding.XMLType.XSD_STRING
添加回答
舉報(bào)
0/150
提交
取消