Package org.oasisopen.sca

Examples of org.oasisopen.sca.ServiceRuntimeException


                    if (provider.supportsFeedEntries())
                        msg.setFaultBody(new NotFoundException());
                    else
                        msg.setFaultBody(new org.apache.tuscany.sca.data.collection.NotFoundException());
                } else {
                    msg.setFaultBody(new ServiceRuntimeException("HTTP status code: " + status));
                }

            } catch (Exception e) {
                msg.setFaultBody(new ServiceRuntimeException(e));
            } finally {

                // Release the connection unless the Abdera parser is
                // parsing the response, in this case it will release it
                release(getMethod, response);
View Full Code Here


    public B getService() {
        try {
            resolve();
            return getProxy();
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

    public Class<B> getBusinessInterface() {
        try {
            resolve();
            return businessInterface;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

                JavaInterfaceFactory javaInterfaceFactory = getJavaInterfaceFactory(compositeContext);

                try {
                    javaInterfaceFactory.createJavaInterface(javaInterface, javaInterface.getJavaClass());
                } catch (InvalidInterfaceException e) {
                    throw new ServiceRuntimeException(e);
                }
                //FIXME: If the interface needs XSDs to be loaded (e.g., for static SDO),
                // this needs to be done here.  We usually search for XSDs in the current
                // contribution at resolve time.  Is it possible to locate the current
                // contribution at runtime?
View Full Code Here

        try {
            Double balance = extEJBService.add(amount.doubleValue(), 1000); //invoke external ejb through ejb reference binding
            total =  balance + amount;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
        return total;
    }
View Full Code Here

            if (!name.startsWith("$") || name.startsWith("$dynamic$")) {
                regularServices.add(service);
            }
        }
        if (regularServices.size() == 0) {
            throw new ServiceRuntimeException("No service is declared on component " + component.getURI());
        }
        if (regularServices.size() != 1) {
            throw new ServiceRuntimeException("More than one service is declared on component " + component.getURI()
                + ". Service name is required to get the service.");
        }
        targetService = regularServices.get(0);
        return targetService;
    }
View Full Code Here

        try {
            return createSelfReference(businessInterface, service);
        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (ServiceRuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e.getMessage(), e);
        }
    }
View Full Code Here

            ref.setComponent(component);
            return getServiceReference(businessInterface, ref);
        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

                        .getCompositeContext());
            }
        } catch (IllegalArgumentException iae) {
            throw iae;
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.oasisopen.sca.ServiceRuntimeException

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.