Package xsul.wsif

Examples of xsul.wsif.WSIFMessage


                logger.info("name: " + name);
                Object value = output.getValue();
                logger.info("value: " + value);
            }
        } else {
            WSIFMessage fault = invoker.getFault();
            logger.info("fault: " + fault);
        }

    }
View Full Code Here


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

   * @see edu.indiana.extreme.xbaya.workflow.WorkflowInvoker#invoke()
   */
  public synchronized void invoke() throws XBayaException {
   
    try{
    WSIFMessage inputMessage = this.invoker.getInputs();
    logger.finest("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 = WorkflowInvokerWrapperForGFacInvoker.this.invoker.invoke();
          if (success) {
            // Send notification
            WSIFMessage outputMessage = WorkflowInvokerWrapperForGFacInvoker.this.invoker
                .getOutputs();
            // An implementation of WSIFMessage,
            // WSIFMessageElement, implements toString(), which
            // serialize the message XML.
            logger.finest("outputMessage: " + outputMessage);
            WorkflowInvokerWrapperForGFacInvoker.this.notifier
                .serviceFinished(outputMessage);
          } else {
            WSIFMessage faultMessage = WorkflowInvokerWrapperForGFacInvoker.this.invoker
                .getFault();
            // An implementation of WSIFMessage,
            // WSIFMessageElement, implements toString(), which
            // serialize the message XML.
            logger.finest("received fault: " + 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 XBayaException(message);
      }
      logger.exiting();
    } catch (InterruptedException e) {
      logger.caught(e);
View Full Code Here

  public synchronized void invoke() throws XBayaException {

    logger.entering();

    try {
      WSIFMessage inputMessage = this.invoker.getInputs();
      logger.finest("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.finest("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.finest("received fault: " + 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 XBayaException(message);
      }
      logger.exiting();
    } catch (InterruptedException e) {
      logger.caught(e);
View Full Code Here

   */
  public WsdlDefinitions createService(String serviceQName)
      throws XBayaException {
    logger.entering(new Object[] { serviceQName });
    try {
      WSIFMessage inputMessage = this.gFacOperation.createInputMessage();
      WSIFMessage outputMessage = this.gFacOperation
          .createOutputMessage();
      WSIFMessage faultMessage = this.gFacOperation.createFaultMessage();

      inputMessage.setObjectPart(SERVICE_QNAME_PART, serviceQName);
      inputMessage.setObjectPart(SECURITY_PART, SECURITY_NONE);

      logger.finest("inputMessage: " + inputMessage);
      boolean success = this.gFacOperation
          .executeRequestResponseOperation(inputMessage,
              outputMessage, faultMessage);
      if (!success) {
        // An implementation of WSIFMessage, WSIFMessageElement,
        // implements toString(), which serialize the message XML.
        String message = "Failed to create a service: "
            + faultMessage.toString();
        throw new XBayaException(message);
      }

      String wsdl = (String) outputMessage.getObjectPart(WSDL_PART);
      logger.finest("WSDL: " + wsdl);
View Full Code Here

    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: "
          + faultMessage.toString();
      throw new XBayaException(message);
    }
  }
View Full Code Here

          credential.getName().toString(), new URI(topic), null, null);
      defaultLeadHeader.setExperimentId(topic);
      LEADWorkflowInvoker invoker = new LEADWorkflowInvoker(wsdl,
          defaultLeadHeader, null, secureInvoker, operationName);
     
      WSIFMessage inputMessage = invoker.getInputMessage();
//      inputMessage.setObjectPart("input", XmlConstants.BUILDER.newFragment("<n1:Run xmlns:n1='http://www.extreme.indiana.edu/xbaya/demok/xsd/'><file1>fds</file1><file2>fsfas</file2></n1:Run>"));
      inputMessage.setObjectPart("input", "tttt");
//      inputMessage.setObjectPart("file2", "tttt");
      invoker.invoke();
    } catch (ComponentException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

      // 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(
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.