Axis WebService 一看就懂


axis1—4
webservices服务器客户端代码
---------------------------------------------
主要的配置有
server-config.wsdd
web.xml

---------------------------------------------
详细下载附件就明白了。
还不明白你就可以放弃了~~

部分代码
public class WebServiceUtils {
	// 访问webservices地址
	private String endpointURL;
	// 调用webservices 服务的方法
	private String serviceMethod;
	// 传递webservices 参数
	private Object[] paraMets;
         //get set .....
public Object getRequestResult() throws Exception {
	Object object = null;
	Service service = new Service();
	Call call = null;
	call = (Call) service.createCall();
	call.setTargetEndpointAddress(new java.net.URL(endpointURL));
	call.setOperationName(serviceMethod);
	call.setReturnType(XMLType.XSD_STRING);
	call.addParameter(serviceMethod, XMLType.XSD_STRING, ParameterMode.IN);
	object = call.invoke(paraMets);
	return object;
     }
}


server-config.wsdd
<service name="OAService" type="" provider="java:RPC" style="rpc"
		use="encoded">
	<parameter name="scope" value="Request" />
	<parameter name="className"
		value="com.bjsxt.webservice.IHelloWorldImpl" />
	<parameter name="allowedMethods" value="*" />
</service>

你可能感兴趣的:(java,axis,axis1.4,WebServices,tamcat6)