package testClick.src.test;import javax.xml.namespace.QName;import org.apache.axiom.om.OMAbstractFactory;import org.apache.axiom.om.OMElement;import org.apache.axiom.om.OMFactory;import org.apache.axiom.om.OMNamespace;import
今天一个朋友咨询java调用.net的webservice功能,折腾了2个小时,也都折腾出来了,贴出来,希望用到的朋友少走弯路
1、axis调用.net的webservicepackage test;
import java.net.URL;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
public class Test {
public static void test() throws Exception{
Service service = new Service();
Call call = null;
try {
call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL("http://www.webxml.com.cn/WebServi