Package org.osoa.sca

Examples of org.osoa.sca.ServiceRuntimeException


                Writer w = new OutputStreamWriter(new FileOutputStream(file));
                w.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
                w.write(item.getContents());
                w.close();
            } catch (IOException e) {
                throw new ServiceRuntimeException(e);
            }
        }
       
        // Write the composite collection
        writeCompositeCollection(compositeCollection);
View Full Code Here


            try {
                FileInputStream is = new FileInputStream(file);
                XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
                compositeCollection = compositeProcessor.read(reader);
            } catch (Exception e) {
                throw new ServiceRuntimeException(e);
            }
        } else {
            compositeCollection = assemblyFactory.createComposite();
            String name;
            int d = compositeFile.lastIndexOf('.');
View Full Code Here

            // Write to domain.composite
            FileOutputStream os = new FileOutputStream(new File(compositeFile));
            XMLSerializer serializer = new XMLSerializer(os, format);
            serializer.serialize(document);
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

                            return clone.invoke(data, (Object[])null);
                        } catch (InvocationTargetException e) {
                            if (e.getTargetException() instanceof CloneNotSupportedException) {
                                // Ignore
                            } else {
                                throw new ServiceRuntimeException(e);
                            }
                        } catch (Exception e) {
                            throw new ServiceRuntimeException(e);
                        }
                    } catch (NoSuchMethodException e) {
                        // Ignore it
                    }
                }
View Full Code Here

                }
                */

                DataType targetFaultType = getFaultType(targetDataType);
                if (targetFaultType == null) {
                    throw new ServiceRuntimeException("Target fault type cannot be resolved: " + targetDataType,
                                                      (Throwable)result);
                    // throw new TransformationException("Target fault type cannot be resolved: " + targetDataType);
                }

                // FIXME: How to match a source fault type to a target fault
                // type?
                DataType sourceDataType = null;
                DataType sourceFaultType = null;
                for (DataType exType : sourceOperation.getFaultTypes()) {
                    DataType faultType = getFaultType(exType);
                    // Match by the QName (XSD element) of the fault type
                    if (faultType != null && typesMatch(targetFaultType.getLogical(), faultType.getLogical())) {
                        sourceDataType = exType;
                        sourceFaultType = faultType;
                        break;
                    }
                }

                if (sourceFaultType == null) {
                    throw new ServiceRuntimeException("No matching source fault type is found: " + targetFaultType,
                                                      (Throwable)result);
                    // throw new TransformationException("No matching source fault type is found: " + targetFaultType);
                }

                Object newResult =
View Full Code Here

            } else {
                // Remove dead VM entry
                try {
                    vm.stop();
                } catch (InterruptedException e) {
                    throw new ServiceRuntimeException(e);
                }
                nodeVMs.remove(vm);
            }
        }

        // Start a new VM and add it to the collection
        vm = new SCANodeVM(key);
        nodeVMs.add(0, vm);
        try {
            vm.start();
        } catch (IOException e) {
            throw new ServiceRuntimeException(e);
        }
       
        return key;
    }
View Full Code Here

        SCANodeVM vm = vm(key);
        if (vm != null) {
            try {
                vm.stop();
            } catch (InterruptedException e) {
                throw new ServiceRuntimeException(e);
            }
            nodeVMs.remove(vm);
        } else {
            //throw new NotFoundException();
        }
View Full Code Here

            result = wire.invoke(jsonOperation, args);
            try {
                jsonResponse.put("result", result);
                jsonResponse.putOpt("id", id);
            } catch (Exception e) {
                throw new ServiceRuntimeException(e);
            }
        } catch (InvocationTargetException e) {
            try {
                jsonResponse.put("error", e.getCause());
                jsonResponse.putOpt("id", id);
            } catch (Exception e1) {
                throw new ServiceRuntimeException(e);
            }
        } catch(RuntimeException e) {
            e.printStackTrace();
            throw e;
        }
View Full Code Here

            }
           
            return scaNodeFactory;

        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
       
    }
View Full Code Here

   
            ProxyFactory proxyFactory = compositeActivator.getProxyFactory();
            return new ServiceReferenceImpl<B>(businessInterface, component, reference, binding, proxyFactory, compositeActivator);
           
        } catch (Exception e) {
            throw new ServiceRuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.osoa.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.