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

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


        String name = SETTER_PREFIX + nameNode.toString();
        Operation op = generateOperation(name, inMsg, outMsg);
       
       
        // generate corba return param
        ParamType corbaParam = generateCorbaParam(typeNode);
       
        // generate corba operation
        OperationType corbaOp = generateCorbaOperation(op, corbaParam, null);
       
        // generate binding
View Full Code Here


       
        return param;
    }
   
    private ParamType generateCorbaParam(AST type) {
        ParamType param = new ParamType();
        param.setName(PARAM_NAME);
        param.setMode(ModeType.IN);
       
        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
                                                                definition,
                                                                schema,
                                                                wsdlVisitor);
        visitor.visit(type);
        CorbaTypeImpl corbaType = visitor.getCorbaType();
        if (corbaType != null) {
            param.setIdltype(corbaType.getQName());
        } else {
            wsdlVisitor.getDeferredActions().
                add(visitor.getFullyQualifiedName(), new AttributeDeferredAction(param));
        }
View Full Code Here

                        if (typeName == null) {
                            typeName = el.getQName();
                        }
                        QName idltype = getIdlType(wsdlToCorbaBinding, el.getSchemaType(), typeName,
                                                   el.isNillable());
                        ParamType paramtype = createParam(wsdlToCorbaBinding, "in", el.getQName()
                            .getLocalPart(), idltype);
                        if (paramtype != null) {
                            inputs.add(paramtype);
                        }
                    }
View Full Code Here

                    QName typeName = el.getSchemaTypeName();
                    if (typeName == null) {
                        typeName = el.getQName();
                    }
                    QName idltype = getIdlType(wsdlToCorbaBinding, schemaType, typeName, el.isNillable());
                    ParamType paramtype = createParam(wsdlToCorbaBinding, "in", part.getName(), idltype);
                    if (paramtype != null) {
                        inputs.add(paramtype);
                    }
                } else if (part.getTypeName() != null) {
                    schemaType = getType(part, xmlSchemaList);
                    QName typeName = part.getTypeName();
                    if (isObjectRef) {
                        typeName = part.getElementName();
                    }
                    QName idltype = getIdlType(wsdlToCorbaBinding, schemaType, typeName, false);
                    ParamType paramtype = createParam(wsdlToCorbaBinding, "in", part.getName(), idltype);
                    if (paramtype != null) {
                        inputs.add(paramtype);
                    }
                }
            }
View Full Code Here

        }
    }

    private void processWrappedOutputParam(WSDLToCorbaBinding wsdlToCorbaBinding, XmlSchemaElement el,
                                           List<ParamType> inputs, List<ParamType> outputs) throws Exception {
        ParamType paramtype = null;
        for (int i = 0; i < inputs.size(); i++) {
            if (inputs.get(i).getName().equals(el.getQName().getLocalPart())) {
                inputs.remove(i);
                QName typeName = el.getSchemaTypeName();
                if (typeName == null) {
View Full Code Here

            while (i.hasNext()) {
                Part part = (Part)i.next();
                XmlSchemaType schemaType = null;
                // check if in input list
                String mode = "out";
                ParamType paramtype = null;
                boolean isObjectRef = isObjectReference(xmlSchemaList, part.getElementName());
                for (int x = 0; x < inputs.size(); x++) {
                    paramtype = null;
                    ParamType d2 = (ParamType)inputs.get(x);
                    if (part.getElementName() != null && !isObjectRef) {
                        XmlSchemaElement el = getElement(part, xmlSchemaList);
                        if (el != null && el.getSchemaType() != null) {
                            schemaType = el.getSchemaType();
                        }
                        QName typeName = el.getSchemaTypeName();
                        if (typeName == null) {
                            typeName = el.getQName();
                        }
                        QName idltype = getIdlType(wsdlToCorbaBinding, schemaType, typeName, el.isNillable());
                        if ((d2.getName().equals(part.getName())) && (d2.getIdltype().equals(idltype))) {
                            inputs.remove(x);
                            paramtype = createParam(wsdlToCorbaBinding, "inout", part.getName(), idltype);
                            inputs.add(paramtype);
                        }
                    } else {
                        schemaType = getType(part, xmlSchemaList);
                        QName typeName = part.getTypeName();
                        if (isObjectRef) {
                            typeName = part.getElementName();
                        }
                        QName idltype = getIdlType(wsdlToCorbaBinding, schemaType, typeName, false);
                        if ((d2.getName().equals(part.getName())) && (d2.getIdltype().equals(idltype))) {
                            inputs.remove(x);
                            paramtype = createParam(wsdlToCorbaBinding, "inout", part.getName(), idltype);
                            inputs.add(paramtype);
                        }
                    }
View Full Code Here

    }

    private void processReturnParams(List<ParamType> outputs, List<ArgType> returns) {

        if (outputs.size() > 0) {
            ParamType d2 = (ParamType)outputs.get(0);

            if (d2.getMode().value().equals("out")) {
                ArgType argType = new ArgType();
                argType.setName(d2.getName());
                argType.setIdltype(d2.getIdltype());
                returns.add(argType);
                outputs.remove(0);
            }
        }
    }
View Full Code Here

    private void orderParameters(List<ParamType> inputs, List<ParamType> outputs, boolean simpleOrdering) {
        ListIterator<ParamType> inputit = inputs.listIterator();

        while (inputit.hasNext()) {
            ParamType d2 = (ParamType)inputit.next();
            if (d2.getMode().value().equals("inout")) {
                ListIterator it = outputs.listIterator();

                while (it.hasNext()) {
                    ParamType d3 = (ParamType)it.next();
                    if (!d3.getName().equals(d2.getName()) && (!simpleOrdering)
                        && (!d3.getMode().value().equals("inout"))) {
                        // the in/outs are in a different order in the
                        // output than the input
                        // we'll try and use the input oder for the INOUT's,
                        // but also try and
                        // maintain some sort of ordering for the OUT's
View Full Code Here

        return idltype;
    }

    private static ParamType createParam(WSDLToCorbaBinding wsdlToCorbaBinding, String mode, String name,
                                         QName idltype) throws Exception {
        ParamType paramtype = new ParamType();
        ModeType modeType = ModeType.fromValue(mode);
        paramtype.setName(name);
        paramtype.setMode(modeType);
        paramtype.setIdltype(idltype);
        return paramtype;
    }
View Full Code Here

                    if (extElement.getElementType().getLocalPart().equals("operation")) {
                        OperationType corbaOpType = (OperationType)extElement;
                        assertEquals(corbaOpType.getName(), "op_a");
                        assertEquals(1, corbaOpType.getParam().size());
                        assertNotNull(corbaOpType.getReturn());
                        ParamType paramtype = corbaOpType.getParam().get(0);
                        assertEquals(paramtype.getName(), "part1");
                        QName idltype = new QName("http://schemas.apache.org/idl/anon.idl/corba/typemap/",
                                                  "ArrayType", "ns1");
                        assertEquals(paramtype.getIdltype(), idltype);
                        assertEquals(paramtype.getMode().toString(), "IN");
                    }
                }
            }

            // See if an IDL is able to produce from this CORBA Binding.
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.corba.wsdl.ParamType

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.