Examples of ParamType


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

    private void updateList(WSDLToCorbaBinding wsdlToCorbaBinding,
            XmlSchemaType schemaType, String name, QName typeName,
            List<ParamType> inputs, List<ParamType> outputs, boolean nillable)
        throws Exception {

        ParamType paramtype = null;

        for (int x = 0; x < inputs.size(); x++) {
            paramtype = null;
            ParamType d2 = (ParamType) inputs.get(x);

            if (d2.getName().equals(name)) {
                inputs.remove(x);
                paramtype = createParam(wsdlToCorbaBinding, "inout",
                        schemaType, name, typeName, nillable);
                if (paramtype != null) {
                    inputs.add(paramtype);
View Full Code Here

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

    private static ParamType createParam(WSDLToCorbaBinding wsdlToCorbaBinding,
            String mode, XmlSchemaType schemaType, String name, QName typeName,
            boolean nill) throws Exception {

        CorbaTypeImpl corbaTypeImpl = null;
        ParamType paramtype = new ParamType();

        ModeType modeType = ModeType.fromValue(mode);
        paramtype.setName(name);
        paramtype.setMode(modeType);

        if (schemaType == null) {
            corbaTypeImpl = (CorbaTypeImpl) WSDLToCorbaHelper.CORBAPRIMITIVEMAP
                    .get(typeName);
            if (nill) {
                QName qname = corbaTypeImpl.getQName();
                qname = wsdlToCorbaBinding.getHelper()
                        .createQNameCorbaNamespace(
                                qname.getLocalPart() + "_nil");
                paramtype.setIdltype(qname);
            } else {
                paramtype.setIdltype(corbaTypeImpl.getQName());
            }
        } else {
            // We need to get annotation information for the schema type we are about to pass in.
            // This is used to produce the correct object reference type.
            List<XmlSchema> schemaList = wsdlToCorbaBinding.getHelper().getXMLSchemaList();
            Iterator<XmlSchema> schemaIterator = schemaList.iterator();
            XmlSchemaObject schemaObj = null;
            while (schemaIterator.hasNext()) {
                XmlSchema s = schemaIterator.next();
                XmlSchemaObjectTable schemaTable = s.getElements();
                schemaObj = schemaTable.getItem(typeName);
                if (schemaObj != null) {
                    break;
                }
            }
           
            XmlSchemaAnnotation annotation = null;
            if (schemaObj != null && schemaObj instanceof XmlSchemaElement) {
                annotation = ((XmlSchemaElement)schemaObj).getAnnotation();
            }
           
            corbaTypeImpl = wsdlToCorbaBinding.getHelper()
                    .convertSchemaToCorbaType(schemaType, typeName, null, annotation, false);
            if (corbaTypeImpl == null) {
                return null;
            } else {
                if (nill) {
                    QName qname = corbaTypeImpl.getQName();
                    qname = wsdlToCorbaBinding.getHelper()
                            .createQNameCorbaNamespace(
                                    qname.getLocalPart() + "_nil");
                    paramtype.setIdltype(qname);
                } else {
                    paramtype.setIdltype(corbaTypeImpl.getQName());
                }
            }
            return paramtype;
        }
        return paramtype;
View Full Code Here

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

    public void testprepareArgs() throws Exception {
        CorbaInInterceptor inInterceptor = new CorbaInInterceptor()
        Message msg = new MessageImpl();
        CorbaMessage message = new CorbaMessage(msg);       
        List<ParamType> paramTypes  = new ArrayList<ParamType>(1);
        ParamType param = new ParamType();
        QName type = new QName("", "structure", "");
        param.setName("param1");
        param.setIdltype(type);
        paramTypes.add(param);              
       
        inInterceptor.prepareArgs(message, paramTypes);
        List<Object> args = message.getContent(List.class);
        assertNotNull("args should exist and be empty", args !=  null);
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.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

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

       
        return param;
    }
   
    private ParamType generateCorbaParam(AST type) {
        ParamType param = new ParamType();
        param.setName(PARAM_NAME);
        param.setMode(ModeType.IN);
       
        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
                                                                schemas,
                                                                schema,
                                                                typeMap,
                                                                definition);
        visitor.visit(type);
        CorbaTypeImpl corbaType = visitor.getCorbaType();
       
        param.setIdltype(corbaType.getQName());

        return param;
    }
View Full Code Here

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

        schemaSequence.getItems().add(element);
        return element;
    }

    private void addCorbaParam(CorbaTypeImpl corbaType, ModeType mode, String partName) {
        ParamType param = new ParamType();
        param.setName(partName);
        param.setMode(mode);
        param.setIdltype(corbaType.getQName());
        corbaOperation.getParam().add(param);
    }
View Full Code Here

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

                    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

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

                    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

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

    }
  
    private void addParam(WSDLToCorbaBinding wsdlToCorbaBinding, XmlSchemaType schemaType,
                          String name, QName typeName, boolean nillable,
                          List<ParamType> inputs) throws Exception {
        ParamType paramtype = createParam(wsdlToCorbaBinding, "in", schemaType,
                                          name, typeName, nillable);
        if (paramtype != null) {
            inputs.add(paramtype);
        }
    }
View Full Code Here

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

                XmlSchemaType schemaType = null;
                schemaType = lookUpType(part, xmlSchemaList);
               
                // check if in input list
                String mode = "out";
                ParamType paramtype = null;
                for (int x = 0; x < inputs.size(); x++) {
                    paramtype = null;
                    ParamType d2 = (ParamType)inputs.get(x);

                    if (part.getName() != null
                        && d2.getName().equals(part.getName())) {
                        inputs.remove(x);
                        if (part.getElementName() != null) {
                            XmlSchemaElement el = getElement(part, xmlSchemaList);
                            paramtype = createParam(wsdlToCorbaBinding, "inout", schemaType,
                                                    part.getName(), part.getElementName(), el.isNillable());
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.