Package org.apache.cxf.binding.corba.wsdl

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


       
        // generate corba return param
        ArgType corbaReturn = generateCorbaReturnParam(typeNode);
       
        // generate corba operation
        OperationType corbaOp = generateCorbaOperation(op, null, corbaReturn);
       
        // generate binding
        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
        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 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

    }

    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(msg.get(CorbaConstants.CORBA_ENDPOINT_OBJECT)).andReturn(obj);
        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

    }
   
    @Test
    public void testGetOperationExceptions() {   
        CorbaConduit conduit = control.createMock(CorbaConduit.class);   
        OperationType opType = control.createMock(OperationType.class);
        CorbaTypeMap typeMap = control.createMock(CorbaTypeMap.class);
       
        List<RaisesType> exlist = CastUtils.cast(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

        EasyMock.expect(exchange.get(ServiceInfo.class)).andReturn(service);
        List<CorbaTypeMap> list = CastUtils.cast(control.createMock(List.class));
        CorbaTypeMap typeMap = control.createMock(CorbaTypeMap.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, typeMap),
View Full Code Here

    @Test
    public void testBuildExceptionListEmpty() throws Exception {
        CorbaConduit conduit = setupCorbaConduit(false);
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);
        OperationType opType = new OperationType();
        opType.setName("review_data");
        ExceptionList exList = conduit.getExceptionList(conduit.getOperationExceptions(opType, null),
                                                        message,
                                                        opType);
        assertNotNull("ExcepitonList is not null", exList != null);
        assertEquals("The list should be empty", exList.count(), 0);       
View Full Code Here

        TestUtils testUtils = new TestUtils();
        CorbaDestination destination = testUtils.getExceptionTypesTestDestination();
        EndpointInfo endpointInfo2 = 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);
        CorbaTypeMap typeMap = null;
        List<TypeMappingType> corbaTypes =
            endpointInfo2.getService().getDescription().getExtensors(TypeMappingType.class);       
        if (corbaTypes != null) {
            typeMap = CorbaUtils.createCorbaTypeMap(corbaTypes);
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.corba.wsdl.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.