Examples of OperationType


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

        CorbaMessage msg = control.createMock(CorbaMessage.class);
        Exchange exg = control.createMock(Exchange.class);
        EasyMock.expect(msg.getExchange()).andReturn(exg);
        BindingOperationInfo bopInfo = control.createMock(BindingOperationInfo.class);
        EasyMock.expect(exg.get(BindingOperationInfo.class)).andReturn(bopInfo);
        OperationType opType = control.createMock(OperationType.class);
        bopInfo.getExtensor(OperationType.class);
        EasyMock.expectLastCall().andReturn(opType);
        conduit.buildRequest(msg, opType);
        EasyMock.expectLastCall();
        OutputStream os =control.createMock(OutputStream.class);
View Full Code Here

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

        assertTrue("EndpointReferenceType should not be null", endpoint != null);
    }
   
    public void testGetOperationExceptions() {   
        CorbaConduit conduit = control.createMock(CorbaConduit.class);   
        OperationType opType = control.createMock(OperationType.class);
        List<CorbaTypeMap> typeMaps = control.createMock(List.class);
       
        Map<TypeCode, RaisesType> exceptions = control.createMock(HashMap.class);
        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);
View Full Code Here

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

        EasyMock.expect(exchange.get(ServiceInfo.class)).andReturn(service);
        List<CorbaTypeMap> list = control.createMock(List.class);
        List<CorbaTypeMap> typeMaps = control.createMock(List.class);
        EasyMock.expect(service.getExtensors(CorbaTypeMap.class)).andReturn(list);               
       
        OperationType opType = control.createMock(OperationType.class);
        conduit.getArguments(message);
        EasyMock.expectLastCall().andReturn(null)
        conduit.getReturn(message);
        EasyMock.expectLastCall().andReturn(null);
        conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
View Full Code Here

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

    public void testBuildExceptionListEmpty() throws Exception {
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();
        OperationType opType = new OperationType();
        opType.setName("review_data");
        ExceptionList exList = conduit.getExceptionList(conduit.getOperationExceptions(opType, typeMaps),
                                                        message,
                                                        opType,
                                                        typeMaps);
        assertNotNull("ExcepitonList is not null", exList != null);
View Full Code Here

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

        TestUtils testUtils = new TestUtils();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        EndpointInfo endpointInfo = destination.getEndPointInfo();
        QName name = new QName("http://schemas.apache.org/idl/except", "review_data", "");
        BindingOperationInfo bInfo = destination.getBindingInfo().getOperation(name);
        OperationType opType = bInfo.getExtensor(OperationType.class);
       
        List<TypeMappingType> corbaTypes =
            endpointInfo.getService().getDescription().getExtensors(TypeMappingType.class);       
        if (corbaTypes != null) {
            CorbaUtils.createCorbaTypeMap(typeMaps, corbaTypes);
View Full Code Here

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

    }
   
   
    protected void handleOutBoundMessage(CorbaMessage message, BindingOperationInfo boi)
        throws Exception {
        OperationType opType = boi.getExtensor(OperationType.class);
        EventDataWriter writer = (EventDataWriter)getDataWriter(message);
        List<ParamType> paramTypes = opType.getParam();
        List<Object> args = message.getContent(List.class);
        MessageInfo msgInfo = message.get(MessageInfo.class);
        addMarshalRequestParams(message,
                                args,
                                boi,
                                paramTypes,
                                getXMLInputFactory(),
                                getXMLOutputFactory(),
                                writer);

        ArgType returnParam = opType.getReturn();
        if (returnParam != null) {
            QName retIdlType = returnParam.getIdltype();
            QName retName = new QName("", returnParam.getName());
            CorbaObjectHandler obj = CorbaHandlerUtils
                .initializeObjectHandler(orb, retName, retIdlType, typeMaps, service);
View Full Code Here

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

        }
    }
   
    protected void handleInBoundMessage(CorbaMessage message, BindingOperationInfo boi)
        throws Exception {
        OperationType opType = boi.getExtensor(OperationType.class);
        EventDataWriter writer = (EventDataWriter)getDataWriter(message);
        ArgType returnParam = opType.getReturn();
        List<Object> args = message.getContent(List.class);
        addMarshalResponseParams(message,
                                 args,
                                 boi,
                                 opType,
View Full Code Here

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

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

            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

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

    }   
   
    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
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.