您好,登錄后才能下訂單哦!
jar包:
activation.jar
axis.jar
commons-discovery-0.2.jar
commons-logging-1.0.4.jar
jaxrpc.jar
wsdl4j-1.5.1.jar
jar包下載地址:http://mirrors.hust.edu.cn/apache/axis/axis/java/1.4/
-----------------------------------------------------------默默無(wú)聞的分割線-----------------------------------------------------------
webService調(diào)用:
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public void getMobileCodeDBInfo() {
try {
String url = "http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx";
//命名空間
String soapaction = "http://WebXml.com.cn/";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(url);
call.setOperationName(new QName(soapaction, "getDatabaseInfo"));
call.setReturnType(new QName(soapaction, "getDatabaseInfo"),Vector.class);
call.setUseSOAPAction(true);
call.setSOAPActionURI(soapaction + "getDatabaseInfo");
Vector v = (Vector) call.invoke(new Object[] {});
for (int i = 0; i < v.size(); i++) {
System.out.println(v.get(i));
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。