axis 客户端调用CXF的webservice 解决参数传递不过去的问题

Service service = new Service();
  Call call = (Call) service.createCall();
  call.setTargetEndpointAddress("http://localhost:8080/axis/services/CrSupportWebService");
  call.setOperationName("getAttInfo");
  call.addParameter("text", XMLType.XSD_STRING, ParameterMode.IN);
  call.setReturnType(XMLType.XSD_STRING);

  CrSupportTest test = new CrSupportTest();
JSONArray jsonArray = new JSONArray(); 
test.setResult("1");
test.setModel("0");
test.setClientName("test_client");
jsonArray.add(test);
  System.out.println(call.invoke(new Object[] { jsonArray.toString()}));

接口
@WebService
public interface CrSupportWebService {
   
    String getAttInfo(@WebParam(name="text")String inputJson);
   
    String upload(DataHandler handler, String fileName, String no);
}

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页