public static void main(String[] args) {
try {
String endpoint="http://z.yyszx.com.cn/zkAccount.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://z.yyszx.com.cn","HelloWorld"));
call.addParameter("arg0",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
call.setEncodingStyle("UTF-8");
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://z.yyszx.com.cn/HelloWorld");
String output=(String)call.invoke(new Object[]{"痛苦啊"});
System.out.println( "result is " + output.toString() + ".");
}
catch (Exception e) {System.err.println(e.toString());}
}
返回值为 : result is 123.
痛苦啊 这三个字没有返回回来,求指教。(送分,送分)call.addParameter(new QName(namespace, "name"), XMLType.XSD_STRING, ParameterMode.IN);
修改为
call.addParameter("arg0",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
还是不行,我是彻底服了。
try {
String endpoint="http://z.yyszx.com.cn/zkAccount.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://z.yyszx.com.cn","HelloWorld"));
call.addParameter("arg0",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
call.setEncodingStyle("UTF-8");
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://z.yyszx.com.cn/HelloWorld");
String output=(String)call.invoke(new Object[]{"痛苦啊"});
System.out.println( "result is " + output.toString() + ".");
}
catch (Exception e) {System.err.println(e.toString());}
}
返回值为 : result is 123.
痛苦啊 这三个字没有返回回来,求指教。(送分,送分)call.addParameter(new QName(namespace, "name"), XMLType.XSD_STRING, ParameterMode.IN);
修改为
call.addParameter("arg0",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
还是不行,我是彻底服了。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货