Examples of Exception


Examples of org.apache.schemas.yoko.bindings.corba.Exception

    public CorbaStreamable createStreamableException(Any exception, RaisesType exRaises) {
        // first, we need to get the definition of the exception.  All we have from the raises type is the
        // exception idl type
        QName exIdlType = exRaises.getException();
        List<CorbaTypeMap> typeMaps = corbaBinding.getCorbaTypeMaps();
        Exception ex = null;
        for (Iterator i = typeMaps.iterator(); i.hasNext();) {
            CorbaTypeMap tm = (CorbaTypeMap)i.next();
            if (tm.getTargetNamespace().equals(exIdlType.getNamespaceURI())) {
                ex = (Exception)tm.getType(exIdlType.getLocalPart());
                break;
            }
        }
       
        if (ex == null) {
            throw new CorbaBindingException("Unable to find definition for thrown exception");
        }
       
        TypeCode tc = CorbaUtils.getTypeCode(orb, exIdlType, typeMaps);
        // TODO: Revisit - What should the name of the object holder be?
        CorbaExceptionHandler obj = new CorbaExceptionHandler(new QName(ex.getName()), exIdlType, tc, ex);
        List<MemberType> exMembers = ex.getMember();
        for (Iterator i = exMembers.iterator(); i.hasNext();) {
            MemberType member = (MemberType)i.next();
            QName memberName = new QName(member.getName());
            QName memberType = member.getIdltype();
            CorbaObjectHandler memberObj =
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Exception

        }
    }

    public void writeException(CorbaObjectHandler obj) throws CorbaBindingException {
        CorbaExceptionHandler exHandler = (CorbaExceptionHandler)obj;
        Exception exType = (Exception)exHandler.getType();
        List<CorbaObjectHandler> exMembers = exHandler.getMembers();
   
        stream.write_string(exType.getRepositoryID());
        for (int i = 0; i < exMembers.size(); ++i) {
            this.write(exMembers.get(i));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.