Examples of Exception


Examples of java.lang.Exception

            Application app = configManager.getExtensionDescriptor(
                     em.getName(), em.getLocation(), true);
            RoleMapper.removeRoleMapper(app.getRoleMapper().getName());
            appName = app.getRegistrationName();
        } catch (Exception ce) {
            throw new Exception(ce);
        }
       
        String contextRoot = null;
        ElementProperty ep = em.getElementPropertyByName("contextRoot");
        if(ep != null ){
            contextRoot = ep.getValue();
        } else {
            contextRoot = em.getName();
        }
       
        String virtualServers = null;
        try {
            virtualServers = configManager.getVirtualServers(em.getName());
        } catch(Exception ce) {
                 throw new Exception("Exception getting virtual servers by app name "
                    + appName, ce);
          
        }   
       
        return getWebContainer().disableWebModule(contextRoot,
View Full Code Here

Examples of java.lang.Exception

        setJ2eeAppBean(null);
        if (throwables != null && !throwables.isEmpty()) {
            //we don't have the ability to return all errors.  so return the
            //first one, enough to signal the problem.
            String msg = throwables.get(0).getMessage();
            Exception ex = new Exception(msg);
            ex.initCause(throwables.get(0));
            throw ex;
        } else {
            return true;
        }
       
View Full Code Here

Examples of java.lang.Exception

        } catch (Exception e) {
            System.out.println("Message check failed: ");
            e.printStackTrace();
        }
        if (failbuild)
            throw new Exception("Message check failed. \n" +
                "See error in build output or call ant runmessagecheck.");
    }   
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Exception

                    members[i] = ((Enumerator) enums.get(i)).getValue();
                }
                name = getTypeCodeName(name);
                tc = orb.create_enum_tc(enumType.getRepositoryID(), name, members);
            } else if (obj instanceof Exception) {
                Exception exceptType = (Exception)obj;

                // TODO: check to see if this is a recursive type.
                List<MemberType> list = exceptType.getMember();
                StructMember[] members = new StructMember[list.size()];
                for (int i = 0; i < members.length; ++i) {
                    MemberType member = (MemberType) list.get(i);
                    members[i] = new StructMember(member.getName(),
                                                  getTypeCode(orb, member.getIdltype(), typeMap, seenTypes),
                                                  null);
                }
                String name = getTypeCodeName(exceptType.getName());
                tc = orb.create_exception_tc(exceptType.getRepositoryID(), name, members);
            } else if (obj instanceof Fixed) {
                Fixed fixedType = (Fixed) obj;
                tc = orb.create_fixed_tc((short) fixedType.getDigits(), (short) fixedType.getScale());
            } else if (obj instanceof org.apache.cxf.binding.corba.wsdl.Object) {
                org.apache.cxf.binding.corba.wsdl.Object objType =
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Exception

        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short",
                                       CorbaConstants.NP_WSDL_CORBA);
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string",
                                        CorbaConstants.NP_WSDL_CORBA);
       
        Exception exceptType = new Exception();
        exceptType.setName("TestException");
        MemberType m1 = new MemberType();
        m1.setIdltype(shortIdlType);
        m1.setName("code");
        MemberType m2 = new MemberType();
        m2.setIdltype(stringIdlType);
        m2.setName("message");
        exceptType.getMember().add(m1);
        exceptType.getMember().add(m2);

        // build the object holder
        StructMember[] exceptMembers = new StructMember[2];
        exceptMembers[0] = new StructMember("code", orb.get_primitive_tc(TCKind.tk_short), null);
        exceptMembers[1] = new StructMember("message", orb.get_primitive_tc(TCKind.tk_string), null);
View Full Code Here

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

                                                  CorbaObjectHandler obj,
                                                  QName name,
                                                  XmlSchemaObject schemaType,
                                                  List<CorbaTypeMap> typeMaps,
                                                  ServiceInfo serviceInfo) {
        Exception exceptType = (Exception)obj.getType();
        List<MemberType> exceptMembers = exceptType.getMember();
        XmlSchemaComplexType ctype = (XmlSchemaComplexType) schemaType;
        QName qname = name;
        if (ctype.getQName() != null) {
            qname = ctype.getQName();
        }
View Full Code Here

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

       
        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception", CorbaConstants.NP_WSDL_CORBA);
        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
       
        Exception exceptType = new Exception();
        exceptType.setName("TestException");
        exceptType.setRepositoryID(reposID);
        MemberType m1 = new MemberType();
        m1.setIdltype(shortIdlType);
        m1.setName("code");
        MemberType m2 = new MemberType();
        m2.setIdltype(stringIdlType);
        m2.setName("message");
        exceptType.getMember().add(m1);
        exceptType.getMember().add(m2);

        // build the object holder
        StructMember[] exceptMembers = new StructMember[2];
        exceptMembers[0] = new StructMember("code", orb.get_primitive_tc(TCKind.tk_short), null);
        exceptMembers[1] = new StructMember("message", orb.get_primitive_tc(TCKind.tk_string), null);
View Full Code Here

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

        if (schemaType == null) {
            throw new CorbaBindingException("Couldn't find xml schema object for : " + idlType);
        }
        CorbaExceptionHandler obj = null;
        try {
            Exception exType = (Exception) CorbaUtils.getCorbaType(idlType, typeMaps);
            StartElement exStartEl = reader.nextEvent().asStartElement();
            obj = new CorbaExceptionHandler(exStartEl.getName(), idlType, tc, exType);
            XmlSchemaComplexType ctype = (XmlSchemaComplexType) schemaType;
            XmlSchemaGroupBase group = (XmlSchemaGroupBase) ctype.getParticle();
            List<MemberType> exMembers = exType.getMember();
            for (int i = 0; i < exMembers.size(); ++i) {
                CorbaObjectHandler member = readObjectFromStax(reader,
                                                               exMembers.get(i).getIdltype(),
                                                               group.getItems().getItem(i),
                                                               true);
View Full Code Here

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

        complexType.setParticle(sequence);

        element.setSchemaTypeName(complexType.getQName());
       
        // corba:exception
        Exception exception = new Exception();
        exception.setQName(new QName(typeMap.getTargetNamespace(), exceptionName));
        exception.setType(complexType.getQName());
        exception.setRepositoryID(scopedName.toIDLRepositoryID());

       
        // exception members
        AST memberTypeNode = identifierNode.getNextSibling();
        while (memberTypeNode != null) {
            AST memberNode = memberTypeNode.getNextSibling();

            TypesVisitor visitor = new TypesVisitor(exceptionScope,
                                                    schemas,
                                                    schema,
                                                    typeMap,
                                                    null);
            visitor.visit(memberTypeNode);
            XmlSchemaType stype = visitor.getSchemaType();
            CorbaTypeImpl ctype = visitor.getCorbaType();
           
            // needed for anonymous arrays in exceptions
            if (ArrayVisitor.accept(memberNode)) {
                Scope anonScope = new Scope(exceptionScope,
                                            TypesUtils.getCorbaTypeNameNode(memberTypeNode));
                ArrayVisitor arrayVisitor = new ArrayVisitor(anonScope,
                                                             schemas,
                                                             schema,
                                                             typeMap,
                                                             stype,
                                                             ctype,
                                                             null);
                arrayVisitor.visit(memberNode);
                stype = arrayVisitor.getSchemaType();
                ctype = arrayVisitor.getCorbaType();
            }

            // xmlschema:member
            XmlSchemaElement member = new XmlSchemaElement();
            String memberName = memberNode.toString();
            member.setName(memberName);
            member.setSchemaType(stype);
            member.setSchemaTypeName(stype.getQName());

            sequence.getItems().add(member);

           
            // corba:member
            MemberType memberType = new MemberType();
            memberType.setName(memberName);
            memberType.setIdltype(ctype.getQName());
            exception.getMember().add(memberType);
           
           
            memberTypeNode = memberNode.getNextSibling();
        }
View Full Code Here

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

       
        QName exceptIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "exception", CorbaConstants.NP_WSDL_CORBA);
        QName shortIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
        QName stringIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "string", CorbaConstants.NP_WSDL_CORBA);
       
        Exception exceptType = new Exception();
        exceptType.setName("TestException");
        MemberType m1 = new MemberType();
        m1.setIdltype(shortIdlType);
        m1.setName("code");
        MemberType m2 = new MemberType();
        m2.setIdltype(stringIdlType);
        m2.setName("message");
        exceptType.getMember().add(m1);
        exceptType.getMember().add(m2);

        // build the object holder
        StructMember[] exceptMembers = new StructMember[2];
        exceptMembers[0] = new StructMember("code", orb.get_primitive_tc(TCKind.tk_short), null);
        exceptMembers[1] = new StructMember("message", orb.get_primitive_tc(TCKind.tk_string), null);
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.