Package xsul.wsif

Examples of xsul.wsif.WSIFOperation


        wclient.addHandler(handler);
        wclient.useAsyncMessaging(correlator);
        wclient.setAsyncResponseTimeoutInMs(33000L);

        WSIFPort port = wclient.getPort();
        WSIFOperation operation = port.createOperation("Run");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        // inputMessage.setObjectPart("InputParam1", "Hello");
        inputMessage.setObjectPart("InputParam1", "100");

        logger.info("inputMessage: "
                + XsulUtil.safeXmlToString((XmlElement) inputMessage));
        boolean success = operation.executeRequestResponseOperation(
                inputMessage, outputMessage, faultMessage);

        XmlElement result;
        if (success) {
            result = (XmlElement) outputMessage;
View Full Code Here


                .useAsyncMessaging(correlator).setAsyncResponseTimeoutInMs(
                        33000L); // to simplify testing set to just few
        // seconds

        WSIFPort port = wclient.getPort();
        WSIFOperation operation = port.createOperation("generate");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        inputMessage.setObjectPart("n", "3");

        logger.info("Sending a message:\n"
                + XMLUtil.xmlElementToString((XmlElement) inputMessage));
        boolean success = operation.executeRequestResponseOperation(
                inputMessage, outputMessage, faultMessage);

        XmlElement result;
        if (success) {
            result = (XmlElement) outputMessage;
View Full Code Here

    public WSIFMessage sendSOAPMessage(WSIFClient wclient, Object[][] args,
            String opName) throws ComponentRegistryException {

        WSIFPort port = wclient.getPort();

        WSIFOperation operation = port.createOperation(opName);
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();
        String messageName = operation.createInputMessage().getName();
        XmlElement inputMsgElem = builder.newFragment(this.requestNS,
                messageName);

        for (int i = 0; i < args.length; i++) {
            createMessage((String) args[i][0], args[i][1], inputMsgElem);
        }

        WSIFMessageElement inputMessage = new WSIFMessageElement(inputMsgElem);

        boolean success = operation.executeRequestResponseOperation(
                inputMessage, outputMessage, faultMessage);
        if (success) {
            logger.finest("" + outputMessage);
            return outputMessage;
        } else {
View Full Code Here

                    .useAsyncMessaging(correlator).setAsyncResponseTimeoutInMs(
                    33000L); // to simplify testing set to just few
            // seconds

            WSIFPort port = wclient.getPort();
            WSIFOperation operation = port.createOperation("deploy");

            WSIFMessage outputMessage = operation.createOutputMessage();
            WSIFMessage faultMessage = operation.createFaultMessage();

            XmlElement inputMessageElement = xmlObjectToEl(getDeployPayload());

            WSIFMessage inputMessage = new WSIFMessageElement(inputMessageElement);


            System.out.println("Sending a message:\n"
                    + XMLUtil.xmlElementToString((XmlElement) inputMessage));
            boolean success = operation.executeRequestResponseOperation(
                    inputMessage, outputMessage, faultMessage);

            XmlElement result;
            if (success) {
                result = (XmlElement) outputMessage;
View Full Code Here

   */
  public void shutdownService() throws XBayaException {
    WSIFService service = WSIFServiceFactory.newInstance().getService(
        this.serviceDefinitions);
    WSIFPort port = service.getPort();
    WSIFOperation operation = port.createOperation(SHUTDOWN_OPERATION);

    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
    WSIFMessage faultMessage = operation.createFaultMessage();

    boolean success = operation.executeRequestResponseOperation(
        inputMessage, outputMessage, faultMessage);
    if (!success) {
      // An implementation of WSIFMessage, WSIFMessageElement,
      // implements toString(), which serialize the message XML.
      String message = "Failed to shutdown the service: "
View Full Code Here

          .setAsyncResponseTimeoutInMs(33000L); // to simplify testing
      // set to just few
      // seconds

      WSIFPort port = wclient.getPort();
      WSIFOperation operation = port.createOperation("deploy");

      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();
      XmlElement inputMessageElement = xmlObjectToEl(getDeploymentPayload(
          workflow, this.xbayaEngine.getConfiguration().getDSCURL()));
      WSIFMessage inputMessage = new WSIFMessageElement(
          inputMessageElement);

      System.out.println("Sending a message:\n"
          + XMLUtil.xmlElementToString((XmlElement) inputMessage));
      boolean success = operation.executeRequestResponseOperation(
          inputMessage, outputMessage, faultMessage);

      XmlElement result;
      if (success) {
        result = (XmlElement) outputMessage;
View Full Code Here

        WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(streamEngine));
    WSIFPort port = service.getPort();
    WSIFClient client = WSIFRuntime.getDefault().newClientFor(port);

    String operationName = "registerQuery";
    WSIFOperation operation = port.createOperation(operationName);
    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
    WSIFMessage faultMessage = operation.createFaultMessage();

    inputMessage
        .setObjectPart("endpoint",
            "http://pagodatree.cs.indiana.edu:17080/ode/processes/velocityhh?wsdl");
    inputMessage.setObjectPart("startTime", "D");
    inputMessage.setObjectPart("endTime", "d");
    inputMessage.setObjectPart("epl",
        "select * from java.lang.String.win:length_batch(2)");
    inputMessage.setObjectPart("topic", "skkkk");

    boolean res = operation.executeRequestResponseOperation(inputMessage,
        outputMessage, faultMessage);
    if (res) {
      System.out.println(outputMessage.getObjectPart("return"));
    } else {
      System.out.println(faultMessage.toString());
View Full Code Here

          .setAsyncResponseTimeoutInMs(33000L); // to simplify testing
      // set to just few
      // seconds

      WSIFPort port = wclient.getPort();
      WSIFOperation operation = port.createOperation("createInstance");

      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();

      ProcessNameDocument processNameDocument = ProcessNameDocument.Factory
          .newInstance();
      // TODO : do we use template id or process name here?
      processNameDocument.setProcessName(workflow.getName());

      XmlElement inputMessageElement = xmlObjectToEl(processNameDocument);

      WSIFMessage inputMessage = new WSIFMessageElement(
          inputMessageElement);

      System.out.println("Sending a message:\n"
          + XMLUtil.xmlElementToString((XmlElement) inputMessage));
      boolean success = operation.executeRequestResponseOperation(
          inputMessage, outputMessage, faultMessage);

      XmlElement result;
      if (success) {
        result = (XmlElement) outputMessage;
View Full Code Here

        .wsdlDefinitions5ToWsdlDefintions3(streamEngine));
    WSIFClient client = WSIFRuntime.getDefault()
        .newClientFor(service, null);
    WSIFPort port = client.getPort();
    String operationName = "registerQuery";
    WSIFOperation operation = port.createOperation(operationName);
    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
    WSIFMessage faultMessage = operation.createFaultMessage();

    // Somethign special for the control workflow
    String endpoint = "http://pagodatree.cs.indiana.edu:17080/ode/processes/Control_"
        + workflowname + "?wsdl";
    System.out.println(endpoint);
    String t = "5";
    inputMessage.setObjectPart("endpoint", endpoint);
    inputMessage.setObjectPart("startTime", t);
    inputMessage.setObjectPart("endTime", t);
    inputMessage.setObjectPart("epl", "select * from java.lang.String.win:length_batch(1)");
    // inputMessage.setObjectPart("secs", t);
    inputMessage.setObjectPart("topic", this.topicTextField.getText());
    boolean res = operation.executeRequestResponseOperation(inputMessage,
        outputMessage, faultMessage);
    if (res) {
      System.out.println(outputMessage.getObjectPart("return"));
    } else {
      System.out
View Full Code Here

                .useAsyncMessaging(correlator).setAsyncResponseTimeoutInMs(
                        33000L); // to simplify testing set to just few
        // seconds

        WSIFPort port = wclient.getPort();
        WSIFOperation operation = port.createOperation("echo");
        WSIFMessage inputMessage = operation.createInputMessage();
        WSIFMessage outputMessage = operation.createOutputMessage();
        WSIFMessage faultMessage = operation.createFaultMessage();

        inputMessage.setObjectPart("input", "test");

        logger.info("Using WSIF to send message:\n"
                + XMLUtil.xmlElementToString((XmlElement) inputMessage));
        boolean success = operation.executeRequestResponseOperation(
                inputMessage, outputMessage, faultMessage);

        XmlElement result;
        if (success) {
            result = (XmlElement) outputMessage;
View Full Code Here

TOP

Related Classes of xsul.wsif.WSIFOperation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.