Package org.apache.axis2.databinding.types

Examples of org.apache.axis2.databinding.types.Day


                throw new AxisFault(getFaultString(value, "month"));
            }
        }
        if (Constants.XSD_DAY.equals(type)) {
            try {
                Day day = ConverterUtil.convertToGDay(value);
                Calendar calendar = Calendar.getInstance();
                calendar.clear();
                calendar.set(Calendar.DAY_OF_MONTH, day.getDay());
                String timezone = day.getTimezone();
                if (timezone != null) {
                    calendar.setTimeZone(TimeZone.getTimeZone(timezone));
                }
                return engine.getCx().newObject(engine, "Date", new Object[]{calendar.getTimeInMillis()});
            } catch (Exception e) {
View Full Code Here


    public static String convertToGDay(Object jsObject) throws AxisFault {
        try {
            // If the user returned a valid GDay a s a String we use the converterUtil to
            // validate it and return it back.
            if (jsObject instanceof String) {
                Day day = ConverterUtil.convertToGDay((String)jsObject);
                return ConverterUtil.convertToString(day);
            }
            Date date = (Date) Context.jsToJava(jsObject, Date.class);
            Calendar calendar = Calendar.getInstance();
            calendar.clear();
            calendar.setTime(date);
            Day day = new Day(calendar.get(Calendar.DAY_OF_MONTH));
            return ConverterUtil.convertToString(day);
        } catch (EvaluatorException e) {
            throw new AxisFault("Unable to convert the return value to day");
        } catch (NumberFormatException e) {
            throw new AxisFault("Unable to convert the return value to day");
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

    public static Month convertTogMonth(String s) {
        return new Month(s);
    }

    public static Day convertTogDay(String s) {
        return new Day(s);
    }
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

    public static Month convertTogMonth(String s) {
        return new Month(s);
    }

    public static Day convertTogDay(String s) {
        return new Day(s);
    }
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

    public static Day convertToGDay(String s) {
        if ((s == null) || s.equals("")){
            return null;
        }
        return new Day(s);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.databinding.types.Day

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.