本文中介绍如何根据一个webservice串来访问接口中的方法,至于如何建立webservice服务器请见本博客的另一篇文章:基于Java的WebService(XFire)。
开发的方法为:String dsjspcsqs(String args).
可以通过如下方法给testa传递数据。
package com.ysj;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;
import org.codehaus.xfire.client.Client;
public class TestProperties {
/**
* @param args
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
new TestProperties().load();
}
public void load() throws Exception {
// 获得配置文件,qbldInterface.properties文件放在了src文件夹下
InputStream inputStream = this.getClass().getClassLoader()
.getResourceAsStream("qbldInterface.properties");
Properties p = new Properties()