WebServiceWSDD上传服务器部署server-config.wsdd文件
部署图:
?
这张是生成并上传到服务器wsdd(server-config.wsdd文件)
?
?
public static void main(String[] args) throws Exception { Service service = new Service(); Call call = (Call) service.createCall(); String url = "http://localhost:8000/L_axis/services/HelloWorldService?wsdl" ; call.setTargetEndpointAddress(new URL(url)); call.setOperationName("sayHello"); call.setMaintainSession(true); //发送的标签名 call.addParameter("testParam",Constants.XSD_STRING, ParameterMode.IN); //返回类型 call.setReturnType(Constants.XSD_STRING); //tom是发送过去的值 Object o = call.invoke(new Object[]{"tom"}); System.out.println(call.invoke(new Object[]{"tom"})); System.out.println(call.invoke(new Object[]{"tom"})); System.out.println(o); }
?
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <sayHello soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <testParam xsi:type="xsd:string">tom</testParam> </sayHello> </soapenv:Body> </soapenv:Envelope>
?
?
?
?
?
这里是AXIS的JAR包:
下载
这个是WebSerivce部署的执行文件:
下载
?
?
?
?
更多的下载:Http://www.secn.com.cn