/*
   * 短信发送接口
   */
  public String invokeRemoteFuc(String username, String mobile, String content, String uuid) {
    String endpoint = "http://10.1.5.244:8989/smsWebservice/services/smsMsg?wsdl";
    String result = "no result!";
    Service service = new Service();
    Call call;
    try {
      call = (Call) service.createCall();
      call.setTargetEndpointAddress(endpoint); // 远程调用路径
      call.setOperationName("SendMsg"); // 调用的方法名
      //
      //			// 设置参数名:
      //			call.addParameter("username", // 参数名
      //					XMLType.XSD_STRING,// 参数类型:String
      //					ParameterMode.IN);// 参数模式:'IN' or 'OUT'
      //			call.addParameter("mobile", XMLType.XSD_STRING, ParameterMode.IN);
      //			call.addParameter("content", XMLType.XSD_STRING, ParameterMode.IN);
      //			call.addParameter("uuid", XMLType.XSD_STRING, ParameterMode.IN);
      //			// 设置返回值类型:
      //			call.setReturnType(XMLType.XSD_STRING);// 返回值类型:String

      result = (String) call.invoke(new Object[] {username, mobile, content, uuid}); // 远程调用
    } catch (ServiceException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
      e.printStackTrace();
    }
    return result;
  }
  public java.lang.String[] select(java.lang.String key, java.lang.String s)
      throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[6]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("urn:select");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP12_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("http://webservice.sp", "select"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {key, s});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (java.lang.String[]) _resp;
        } catch (java.lang.Exception _exception) {
          return (java.lang.String[])
              org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String[].class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public socialapp.soap.client.Article[] getBlogs(socialapp.soap.client.User arg0)
      throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[1]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("http://soap.socialapp/", "getBlogs"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {arg0});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (socialapp.soap.client.Article[]) _resp;
        } catch (java.lang.Exception _exception) {
          return (socialapp.soap.client.Article[])
              org.apache.axis.utils.JavaUtils.convert(_resp, socialapp.soap.client.Article[].class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public boolean redimirPuntos(java.lang.String numeroPremio) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://modelo.soa.unipiloto.edu/", "redimirPuntos"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {numeroPremio});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return ((java.lang.Boolean) _resp).booleanValue();
        } catch (java.lang.Exception _exception) {
          return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class))
              .booleanValue();
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public com.lvmama.passport.hengdianmc.client.OrderRep orderReq(OrderInfo orderInfo)
      throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[0]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("http://tempuri.org/OrderReq");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("http://tempuri.org/", "OrderReq"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {orderInfo});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (OrderRep) _resp;
        } catch (java.lang.Exception _exception) {
          return (OrderRep) org.apache.axis.utils.JavaUtils.convert(_resp, OrderRep.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
 /**
  * Test T12 - unknown header, with MustUnderstand true
  *
  * @throws Exception
  */
 public void testT12() throws Exception {
   Call call = new Call(DOC_ENDPOINT);
   call.setOperationStyle(Style.DOCUMENT);
   call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
   SOAPEnvelope reqEnv = new SOAPEnvelope(SOAPConstants.SOAP12_CONSTANTS);
   SOAPHeaderElement header = new SOAPHeaderElement(TEST_NS, "Unknown");
   header.setObjectValue("test header");
   header.setMustUnderstand(true);
   reqEnv.addHeader(header);
   try {
     call.invoke(reqEnv);
   } catch (AxisFault fault) {
     assertEquals(Constants.FAULT_SOAP12_MUSTUNDERSTAND, fault.getFaultCode());
     ArrayList headers = fault.getHeaders();
     // If there is a NotUnderstood header, check it
     for (Iterator i = headers.iterator(); i.hasNext(); ) {
       SOAPHeaderElement h = (SOAPHeaderElement) i.next();
       if (h.getQName().equals(Constants.QNAME_NOTUNDERSTOOD)) {
         // TODO : check qname attribute
       }
     }
     return;
   }
   fail("Didn't receive expected fault!");
 }
  public java.lang.String confirmarTurno(
      java.lang.String nroCi,
      java.lang.String nroCelular,
      java.lang.String entidad,
      java.lang.Long token,
      java.lang.Integer empresa,
      java.lang.Integer codEspecMedic,
      java.lang.String codMedicoTurnoFecha,
      java.lang.String usuario,
      java.lang.String password)
      throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://servicios.consultas.ips.gov.py/", "confirmarTurno"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp =
          _call.invoke(
              new java.lang.Object[] {
                nroCi,
                nroCelular,
                entidad,
                token,
                empresa,
                codEspecMedic,
                codMedicoTurnoFecha,
                usuario,
                password
              });

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (java.lang.String) _resp;
        } catch (java.lang.Exception _exception) {
          return (java.lang.String)
              org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
Esempio n. 8
0
  public static Float getQuote(String ticker, String username, String password)
      throws javax.xml.rpc.ServiceException, AxisFault {
    Float res = new Float(-1.0);

    Service service = new Service(new XMLStringProvider(wsdd));

    // create a new Call object
    Call call = (Call) service.createCall();
    call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "getQuote"));
    call.addParameter("symbol", XMLType.XSD_STRING, ParameterMode.IN);
    call.setReturnType(XMLType.XSD_FLOAT);

    try {
      java.net.URL jmsurl = new java.net.URL(sampleJmsUrl);
      call.setTargetEndpointAddress(jmsurl);

      // set additional params on the call if desired
      call.setUsername(username);
      call.setPassword(password);
      call.setTimeout(new Integer(30000));

      res = (Float) call.invoke(new Object[] {ticker});
    } catch (java.net.MalformedURLException e) {
      throw new AxisFault("Invalid JMS URL", e);
    } catch (java.rmi.RemoteException e) {
      throw new AxisFault("Failed in getQuote()", e);
    }

    return res;
  }
 /**
  * Test T5 - echoOk header to unrecognized role (should be ignored)
  *
  * @throws Exception
  */
 public void testT5() throws Exception {
   Call call = new Call(DOC_ENDPOINT);
   call.setOperationStyle(Style.DOCUMENT);
   call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
   SOAPEnvelope reqEnv = new SOAPEnvelope(SOAPConstants.SOAP12_CONSTANTS);
   SOAPHeaderElement header = new SOAPHeaderElement(TEST_NS, "echoOk");
   header.setRole(ROLE_B);
   header.setObjectValue("test header");
   reqEnv.addHeader(header);
   SOAPEnvelope respEnv = call.invoke(reqEnv);
   assertTrue("Got unexpected header!", respEnv.getHeaders().isEmpty());
 }
  public com.google.api.ads.dfp.axis.v201302.ContentPage
      getContentByStatementAndCustomTargetingValue(
          com.google.api.ads.dfp.axis.v201302.Statement filterStatement,
          java.lang.Long customTargetingValueId)
          throws java.rmi.RemoteException, com.google.api.ads.dfp.axis.v201302.ApiException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[1]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName(
            "https://www.google.com/apis/ads/publisher/v201302",
            "getContentByStatementAndCustomTargetingValue"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp =
          _call.invoke(new java.lang.Object[] {filterStatement, customTargetingValueId});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (com.google.api.ads.dfp.axis.v201302.ContentPage) _resp;
        } catch (java.lang.Exception _exception) {
          return (com.google.api.ads.dfp.axis.v201302.ContentPage)
              org.apache.axis.utils.JavaUtils.convert(
                  _resp, com.google.api.ads.dfp.axis.v201302.ContentPage.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      if (axisFaultException.detail != null) {
        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
          throw (java.rmi.RemoteException) axisFaultException.detail;
        }
        if (axisFaultException.detail instanceof com.google.api.ads.dfp.axis.v201302.ApiException) {
          throw (com.google.api.ads.dfp.axis.v201302.ApiException) axisFaultException.detail;
        }
      }
      throw axisFaultException;
    }
  }
Esempio n. 11
0
  /**
   * Main entry point. Tests a variety of echo methods and reports on their results.
   *
   * <p>Arguments are of the form: -h localhost -p 8080 -s /soap/servlet/rpcrouter
   */
  public static void main(String args[]) throws Exception {
    // set up the call object
    Options opts = new Options(args);
    service = new Service();
    call = (Call) service.createCall();
    call.setTargetEndpointAddress(new URL(opts.getURL()));
    call.setUseSOAPAction(true);
    call.setSOAPActionURI("http://www.soapinterop.org/Bid");

    // register the PurchaseOrder class
    QName poqn = new QName("http://www.soapinterop.org/Bid", "PurchaseOrder");
    Class cls = PurchaseOrder.class;
    call.registerTypeMapping(cls, poqn, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    // register the Address class
    QName aqn = new QName("http://www.soapinterop.org/Bid", "Address");
    cls = Address.class;
    call.registerTypeMapping(cls, aqn, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    // register the LineItem class
    QName liqn = new QName("http://www.soapinterop.org/Bid", "LineItem");
    cls = LineItem.class;
    call.registerTypeMapping(cls, liqn, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    try {
      // Default return type based on what we expect
      call.setOperationName(new QName("http://www.soapinterop.org/Bid", "Buy"));
      call.addParameter("PO", poqn, ParameterMode.IN);
      call.setReturnType(XMLType.XSD_STRING);

      LineItem[] li = new LineItem[2];
      li[0] = new LineItem("Tricorder", 1, "2500.95");
      li[1] = new LineItem("Phasor", 3, "7250.95");

      PurchaseOrder po =
          new PurchaseOrder(
              "NCC-1701",
              Calendar.getInstance(),
              new Address("Sam Ruby", "Home", "Raleigh", "NC", "27676"),
              new Address("Lou Gerstner", "Work", "Armonk", "NY", "15222"),
              li);

      // issue the request
      String receipt = (String) call.invoke(new Object[] {po});

      System.out.println(receipt);
    } catch (Exception e) {
      System.out.println("Buy failed: " + e);
      throw e;
    }
  }
Esempio n. 12
0
  public String invoke(Object[] obj) throws Exception {
    String endpointURL =
        "http://localhost:5148/WebServer/services/receiveMediumAndLongTermOperationModeCountersignInfomationTest";
    String nameSpaceURL = "http://oms.gd.soa.csg.cn";
    String soapActionURL = "http://schemas.xmlsoap.org/wsdl/soap/";
    String remoteMethod = "receiveMediumAndLongTermOperationModeCountersignInfomationTest";

    String id = "";

    Service service = new Service();
    Call call = (Call) service.createCall();

    call.addParameter(
        new QName(
            nameSpaceURL, "receiveMediumAndLongTermOperationModeCountersignInfomationTestRequest"),
        org.apache.axis.encoding.XMLType.XSD_STRING,
        javax.xml.rpc.ParameterMode.IN);
    call.setReturnType(org.apache.axis.encoding.XMLType.XSD_SCHEMA);
    call.setUseSOAPAction(true);
    call.setSOAPActionURI(soapActionURL);
    call.setTargetEndpointAddress(new java.net.URL(endpointURL).toString());

    QName qname = new QName(nameSpaceURL, remoteMethod);
    call.setOperationName(qname);

    Schema schema = (Schema) call.invoke(obj);
    String res = schema.get_any()[1].getAsString();

    return res;
  }
Esempio n. 13
0
  public static void main(String[] args) {

    try {
      String fileName = "/log4j.properties";
      DataHandler dh =
          new DataHandler(
              new FileDataSource(FileSenderClient.class.getResource(fileName).getPath()));
      String url = "http://127.0.0.1:8080/axis1/services/FileReceiverServer";
      Service serv = new Service();
      Call call = (Call) serv.createCall();
      call.setTargetEndpointAddress(url);
      call.setOperationName(new QName(url, "receive"));
      QName qn = new QName("DataHandler", "myNs:DataHandler");
      call.registerTypeMapping(
          DataHandler.class,
          qn,
          JAFDataHandlerSerializerFactory.class,
          JAFDataHandlerDeserializerFactory.class);
      call.addParameter("s1", qn, ParameterMode.IN);
      call.addParameter("s2", XMLType.XSD_STRING, ParameterMode.IN);
      call.setReturnClass(String.class);
      String returnStr = (String) call.invoke(new Object[] {dh, "server.txt"});
      System.out.println("Server response: " + returnStr);
    } catch (ServiceException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
      e.printStackTrace();
    }
  }
Esempio n. 14
0
  public JobHistoryInfo getScheduledReportHistoryInfo(
      String scheduledJobID,
      String viewByFilter,
      boolean downloadReport,
      String userID,
      String userPassword)
      throws ReportException {

    try {
      initOperation();

      call.setOperationName(new QName(BIP_NAMESPACE, "getScheduledReportHistoryInfo"));

      call.addParameter("scheduledJobID", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("viewByFilter", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("downloadReport", XMLType.XSD_BOOLEAN, ParameterMode.IN);

      call.setReturnClass(JobHistoryInfo.class);

      // issue the request
      JobHistoryInfo result =
          (JobHistoryInfo)
              call.invoke(
                  new Object[] {
                    scheduledJobID, userID, userPassword, viewByFilter, downloadReport
                  });

      return result;
    } catch (RemoteException e) {
      ReportException reportException = new ReportException(e);
      throw reportException;
    }
  }
 public Object accessWGService(
     WebSession s,
     String serv,
     int port,
     String proc,
     String parameterName,
     Object parameterValue) {
   String targetNamespace = "WebGoat";
   try {
     QName serviceName = new QName(targetNamespace, serv);
     QName operationName = new QName(targetNamespace, proc);
     Service service = new Service();
     Call call = (Call) service.createCall();
     call.setOperationName(operationName);
     call.addParameter(parameterName, serviceName, ParameterMode.INOUT);
     call.setReturnType(XMLType.XSD_STRING);
     call.setUsername("guest");
     call.setPassword("guest");
     call.setTargetEndpointAddress(
         "http://localhost:" + port + "/" + s.getRequest().getContextPath() + "/services/" + serv);
     Object result = call.invoke(new Object[] {parameterValue});
     return result;
   } catch (RemoteException e) {
     e.printStackTrace();
   } catch (ServiceException e) {
     e.printStackTrace();
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }
 /**
  * Test T6 - echoOk header targeted at endpoint via intermediary
  *
  * @throws Exception
  */
 public void testT6() throws Exception {
   Call call = new Call(INTERMEDIARY_ENDPOINT);
   call.setOperationStyle(Style.DOCUMENT);
   call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
   SOAPEnvelope reqEnv = new SOAPEnvelope(SOAPConstants.SOAP12_CONSTANTS);
   SOAPHeaderElement header = new SOAPHeaderElement(TEST_NS, "echoOk");
   header.setRole(ROLE_C);
   header.setObjectValue("test header");
   reqEnv.addHeader(header);
   SOAPEnvelope respEnv = call.invoke(reqEnv);
   SOAPHeaderElement respHeader = respEnv.getHeaderByName(TEST_NS, "responseOk");
   assertNotNull(respHeader);
   assertEquals("test header", respHeader.getValue());
 }
Esempio n. 17
0
 protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
   try {
     org.apache.axis.client.Call _call = super._createCall();
     if (super.maintainSessionSet) {
       _call.setMaintainSession(super.maintainSession);
     }
     if (super.cachedUsername != null) {
       _call.setUsername(super.cachedUsername);
     }
     if (super.cachedPassword != null) {
       _call.setPassword(super.cachedPassword);
     }
     if (super.cachedEndpoint != null) {
       _call.setTargetEndpointAddress(super.cachedEndpoint);
     }
     if (super.cachedTimeout != null) {
       _call.setTimeout(super.cachedTimeout);
     }
     if (super.cachedPortName != null) {
       _call.setPortName(super.cachedPortName);
     }
     java.util.Enumeration keys = super.cachedProperties.keys();
     while (keys.hasMoreElements()) {
       java.lang.String key = (java.lang.String) keys.nextElement();
       _call.setProperty(key, super.cachedProperties.get(key));
     }
     return _call;
   } catch (java.lang.Throwable _t) {
     throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
   }
 }
  public com.google.api.ads.adwords.axis.v201605.cm.ConversionTrackerReturnValue mutate(
      com.google.api.ads.adwords.axis.v201605.cm.ConversionTrackerOperation[] operations)
      throws java.rmi.RemoteException, com.google.api.ads.adwords.axis.v201605.cm.ApiException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[1]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName(
            "https://adwords.google.com/api/adwords/cm/v201605", "mutate"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {operations});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (com.google.api.ads.adwords.axis.v201605.cm.ConversionTrackerReturnValue) _resp;
        } catch (java.lang.Exception _exception) {
          return (com.google.api.ads.adwords.axis.v201605.cm.ConversionTrackerReturnValue)
              org.apache.axis.utils.JavaUtils.convert(
                  _resp,
                  com.google.api.ads.adwords.axis.v201605.cm.ConversionTrackerReturnValue.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      if (axisFaultException.detail != null) {
        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
          throw (java.rmi.RemoteException) axisFaultException.detail;
        }
        if (axisFaultException.detail
            instanceof com.google.api.ads.adwords.axis.v201605.cm.ApiException) {
          throw (com.google.api.ads.adwords.axis.v201605.cm.ApiException) axisFaultException.detail;
        }
      }
      throw axisFaultException;
    }
  }
Esempio n. 19
0
  public boolean hasReportServerAccess(String userID, String userPassword) throws ReportException {
    try {
      initOperation();
      call.setOperationName(new QName(BIP_NAMESPACE, "validateLogin"));
      call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
      call.setReturnType(XMLType.XSD_BOOLEAN);
      // issue the request
      Boolean hasAccess = (Boolean) call.invoke(new Object[] {userID, userPassword});
      return hasAccess;

    } catch (RemoteException e) {
      ReportException reportException = new ReportException(e);
      throw reportException;
    }
  }
  public com.google.api.ads.dfp.axis.v201311.FirstPartyAudienceSegment[] updateAudienceSegments(
      com.google.api.ads.dfp.axis.v201311.FirstPartyAudienceSegment[] segments)
      throws java.rmi.RemoteException, com.google.api.ads.dfp.axis.v201311.ApiException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[3]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName(
            "https://www.google.com/apis/ads/publisher/v201311", "updateAudienceSegments"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {segments});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (com.google.api.ads.dfp.axis.v201311.FirstPartyAudienceSegment[]) _resp;
        } catch (java.lang.Exception _exception) {
          return (com.google.api.ads.dfp.axis.v201311.FirstPartyAudienceSegment[])
              org.apache.axis.utils.JavaUtils.convert(
                  _resp, com.google.api.ads.dfp.axis.v201311.FirstPartyAudienceSegment[].class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      if (axisFaultException.detail != null) {
        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
          throw (java.rmi.RemoteException) axisFaultException.detail;
        }
        if (axisFaultException.detail instanceof com.google.api.ads.dfp.axis.v201311.ApiException) {
          throw (com.google.api.ads.dfp.axis.v201311.ApiException) axisFaultException.detail;
        }
      }
      throw axisFaultException;
    }
  }
Esempio n. 21
0
  public void init(String urlStr, String cookieString) throws Exception {
    if (_service != null) {
      disconnect();
    }
    _locator = new VimServiceLocator();
    _locator.setMaintainSession(true);
    _service = _locator.getVimPort(new URL(urlStr));
    _sic = _service.retrieveServiceContent(_svcRef);

    org.apache.axis.client.Stub st = (org.apache.axis.client.Stub) _service;
    org.apache.axis.client.Call callObj = st._getCall();
    org.apache.axis.MessageContext msgContext = callObj.getMessageContext();
    msgContext.setProperty(
        org.apache.axis.transport.http.HTTPConstants.HEADER_COOKIE, cookieString);

    _svcState = ConnectionState_Connected;
  }
 /*参数 uuid : Sendmsg 输入的 uuid
  * 查询用户短信状态报告
  * 返回值说明 :0:失败,1:成功
  */
 public int GetRes(String uuid) {
   String endpoint = "http://10.1.5.244:8989/smsWebservice/services/smsMsg?wsdl";
   int result = 2;
   Service service = new Service();
   Call call;
   try {
     call = (Call) service.createCall();
     call.setTargetEndpointAddress(endpoint); // 远程调用路径
     call.setOperationName("GetRes"); // 调用的方法名
     result = (int) call.invoke(new Object[] {uuid}); // 远程调用
   } catch (ServiceException e) {
     e.printStackTrace();
   } catch (RemoteException e) {
     e.printStackTrace();
   }
   return result;
 }
  public int updateStatus(java.lang.String sMsisdn, int iStatus) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://service.mc.vasc.com", "updateStatus"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp =
          _call.invoke(new java.lang.Object[] {sMsisdn, new java.lang.Integer(iStatus)});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return ((java.lang.Integer) _resp).intValue();
        } catch (java.lang.Exception _exception) {
          return ((java.lang.Integer) org.apache.axis.utils.JavaUtils.convert(_resp, int.class))
              .intValue();
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public is.idega.idegaweb.marathon.webservice.impl.Registrations getRegistrations(
      java.lang.String runId, java.lang.String year) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[0]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("urn:MarathonRegistrationService", "getRegistrations"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {runId, year});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (is.idega.idegaweb.marathon.webservice.impl.Registrations) _resp;
        } catch (java.lang.Exception _exception) {
          return (is.idega.idegaweb.marathon.webservice.impl.Registrations)
              org.apache.axis.utils.JavaUtils.convert(
                  _resp, is.idega.idegaweb.marathon.webservice.impl.Registrations.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public void testCall(cgl.quakesim.disloc.ObsvPoint[] testBean) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[0]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://disloc.webservices.cgl", "testCall"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {testBean});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      }
      extractAttachments(_call);
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public void setArrowPlacemark(
      java.lang.String folderName, java.lang.String lineColor, double lineWidth, double arrowScale)
      throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[6]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://KmlGenerator.webservices.cgl", "setArrowPlacemark"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp =
          _call.invoke(
              new java.lang.Object[] {
                folderName,
                lineColor,
                new java.lang.Double(lineWidth),
                new java.lang.Double(arrowScale)
              });

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      }
      extractAttachments(_call);
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public de.epages.ws.orderdocument5.model.TGetInvoices_Return[] getInvoices(
      java.lang.String[] orders) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[4]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("urn://epages.de/WebService/OrderDocumentService/2009/01#getInvoices");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName(
            "urn://epages.de/WebService/OrderDocumentService/2009/01", "getInvoices"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {orders});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (de.epages.ws.orderdocument5.model.TGetInvoices_Return[]) _resp;
        } catch (java.lang.Exception _exception) {
          return (de.epages.ws.orderdocument5.model.TGetInvoices_Return[])
              org.apache.axis.utils.JavaUtils.convert(
                  _resp, de.epages.ws.orderdocument5.model.TGetInvoices_Return[].class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
  public void setCoordinateUnit(java.lang.String unit) throws java.rmi.RemoteException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[3]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName("http://KmlGenerator.webservices.cgl", "setCoordinateUnit"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {unit});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      }
      extractAttachments(_call);
    } catch (org.apache.axis.AxisFault axisFaultException) {
      throw axisFaultException;
    }
  }
Esempio n. 29
0
  public static Document loadSiteList2(String session, String sakaiHost) {

    String endpoint;
    String siteList = null;
    Service service = null;
    Call call = null;
    String axisPoint = sakaiHost + "/sakai-axis/";

    try {

      debugPrint("Retrieving Sites=" + session + " host=" + sakaiHost);

      // Retrieve Site List
      service = new Service();
      call = (Call) service.createCall();

      endpoint = axisPoint + "SakaiSite.jws";

      debugPrint("Site Retrieval " + endpoint + " session=" + session);

      call.setTargetEndpointAddress(new java.net.URL(endpoint));
      call.setOperationName("getToolsDom");

      siteList =
          (String) call.invoke(new Object[] {session, "", new Integer(1), new Integer(9999)});

      debugPrint(siteList);
      Document doc = Xml.readDocumentFromString(siteList);

      NodeList children = doc.getElementsByTagName("site");
      debugPrint("There are " + children.getLength() + " child elements.\n");

      if (children.getLength() < 1) {
        // pSession.setAttribute("error", "No sites available to you on " + sakaiHost);
        return null;
      }
      return doc;

    } catch (Exception e) {
      System.out.println("Exception:" + e.toString());
      return null;
    }
  }
  public com.bis.webservice.codegroup.types.CodeGroupBean getCodeGroupByLanguage(
      java.lang.String string_1, java.lang.String string_2, java.lang.String string_3)
      throws java.rmi.RemoteException, com.bis.webservice.codegroup.types.ServerErrorException,
          com.bis.webservice.codegroup.types.InvalidArgumentException,
          com.bis.webservice.codegroup.types.DataNotFoundException {
    if (super.cachedEndpoint == null) {
      throw new org.apache.axis.NoEndPointException();
    }
    org.apache.axis.client.Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(
        new javax.xml.namespace.QName(
            "http://codegroup.webservice.bis.com/", "getCodeGroupByLanguage"));

    setRequestHeaders(_call);
    setAttachments(_call);
    try {
      java.lang.Object _resp = _call.invoke(new java.lang.Object[] {string_1, string_2, string_3});

      if (_resp instanceof java.rmi.RemoteException) {
        throw (java.rmi.RemoteException) _resp;
      } else {
        extractAttachments(_call);
        try {
          return (com.bis.webservice.codegroup.types.CodeGroupBean) _resp;
        } catch (java.lang.Exception _exception) {
          return (com.bis.webservice.codegroup.types.CodeGroupBean)
              org.apache.axis.utils.JavaUtils.convert(
                  _resp, com.bis.webservice.codegroup.types.CodeGroupBean.class);
        }
      }
    } catch (org.apache.axis.AxisFault axisFaultException) {
      if (axisFaultException.detail != null) {
        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
          throw (java.rmi.RemoteException) axisFaultException.detail;
        }
        if (axisFaultException.detail
            instanceof com.bis.webservice.codegroup.types.ServerErrorException) {
          throw (com.bis.webservice.codegroup.types.ServerErrorException) axisFaultException.detail;
        }
        if (axisFaultException.detail
            instanceof com.bis.webservice.codegroup.types.InvalidArgumentException) {
          throw (com.bis.webservice.codegroup.types.InvalidArgumentException)
              axisFaultException.detail;
        }
        if (axisFaultException.detail
            instanceof com.bis.webservice.codegroup.types.DataNotFoundException) {
          throw (com.bis.webservice.codegroup.types.DataNotFoundException)
              axisFaultException.detail;
        }
      }
      throw axisFaultException;
    }
  }