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

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


                                                  null);
                }
                String name = getTypeCodeName(exceptType.getName());
                tc = orb.create_exception_tc(exceptType.getRepositoryID(), name, members);
            } else if (obj instanceof Fixed) {
                Fixed fixedType = (Fixed) obj;
                tc = orb.create_fixed_tc((short) fixedType.getDigits(), (short) fixedType.getScale());
            } else if (obj instanceof org.apache.cxf.binding.corba.wsdl.Object) {
                org.apache.cxf.binding.corba.wsdl.Object objType =
                    (org.apache.cxf.binding.corba.wsdl.Object)obj;
                if (objType.getName().equals("CORBA.Object")) {
                    tc = orb.create_interface_tc(objType.getRepositoryID(), "Object");
View Full Code Here


                                                  null);
                }
                String name = getTypeCodeName(exceptType.getName());
                tc = orb.create_exception_tc(exceptType.getRepositoryID(), name, members);
            } else if (obj instanceof Fixed) {
                Fixed fixedType = (Fixed) obj;
                tc = orb.create_fixed_tc((short) fixedType.getDigits(), (short) fixedType.getScale());
            } else if (obj instanceof org.apache.cxf.binding.corba.wsdl.Object) {
                org.apache.cxf.binding.corba.wsdl.Object objType =
                    (org.apache.cxf.binding.corba.wsdl.Object)obj;
                if (objType.getName().equals("CORBA.Object")) {
                    tc = orb.create_interface_tc(objType.getRepositoryID(), "Object");
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_k");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("fixed_1", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());

                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 31, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 6, fixed.getScale());

            }
        }
    }
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_m");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("X.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 10, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 2, fixed.getScale());

            }
        }
    }
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_n");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("Z.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 6, fixed.getScale());

            }
        }
    }
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "extended_op_m");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("EXTENDED.X.PARAM.H", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());
                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 8, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 2, fixed.getScale());

            }
        }
    }      
View Full Code Here

        if (!boundedDecimal) {
            if (anonymous && corbaTypeImpl instanceof Anonfixed) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            } else if (corbaTypeImpl instanceof Fixed) {
                Fixed fixed = (Fixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            }
        }

        if (!boundedScale) {
            if (anonymous) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            } else {
                Fixed fixed = (Fixed)corbaTypeImpl;
                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
            }
        }

        if (boundedDecimal || boundedScale) {
            if (anonymous) {
View Full Code Here

        }
        return anonymous;
    }

    public static CorbaType getFixedCorbaType(QName name, QName stype, int digits, int scale) {
        Fixed fixed = new Fixed();
        fixed.setName(name.getLocalPart());
        fixed.setQName(name);
        fixed.setType(stype);
        fixed.setDigits(digits);
        fixed.setScale(scale);
        fixed.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                              + name.getLocalPart().replace('.', '/')
                              + WSDLToCorbaHelper.IDL_VERSION);
        return fixed;
    }
View Full Code Here

            // Fixed
            //

            nextSchemaType = duplicateXmlSchemaSimpleType(newScope);

            Fixed oldFixed = (Fixed) getCorbaType();
            Fixed newFixed = new Fixed();

            newFixed.setQName(newQname);
            newFixed.setDigits(oldFixed.getDigits());
            newFixed.setScale(oldFixed.getScale());
            newFixed.setType(oldFixed.getType());
            newFixed.setRepositoryID(newScope.toIDLRepositoryID());

            nextCorbaType = newFixed;
        } else {
            System.err.println("[DeclaratorVisitor: Unexpected CORBA type error!]");
            System.exit(1);
View Full Code Here

                OperationType corbaOpType = (OperationType)extElement;
                assertEquals(corbaOpType.getName(), "op_k");
                assertEquals(3, corbaOpType.getParam().size());
                assertEquals("fixed_1", corbaOpType.getParam().get(0).getIdltype().getLocalPart());
                assertEquals("fixed_1", corbaOpType.getReturn().getIdltype().getLocalPart());
                Fixed fixed = (Fixed)mapType.get(corbaOpType.getReturn().getIdltype().getLocalPart());

                assertNotNull("Could not find the decimal type", fixed.getType());
                assertEquals("Fixed digits is incorrect for the return corba parameter", 31, fixed
                    .getDigits());
                assertEquals("Fixed scale is incorrect for the return corba parameter", 6, fixed.getScale());

            }
        }
    }
View Full Code Here

TOP

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

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.