Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaException


            throw e;
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a output: " + name;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        }
    }
View Full Code Here


            WSIFService service = WSIFServiceFactory.newInstance().getService(definitions);
            WSIFPort port = service.getPort();
            this.gFacOperation = port.createOperation(CREATE_SERVICE_OPERATION);
        } catch (RuntimeException e) {
            String message = "Failed to connect to the Generic Factory: " + wsdlURI;
            throw new XBayaException(message, e);
        }
    }
View Full Code Here

                    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.info("WSDL: " + wsdl);

            XmlElement definitionsElement = XMLUtil.stringToXmlElement3(wsdl);

            this.serviceDefinitions = new WsdlDefinitions(definitionsElement);
            return this.serviceDefinitions;
        } catch (RuntimeException e) {
            String message = "Failed to create a service";
            throw new XBayaException(message, e);
        }
    }
View Full Code Here

        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

     */
    public void setup() throws XBayaException {

        if (this.gfacURL == null) {
            String message = "The location of the Generic Factory is not specified.";
            throw new XBayaException(message);
        }

        if (this.portTypeQName == null) {
            String message = "Error in finding the service name";
            throw new XBayaException(message);
        }

        try {

            URI uri = new URI(this.gfacURL);

            /*
             * Substring to remove GfacService
             */
            String gfacPath = uri.getPath();
            if (gfacPath != null && gfacPath.contains("/")) {
                gfacPath = gfacPath.substring(0, gfacPath.lastIndexOf('/') + 1) + portTypeQName.getLocalPart();
            }
            URI getWsdlURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), gfacPath
                    + "/getWSDL", uri.getQuery(), uri.getFragment());

            logger.info("getWSDL service:" + getWsdlURI.toString());

            WsdlDefinitions concreteWSDL = WsdlResolver.getInstance().loadWsdl(getWsdlURI);

            this.invoker = InvokerFactory.createInvoker(this.portTypeQName, concreteWSDL, null, this.messageBoxURL,
                    null, true);
            this.invoker.setup();
        } catch (XBayaException xe) {
            throw xe;
        } catch (Exception e) {
            throw new XBayaException(e.getMessage(), e);
        }

    }
View Full Code Here

            } catch (ExecutionException e) {
                // The service-failed notification should have been sent
                // already.
                logger.error(e.getMessage(), e);
                String message = "Error in invoking a service: " + this.serviceInformation;
                throw new XBayaException(message, e);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error in invoking a service: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        }

        boolean success = super.invoke();
        if (!success) {
            try {
View Full Code Here

                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);
            }
        } catch (InterruptedException e) {
            logger.error(e.getMessage(), e);
        } catch (ExecutionException e) {
            // The service-failed notification should have been sent already.
            logger.error(e.getMessage(), e);
            String message = "Error in invoking a service: " + this.serviceInformation;
            throw new XBayaException(message, e);
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a service to finish: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        }
    }
View Full Code Here

            throw e;
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error while waiting for a output: " + name;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        }
    }
View Full Code Here

            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error in setting an input. name: " + name + " value: " + value;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (RegistryException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        } catch (Exception e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }
View Full Code Here

            } catch (ExecutionException e) {
                // The service-failed notification should have been sent
                // already.
                logger.error(e.getMessage(), e);
                String message = "Error in invoking a service: " + this.serviceInformation;
                throw new XBayaException(message, e);
            }
        } catch (RuntimeException e) {
            logger.error(e.getMessage(), e);
            String message = "Error in invoking a service: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Error e) {
            logger.error(e.getMessage(), e);
            String message = "Unexpected error: " + this.serviceInformation;
            this.notifier.invocationFailed(message, e);
            throw new XBayaException(message, e);
        } catch (Exception e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }
        return true;
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.XBayaException

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.