JAvaがBO(レポート)を呼び出して発表したWebserviceは何も返さなかったのはどういうことですか?

2495 ワード


public static void main(String[] args) {
  try {
      System.out.println(getResult());
     } catch (MalformedURLException e) {
      e.printStackTrace();
     } catch (RemoteException e) {
      e.printStackTrace();
     } catch (ServiceException e) {
      e.printStackTrace();
     } catch (SOAPException e) {
      e.printStackTrace();
     }
 }
 
 public static String getResult() throws ServiceException, MalformedURLException, RemoteException, SOAPException{
  String ret="";
  String login = "administrator";
        String password = "admin!@#";
        String year = "2004";
        String State = "DC";
     try {
   String endpoint = "http://192.168.1.111:8180/dswsbobje/qaawsservices/biws?WSDL=1&cuid=AcZ.DtvBDHpNq8Czi54Uzms"; // (service) (call) Service service = new Service(); Call call = (Call)service.createCall();// service call // service URL call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName("mytest","runQueryAsAService"));
   //Add net "http://tempuri.org/" Namespace ,
   call.addParameter(new QName("mytest","login"),org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter(new QName("mytest","password"),org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter(new QName("mytest","year"),org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter(new QName("mytest","State"),org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setUseSOAPAction(true); call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING); // call.setSOAPActionURI("mytest/runQueryAsAService"); // Add, // Object , "This is Test!", processService(String arg) ret = (String)call.invoke(new Object[]{login,password,year,State}); System.out.println("--------"+ret.length()); }catch (Exception e){ System.err.println(e.toString()); } return ret; }