Package org.apache.axis2.corba.exceptions

Examples of org.apache.axis2.corba.exceptions.CorbaInvocationException


                            break;
                        }
                    }
                }
                if (exceptionType==null) {
                    throw new CorbaInvocationException(exception);
                } else {
                    ExceptionValue exceptionValue = (ExceptionValue) CorbaUtil.extractValue(exceptionType, userException.except);
                    if (exceptionValue!=null)
                        throw exceptionValue.getException();
                }
            } else {
                throw new CorbaInvocationException(exception);
            }
        }

        return returnValue;
    }
View Full Code Here


    public static IDL getIDL(AxisService service, ORB orb, String dirName) throws CorbaException {
        Parameter idlFile = service.getParameter(IDL_FILE);

        if (idlFile == null) {
            throw new CorbaInvocationException("Please specify the IDL file");   
        }

        String idlFileName = ((String) idlFile.getValue()).trim();
        String cacheKey = dirName + File.separator + idlFileName;
        IDL idl = (IDL) IDL_CACHE.get(cacheKey);
        if (idl==null) {
            try {
                /*File file = new File(dirName);
                InputStream stream;
                if (file.isDirectory()) {
                    stream = new FileInputStream(cacheKey);
                } else {
                    ZipInputStream zin = new ZipInputStream(new FileInputStream(file));

                    ZipEntry entry;
                    boolean found = false;
                    while ((entry = zin.getNextEntry()) != null) {
                        if (entry.getName().equalsIgnoreCase(idlFileName)) {
                            found = true;
                            break;
                        }
                    }

                    if (!found)
                        new CorbaInvocationException("cannot find " + idlFileName + " in " + file.getPath());

                    stream = zin;
                }*/
                InputStream stream = new PreProcessorInputStream(dirName, idlFileName);
                //TODO: Set pre-processor system and user input paths
                IDLProcessor idlProcessor = new IDLProcessor(stream);
                idl = idlProcessor.process();
                stream.close();
                IDL_CACHE.put(cacheKey, idl);
            } catch (IOException e) {
                throw new CorbaInvocationException("cannot process idl file", e);
            }
        }

        Map types = idl.getCompositeDataTypes();
        if (types!=null) {
View Full Code Here

    public static Invoker getInvoker(AxisService service, org.omg.CORBA.Object obj, IDL idl, String methodName) throws CorbaInvocationException {
        InvokerFactory invokerFactory = new CorbaInvokerFactory(idl);
        Parameter interfaceName = service.getParameter(INTERFACE_NAME);
        if (interfaceName==null)
            throw new CorbaInvocationException("interfaceName cannot be null");
        return invokerFactory.newInvoker(((String) interfaceName.getValue()).trim(), methodName, obj);
    }
View Full Code Here

            if (compositeType instanceof ValueType)
                value = new ObjectByValue((ValueType) compositeType);
            else if (compositeType instanceof Struct)
                value = new StructValue((Struct) compositeType);
            else
                throw new CorbaInvocationException("Parameter type not supported");

            value.setMemberValues(compositeValues);
            return value;
        }
        return null;
View Full Code Here

        }
        setMemberValues(memberValues);
    }

    public CorbaInvocationException getException() {
        return new CorbaInvocationException(toString());
    }
View Full Code Here

  public Invoker newInvoker(String interfaceName, String operationName, org.omg.CORBA.Object object) throws CorbaInvocationException {
        Interface intf = (Interface) interfaces.get(interfaceName);

        if (intf==null)
            throw new CorbaInvocationException("Interface " + interfaceName + " not found");

        Map operations = intf.getOperationsMap();

        if (operations==null || operations.isEmpty())
            throw new CorbaInvocationException("Interface " + interfaceName + " does not have operations");

        Operation operation = (Operation) operations.get(operationName);

        if (operation==null)
            throw new CorbaInvocationException("Operation " + operationName + " not found in interface " + interfaceName);

        return new CorbaInvoker(operation, intf, /*compositeDataTypes,*/ object);
  }
View Full Code Here

                    orb = orbParam != null ? (ORB) orbParam.getValue() : CorbaUtil.getORB(service);
                }
                org.omg.CORBA.Object obj = CorbaUtil.resolveObject(service, orb);
                Parameter idlParameter = service.getParameter(IDL_LITERAL);
                if (idlParameter==null)
                    throw new CorbaInvocationException("No IDL found");
                IDL idl = (IDL) idlParameter.getValue();
                invoker = CorbaUtil.getInvoker(service, obj, idl, methodName);
                invokerCache.put(methodName, invoker);
            }
View Full Code Here

                    orb = orbParam != null ? (ORB) orbParam.getValue() : CorbaUtil.getORB(service);
                }
                org.omg.CORBA.Object obj = CorbaUtil.resolveObject(service, orb);
                Parameter idlParameter = service.getParameter(IDL_LITERAL);
                if (idlParameter==null)
                    throw new CorbaInvocationException("IDL not found");
                IDL idl = (IDL) idlParameter.getValue();
                invoker = CorbaUtil.getInvoker(service, obj, idl, methodName);
                invokerCache.put(methodName, invoker);
            }
View Full Code Here

                obj = orb.string_to_object((new String(buf)).trim());
                fileReader.close();
            } else if (iorString!=null) {
                obj = orb.string_to_object(((String) iorString.getValue()).trim());
            } else {
                throw new CorbaInvocationException("cannot resolve object");
            }

        } catch (NotFound notFound) {
            throw new CorbaInvocationException("cannot resolve object", notFound);
        } catch (CannotProceed cannotProceed) {
            throw new CorbaInvocationException("cannot resolve object", cannotProceed);
        } catch (InvalidName invalidName) {
            throw new CorbaInvocationException("cannot resolve object", invalidName);
        } catch (IOException e) {
            throw new CorbaInvocationException("cannot resolve object", e);
        }
        return obj;
    }
View Full Code Here

                    orb = orbParam != null ? (ORB) orbParam.getValue() : CorbaUtil.getORB(service);
                }
                org.omg.CORBA.Object obj = CorbaUtil.resolveObject(service, orb);
                Parameter idlParameter = service.getParameter(IDL_LITERAL);
                if (idlParameter==null)
                    throw new CorbaInvocationException("IDL not found");
                IDL idl = (IDL) idlParameter.getValue();
                invoker = CorbaUtil.getInvoker(service, obj, idl, methodName);
                invokerCache.put(methodName, invoker);
            }
View Full Code Here

TOP

Related Classes of org.apache.axis2.corba.exceptions.CorbaInvocationException

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.