Package xsul.wsif

Examples of xsul.wsif.WSIFMessage


    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


      // 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(
View Full Code Here

    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);
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result;
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a service to finish: " + this.serviceInformation;
View Full Code Here

     * @return
     * @throws WorkflowException
     */
    public synchronized boolean invoke() throws WorkflowException {
        try {
            WSIFMessage inputMessage = this.invoker.getInputs();
            logger.info("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
            this.notifier.invokingService(inputMessage);

            ExecutorService executor = Executors.newSingleThreadExecutor();
            this.result = executor.submit(new Callable<Boolean>() {
                @SuppressWarnings("boxing")
                public Boolean call() {
                    try {
                        boolean success = GenericInvoker.this.invoker.invoke();
                        if (success) {
                            // Send notification
                            WSIFMessage outputMessage = GenericInvoker.this.invoker.getOutputs();
                            // An implementation of WSIFMessage,
                            // WSIFMessageElement, implements toString(), which
                            // serialize the message XML.
                            logger.info("outputMessage: " + outputMessage);
                            GenericInvoker.this.notifier.serviceFinished(outputMessage);
                        } else {
                            WSIFMessage faultMessage = GenericInvoker.this.invoker.getFault();
                            // An implementation of WSIFMessage,
                            // WSIFMessageElement, implements toString(), which
                            // serialize the message XML.
                            logger.info("received fault: " + faultMessage);
                            GenericInvoker.this.notifier.receivedFault(faultMessage);
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result.get();
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (InterruptedException e) {
            logger.error(e.getMessage(), e);
        } catch (ExecutionException e) {
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result.get();
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (InterruptedException e) {
            logger.error(e.getMessage(), e);
        } catch (ExecutionException e) {
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result;
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a service to finish: " + this.serviceInformation;
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result;
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a service to finish: " + this.serviceInformation;
View Full Code Here

                }
            }
            // Wait for the job to finish.
            Boolean success = this.result;
            if (success == false) {
                WSIFMessage faultMessage = this.invoker.getFault();
                String message = "Error in a service: ";
                // An implementation of WSIFMessage,
                // WSIFMessageElement, implements toString(), which
                // serialize the message XML.
                message += faultMessage.toString();
                throw new WorkflowException(message);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a service to finish: " + this.serviceInformation;
View Full Code Here

TOP

Related Classes of xsul.wsif.WSIFMessage

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.