axis 客户端代码

来源:互联网 发布:美图秀秀有mac版吗 编辑:程序博客网 时间:2024/06/10 09:23
  1. package com.futuresoftware.oaagent;
  2. import org.apache.axis.client.Call;
  3. import org.apache.axis.client.Service;
  4. public class AxisClient {
  5.     /**
  6.      * @param args
  7.      */
  8.     public static void main(String[] args) {
  9.         // TODO Auto-generated method stub
  10.         try {
  11.             String status = "2";
  12.             String endpoint = "http://192.168.2.113:9080/sso/services/UUMInterface";
  13.             String operation = "getUserList";
  14.             Service service = new Service();
  15.             
  16.             
  17.             
  18.             Call call = (Call) service.createCall();
  19.             call.setTargetEndpointAddress(new java.net.URL(endpoint));
  20.             call.setOperationName(operation);
  21.             String xml = (String) call.invoke(new Object[] { status });
  22.             System.out.println(xml);
  23.         } catch (Exception e) {
  24.             e.printStackTrace();
  25.         }
  26.     }
  27. }
原创粉丝点击