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

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


                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) {
                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
            } else {
                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 CorbaTypeImpl 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

                                                  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

        return idlType;
    }
   
    private IdlType createFixed(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        IdlType idlType = null;
        Fixed f = (Fixed)ctype;    
        Long digits = f.getDigits();
        Long scale = f.getScale();       
        idlType = IdlFixed.create(scope, local, digits.intValue(),  
                                  scale.intValue());
        scope.addToScope(idlType);
        return idlType;
    }
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 CorbaTypeImpl 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

                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

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.