Package org.apache.schemas.yoko.bindings.corba

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


        }
       
        Iterator iter = opType.getRaises().iterator();

        while (iter.hasNext()) {
            RaisesType rs = (RaisesType)iter.next();
            IdlType type = findType(rs.getException());           

            if (type instanceof IdlException) {
                idlOp.addException((IdlException)type);
            } else {
                String msgStr = type.fullName() + " is not a type.";
View Full Code Here


            List<RaisesType> exList = opType.getRaises();
            for (Iterator<RaisesType> i = exList.iterator(); i.hasNext();) {
                // REVISIT: Note that this assumes that exception names need to
                // be unique. We should make
                // sure that this is really the case.
                RaisesType raises = i.next();

                if (raises.getException().getLocalPart().equals(ex.getClass().getSimpleName())) {
                    exIdlType = raises.getException();
                    break;
                }
            }

            if (exIdlType != null) {
View Full Code Here

        List<RaisesType> exlist = control.createMock(ArrayList.class);               
        opType.getRaises();
        EasyMock.expectLastCall().andReturn(exlist);
        int i = 0;
        EasyMock.expect(exlist.size()).andReturn(i);       
        RaisesType rType = control.createMock(RaisesType.class);       
        EasyMock.expect(exlist.get(0)).andReturn(rType);
       
        control.replay();
        conduit.getOperationExceptions(opType, typeMaps);
        assertEquals(exlist.size(),0);       
View Full Code Here

        Map faults = op.getFaults();
        Iterator i = faults.values().iterator();              
        while (i.hasNext()) {
            Fault fault = (Fault)i.next();
            RaisesType raisestype = new RaisesType();           
            CorbaTypeImpl extype = convertFaultToCorbaType(xmlSchemaType, fault);

            if (extype != null) {
                raisestype.setException(helper.createQNameCorbaNamespace(extype.getName()));               
                operationType.getRaises().add(raisestype);
            }
        }
              
        bo.addExtensibilityElement(operationType);
View Full Code Here

        Exception ex = request.env().exception();
        if (ex != null) {
            if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException) ex;
                Any except = userEx.except;
                RaisesType raises = exceptions.get(except.type());
                if (raises == null) {
                    throw new CorbaBindingException("Couldn't find the exception type code to unmarshall");
                }
                QName elName = new QName("", raises.getException().getLocalPart());
                CorbaObjectHandler handler =
                    CorbaHandlerUtils.initializeObjectHandler(orb,
                                                              elName,
                                                              raises.getException(),
                                                              typeMaps,
                                                              service);
               
                CorbaStreamable exStreamable = new CorbaStreamable(handler, elName);
                exStreamable._read(except.create_input_stream());
View Full Code Here

                                         List<CorbaTypeMap> typeMaps) {
        Map<TypeCode, RaisesType> exceptions = new HashMap<TypeCode, RaisesType>();
        List<RaisesType> exList = operation.getRaises();
        if (exList != null) {
            for (int i = 0; i < exList.size(); ++i) {
                RaisesType ex = exList.get(i);
                TypeCode tc = CorbaUtils.getTypeCode(orb, ex.getException(), typeMaps);
                exceptions.put(tc, ex);
            }
        }

        return exceptions;
View Full Code Here

        fault.setMessage(faultMsg);
        fault.setName(faultMsg.getQName().getLocalPart());
        operation.addFault(fault);

        // binding - operation - corba:operation - corba:raises
        RaisesType raisesType = new RaisesType();
        raisesType.setException(new QName(typeMap.getTargetNamespace(),
                                          exceptionName));
        corbaOperation.getRaises().add(raisesType);

        // binding - operation - fault
        BindingFault bindingFault = definition.createBindingFault();
View Full Code Here

            fault.setMessage(faultMsg);
            fault.setName(faultMsg.getQName().getLocalPart());
            operation.addFault(fault);

            // binding - operation - corba:operation - corba:raises
            RaisesType raisesType = new RaisesType();
            raisesType.setException(new QName(typesVisitor.getCorbaTypeMapping().getTargetNamespace(),
                                              exceptionName));
            corbaOperation.getRaises().add(raisesType);

            // binding - operation - fault
            BindingFault bindingFault = definition.createBindingFault();
View Full Code Here

            QName exIdlType = null;
            List<RaisesType> exList = opElement.getRaises();
            for (Iterator<RaisesType> iter = exList.iterator(); iter.hasNext();) {
                // REVISIT: Note that this assumes that exception names need to be unique.  We should make
                // sure that this is really the case.
                RaisesType raises = iter.next();
                if (raises.getException().getLocalPart().equals(elName.getLocalPart())) {
                    exIdlType = raises.getException();
                }
            }
            if (exIdlType == null) {
                LOG.log(Level.INFO,
                        "Could not find the exception in the raises list.  Must be a system exception.");
View Full Code Here

        Map faults = op.getFaults();
        Iterator i = faults.values().iterator();              
        while (i.hasNext()) {
            Fault fault = (Fault)i.next();
            RaisesType raisestype = new RaisesType();           
            CorbaTypeImpl extype = convertFaultToCorbaType(xmlSchemaType, fault);

            if (extype != null) {
                raisestype.setException(createQNameCorbaNamespace(extype.getName()));               
                operationType.getRaises().add(raisestype);
            }
        }
              
        bo.addExtensibilityElement(operationType);
View Full Code Here

TOP

Related Classes of org.apache.schemas.yoko.bindings.corba.RaisesType

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.