axis1.4 实现webservice 服务端 多参数 简单的实现
代码部分
public class PushTaskServer {
private static pnblog.PnbLogging logging = new PnbLogging(“webserver”);
public String pushRoom(String tradeCode, String inputXml) throws Exception {
if (logging.isTrace())
logging.addTrace("在WLWebserver类中,进入方法!inputxml=" + inputXml);
if (null == inputXml || "".equals(inputXml)) {
return WLWebUtils.getErrorMs3("-1", "传入xml为空!");
}
String outXml = "";
if ("T00001".equals(tradeCode)) {
outXml = new WLWebserver().pushSchedulePartTime(inputXml);
}
return outXml;
}
}
配置文件
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler type="java:org.apache.axis.handlers.http.URLMapper" name="URLMapper"/>
<service name="PushTaskServer" provider="java:RPC">
<parameter name="className" value="logic.server.PushTaskServer"/> //发布类的路径
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
</requestFlow>
</transport>
</deployment>
访问链接 http://127.0.0.1/XXX/services/PushTaskServer?wsdl