- import java.net.MalformedURLException;
- import java.net.URL;
- import org.codehaus.xfire.client.Client;
- public class XFireClient {
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Client client;
- try {
- client = new Client(new
- URL("http://192.168.2.48:8080/xfire/services/BookService?wsdl"));
- Object[] results = client.invoke("getBooks", new Object[0]);
- System.out.println((String) results[0]);
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
XFire客户端
最新推荐文章于 2015-12-09 18:07:13 发布