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

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


                                           EventDataWriter writer)
        throws Exception {
        if (writer != null) {
            OperationInfo opInfo = boi.getOperationInfo();
            List<Object> args = arguments;
            OperationType opType = boi.getExtensor(OperationType.class);
            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
            for (int i = 0; i < args.size(); i++) {
                MessagePartInfo part = getInputMessagePartInfo(opInfo, i);    
                Object partValue = args.get(i);
View Full Code Here


            CorbaStreamable exStreamable = message.getStreamableException();
            if (exStreamable != null) {
                EventDataReader reader = (EventDataReader) ContextUtils.getDataReader(message);

                BindingOperationInfo bopInfo = message.getExchange().get(BindingOperationInfo.class);
                OperationType opType = bopInfo.getExtensor(OperationType.class);
                OperationInfo opInfo = bopInfo.getOperationInfo();
               
                List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();

                ServiceInfo service = message.getExchange().get(ServiceInfo.class);
View Full Code Here

    }   
   
    private void addCorbaOperationExtElement(BindingOperation bo, Operation op)
        throws Exception {

        OperationType operationType = null;
        try {
            operationType = (OperationType)extReg.createExtension(BindingOperation.class,
                                                                  CorbaConstants.NE_CORBA_OPERATION);
        } catch (WSDLException wse) {           
            LOG.log(Level.SEVERE, "Failed to create a Binding Operation extension", wse);
            throw new Exception(LOG.toString(), wse);
        }

        operationType.setName(op.getName());
        List<ParamType> params = new ArrayList<ParamType>();
        List<ArgType> returns = new ArrayList<ArgType>();

        wsdlParameter.processParameters(this, op, def, xmlSchemaList, params, returns, true);

        for (ParamType paramtype : params) {
            operationType.getParam().add(paramtype);
        }
        for (ArgType retType : returns) {
            operationType.setReturn(retType);
        }

        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

        EasyMock.expect(message.getExchange()).andReturn(exchange);     
        EasyMock.expect(destination.getAddress()).andReturn(etype);
        EasyMock.expect(opInfo.getInput()).andReturn(mInfo);
        exchange.setInMessage(message);
        EasyMock.expectLastCall();       
        OperationType opType = control.createMock(OperationType.class);
        List<ParamType> paramTypes = control.createMock(List.class);
        EasyMock.expect(opType.getParam()).andReturn(paramTypes);
        EasyMock.expect(paramTypes.size()).andReturn(0);
       
        control.replay();
        inInterceptor.prepareArguments(message, destination, info, opType, qname);
        control.verify();   
View Full Code Here

        }
       
        QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
        BindingInfo bInfo = destination.getBindingInfo();
        BindingOperationInfo bopInfo = bInfo.getOperation(name);       
        OperationType opType = bopInfo.getExtensor(OperationType.class);
        List<ParamType> paramTypes = opType.getParam();
                       
        inInterceptor.setOrb(orb);               
        CorbaStreamable[] streamables = new CorbaStreamable[1];   
        NVList nvlist = inInterceptor.prepareDIIArgsList(message, streamables, paramTypes, typeMaps);
        assertNotNull("NVList should not be null", nvlist != null);       
View Full Code Here

        }
    }

    public void close(Message message) throws IOException {
        BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
        OperationType opType = boi.getExtensor(OperationType.class);
       
        try {
            buildRequest((CorbaMessage)message, opType);           
            message.getContent(OutputStream.class).close();
        } catch (Exception ex) {
View Full Code Here

       
        // generate corba return param
        ArgType corbaReturn = generateCorbaReturnParam(typeNode);
       
        // generate corba operation
        OperationType corbaOp = generateCorbaOperation(op, null, corbaReturn);
       
        // generate binding
        BindingOperation corbaBindingOp = generateCorbaBindingOperation(binding, op, corbaOp);
    }
View Full Code Here

       
        // generate corba return param
        ParamType corbaParam = generateCorbaParam(typeNode);
       
        // generate corba operation
        OperationType corbaOp = generateCorbaOperation(op, corbaParam, null);
       
        // generate binding
        BindingOperation corbaBindingOp = generateCorbaBindingOperation(binding, op, corbaOp);
    }
View Full Code Here

     * @param param is the corba parameter, none if null.
     * @param arg is the corba return parameter, none if null.
     * @return the generated corba:operation.
     */
    private OperationType generateCorbaOperation(Operation op, ParamType param, ArgType arg) {
        OperationType operation = new OperationType();
        try {
            operation = (OperationType)extReg.createExtension(BindingOperation.class,
                                                              CorbaConstants.NE_CORBA_OPERATION);
        } catch (WSDLException ex) {
            throw new RuntimeException(ex);
        }
        operation.setName(op.getName());
  
        if (param != null) {
            operation.getParam().add(param);
        }
       
        if (arg != null) {
            operation.setReturn(arg);
        }
       
        return operation;
    }
View Full Code Here

    private void checkSequenceType(BindingOperation bindingOperation, TypeMappingType mapType) {
        Iterator bOp = bindingOperation.getExtensibilityElements().iterator();
        while (bOp.hasNext()) {
            ExtensibilityElement extElement = (ExtensibilityElement)bOp.next();
            if (extElement.getElementType().getLocalPart().equals("operation")) {
                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_h");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("Y.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("Y.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Sequence seq = (Sequence)mapType.getStructOrExceptionOrUnion().get(4);
                assertEquals("ElementType is incorrect for Sequence Type", "fixed_1", seq.getElemtype()
                    .getLocalPart());
            }
View Full Code Here

TOP

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

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.