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

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, false);

        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(createQNameCorbaNamespace(extype.getName()));               
                operationType.getRaises().add(raisestype);
            }
        }
              
        bo.addExtensibilityElement(operationType);
    }
View Full Code Here


            callback.initObjectContext(objectCtx);
            objectCtx.putAll(corbaCtx);

            // Get the WSDL definition for the operation being invoked
            // TODO: Verify that two operations can't be overloaded.
            OperationType opElement = CorbaUtils.getCorbaOperationType(operationName.getLocalPart(),
                                                                       serverBinding.getBus(),
                                                                       serverBinding.getEndpointReference());
            if (opElement == null) {
                throw new CorbaBindingException("Unable to locate operation type definition");
            }

            List<ParamType> paramTypes = opElement.getParam();
            List<CorbaTypeMap> typeMaps =
                ((CorbaBindingImpl)serverBinding.getBindingImpl()).getCorbaTypeMaps();

            // Build a list of streamables that correspond to the values that should be contained in the
            // argument list of the ServerRequest, build the correct NVList and retreive the arguments
View Full Code Here

        try {
            WSDLHelper helper = new WSDLHelper();
            Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), endpoint);
            BindingOperation bindingOp = helper.getBindingOperation(port.getBinding(), opName);

            OperationType operation = null;
            List extElements = bindingOp.getExtensibilityElements();
            for (int i = 0; i < extElements.size(); ++i) {
                Object e = extElements.get(i);
                if (e instanceof OperationType) {
                    operation = (OperationType) e;
View Full Code Here

            }

            // Get the typecodes for the exceptions this operation can throw.  These are defined in the
            // operation definition from WSDL.
            ExceptionList exList = orb.create_exception_list();
            OperationType operation = CorbaUtils.getCorbaOperationType(callback.getOperationName(),
                                                                       bus,
                                                                       endpointRef);

            if (operation == null) {
                throw new CorbaBindingException("Unable to obtain operation definition");
View Full Code Here

            }

            // Get the typecodes for the exceptions this operation can throw.  These are defined in the
            // operation definition from WSDL.
            ExceptionList exList = orb.create_exception_list();
            OperationType operation = CorbaUtils.getCorbaOperationType(callback.getOperationName(),
                                                                       bus,
                                                                       endpointRef);

            if (operation == null) {
                throw new CorbaBindingException("Unable to obtain operation definition");
View Full Code Here

    public ExtensibilityElement unmarshall(Class parentType, QName elementType,
            Element el, Definition def, ExtensionRegistry extReg)
        throws WSDLException {

        OperationType opType = new OperationType();

        // Store the operation name
        NamedNodeMap opAttributes = el.getAttributes();
        for (int i = 0; i < opAttributes.getLength(); ++i) {
            if (opAttributes.item(i).getNodeName().equals("name")) {
                opType.setName(opAttributes.item(i).getNodeValue());
            }
        }

        // Store the operations parameters, return value, and raises
        NodeList opChildNodes = el.getChildNodes();
        for (int i = 0; i < opChildNodes.getLength(); ++i) {
            Node currentNode = opChildNodes.item(i);

            if (currentNode.getNodeName().equals("corba:param")) {
                ParamType param = new ParamType();
                NamedNodeMap paramAttributes = currentNode.getAttributes();

                for (int j = 0; j < paramAttributes.getLength(); ++j) {
                    Node paramAttrNode = paramAttributes.item(j);
                    if (paramAttrNode.getNodeName().equals("name")) {
                        param.setName(paramAttrNode.getNodeValue());
                    } else if (paramAttrNode.getNodeName().equals("mode")) {
                        param.setMode(ModeType.fromValue(paramAttrNode.getNodeValue()));
                    } else if (paramAttrNode.getNodeName().equals("idltype")) {
                        param.setIdltype(getIdlTypeName(def, paramAttrNode, currentNode));
                    }
                }
                opType.getParam().add(param);
            } else if (currentNode.getNodeName().equals("corba:return")) {
                ArgType ret = new ArgType();
                NamedNodeMap retAttributes = currentNode.getAttributes();

                for (int j = 0; j < retAttributes.getLength(); ++j) {
                    Node retAttrNode = retAttributes.item(j);
                    if (retAttrNode.getNodeName().equals("idltype")) {
                        ret.setIdltype(getIdlTypeName(def, retAttrNode, currentNode));
                    }
                }
                opType.setReturn(ret);
            } else if (currentNode.getNodeName().equals("corba:raises")) {
                RaisesType raises = new RaisesType();
                NamedNodeMap raiseAttributes = currentNode.getAttributes();

                for (int j = 0; j < raiseAttributes.getLength(); ++j) {
                    Node raiseAttrNode = raiseAttributes.item(j);
                    if (raiseAttrNode.getNodeName().equals("exception")) {
                        raises.setException(getIdlTypeName(def, raiseAttrNode, currentNode));
                    }
                }
                opType.getRaises().add(raises);
            }
            // anything else we are not interested in at the moment
        }
        return opType;
    }
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.