Package org.apache.airavata.xbaya

Examples of org.apache.airavata.xbaya.XBayaRuntimeException


        MyProxyClient myProxyClient = new MyProxyClient(myproxyServer, XBayaConstants.DEFAULT_MYPROXY_PORT, userName,
                password, XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
        try {
            myProxyClient.load();
        } catch (MyProxyException e) {
            throw new XBayaRuntimeException("Failed loading the myproxy", e);
        }
        GSSCredential gssCredential = myProxyClient.getProxy();
        return gssCredential;
    }
View Full Code Here


        }
        if (exception != null) {
            if (exception instanceof RuntimeException) {
                throw (RuntimeException) exception;
            } else {
                throw new XBayaRuntimeException(exception);
            }
        }
    }
View Full Code Here

            // Load anonymous certificate to access resource catalog.
            // This is a temporary solution
            InputStream anonymousCertificateStream = XBayaSecurity.class.getResourceAsStream(ANONYMOUS_CERTIFICATE);
            if (anonymousCertificateStream == null) {
                throw new XBayaRuntimeException("Failed to get InputStream to " + ANONYMOUS_CERTIFICATE);
            }

            sslContext.loadEAYKeyFile(anonymousCertificateStream, "");

            // Copied from PuretlsInvoker
            SSLPolicyInt policy = new SSLPolicyInt();
            policy.negotiateTLS(true);
            policy.waitOnClose(true);
            sslContext.setPolicy(policy);

            PuretlsInvoker invoker = new PuretlsInvoker(sslContext);
            WSIFProviderManager.getInstance().addProvider(new xsul.wsif_xsul_soap_gsi.Provider(invoker));
            WsdlResolver.getInstance().setSecureInvoker(invoker);

        } catch (GeneralSecurityException e) {
            throw new XBayaRuntimeException(e);
        } catch (IOException e) {
            throw new XBayaRuntimeException(e);
        }

    }
View Full Code Here

    }

    private static List<X509Certificate> getTrustedCertificates(String pass) {
        InputStream stream = XBayaSecurity.class.getResourceAsStream(pass);
        if (stream == null) {
            throw new XBayaRuntimeException("Failed to get InputStream to " + pass);
        }
        return SecurityUtil.readTrustedCertificates(stream);
    }
View Full Code Here

                    } catch (XBayaException e) {
                        logger.error(e.getMessage(), e);
                        // An appropriate message has been set in the exception.
                        GenericInvoker.this.notifier.invocationFailed(e.getMessage(), e);
                        GenericInvoker.this.failerSent = true;
                        throw new XBayaRuntimeException(e);
                    } catch (RuntimeException e) {
                        logger.error(e.getMessage(), e);
                        String message = "Error in invoking a service: " + GenericInvoker.this.serviceInformation;
                        GenericInvoker.this.notifier.invocationFailed(message, e);
                        GenericInvoker.this.failerSent = true;
View Full Code Here

            encodedPortType = URLEncoder.encode(portTypeQName.toString(), "UTF-8");
            URI epr = dscURI.resolve("/" + encodedPortType);
            return epr;
        } catch (UnsupportedEncodingException e) {
            // Should not happen
            throw new XBayaRuntimeException(e);
        }
    }
View Full Code Here

            System.out.println("In call back, response is: " + result.getStatus());
        }

        @Override
        public void receiveErrorjobStatus(java.lang.Exception e) {
            throw new XBayaRuntimeException(e);
        }
View Full Code Here

                    } catch (XBayaException e) {
                        logger.error(e.getMessage(), e);
                        // An appropriate message has been set in the exception.
                        WorkflowInvokerWrapperForGFacInvoker.this.notifier.invocationFailed(e.getMessage(), e);
                        WorkflowInvokerWrapperForGFacInvoker.this.failerSent = true;
                        throw new XBayaRuntimeException(e);
                    } catch (RuntimeException e) {
                        logger.error(e.getMessage(), e);
                        String message = "Error in invoking a service: "
                                + WorkflowInvokerWrapperForGFacInvoker.this.serviceInformation;
                        WorkflowInvokerWrapperForGFacInvoker.this.notifier.invocationFailed(message, e);
View Full Code Here

        if (arrayDimension == 1) {
            String typeName = declareArrayType(schema, type, wsdl);
            type = new QName(this.typesNamespace.getName(), typeName);
        } else if (arrayDimension > 1) {
            // TODO
            throw new XBayaRuntimeException("multi-dimentional arrays are not supported yet.");
        }

        if (WSConstants.XSD_ANY_TYPE.equals(type) && componentPort != null) {
            XmlElement elementElement = componentPort.getElement();
            if (elementElement == null) {
View Full Code Here

                // Need to copy the whole schema because it might have different
                // targetNamespace.
                XmlElement newSchema = WSDLUtil.getSchema(serviceWSDL, paramType);
                if (newSchema == null) {
                    // This should have been caught in WSComponent
                    throw new XBayaRuntimeException("could not find definition for type " + paramType + " in "
                            + WSDLUtil.getWSDLQName(serviceWSDL));
                }
                this.definitions.getTypes().addChild(XMLUtil.deepClone(newSchema));

                String prefix = declareNamespaceIfNecessary(paramType.getPrefix(), paramType.getNamespaceURI(), false);
View Full Code Here

TOP

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

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.