Package org.apache.axis2.databinding.types

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


   }

    private static MessageContext cloneForSend(MessageContext ori, String preserveAddressing)
            throws AxisFault {

        MessageContext newMC = MessageHelper.clonePartially(ori);

        newMC.setEnvelope(ori.getEnvelope());
        if (preserveAddressing != null && Boolean.parseBoolean(preserveAddressing)) {
            newMC.setMessageID(ori.getMessageID());
        } else {
            MessageHelper.removeAddressingHeaders(newMC);
        }

        newMC.setProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS,
            ori.getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS));

        return newMC;
    }
View Full Code Here


        // mark the anon services created to be used in the client side of synapse as hidden
        // from the server side of synapse point of view
        anoymousService.getParent().addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
        ServiceGroupContext sgc = new ServiceGroupContext(
            axisCfgCtx, (AxisServiceGroup) anoymousService.getParent());
        ServiceContext serviceCtx = sgc.getServiceContext(anoymousService);

        boolean outOnlyMessage = "true".equals(synapseOutMessageContext.getProperty(
                SynapseConstants.OUT_ONLY)) || WSDL2Constants.MEP_URI_IN_ONLY.equals(
                originalInMsgCtx.getOperationContext()
                        .getAxisOperation().getMessageExchangePattern());
View Full Code Here

            AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(),
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        // mark the anon services created to be used in the client side of synapse as hidden
        // from the server side of synapse point of view
        anoymousService.getParent().addParameter(SynapseConstants.HIDDEN_SERVICE_PARAM, "true");
        ServiceGroupContext sgc = new ServiceGroupContext(
            axisCfgCtx, (AxisServiceGroup) anoymousService.getParent());
        ServiceContext serviceCtx = sgc.getServiceContext(anoymousService);

        boolean outOnlyMessage = "true".equals(synapseOutMessageContext.getProperty(
                SynapseConstants.OUT_ONLY)) || WSDL2Constants.MEP_URI_IN_ONLY.equals(
                originalInMsgCtx.getOperationContext()
                        .getAxisOperation().getMessageExchangePattern());
View Full Code Here

                throw new AxisFault(getFaultString(value, "date"));
            }
        }
        if (Constants.XSD_TIME.equals(type)) {
            try {
                Time time = ConverterUtil.convertToTime(value);
                return engine.getCx().newObject(engine, "Date", new Object[]{time.getAsCalendar().getTimeInMillis()});
            } catch (Exception e) {
                throw new AxisFault(getFaultString(value, "time"));
            }
        }
        if (Constants.XSD_YEARMONTH.equals(type)) {
View Full Code Here

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

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

        Date newDate = convertToDate(value);
        return date.getTime() - newDate.getTime();
    }

    public static long compare(Time time, String value) {
        Time newTime = new Time(value);
        return time.getAsCalendar().getTimeInMillis() - newTime.getAsCalendar().getTimeInMillis();
    }
View Full Code Here

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

        Date newDate = convertToDate(value);
        return date.getTime() - newDate.getTime();
    }

    public static long compare(Time time, String value) {
        Time newTime = new Time(value);
        return time.getAsCalendar().getTimeInMillis() - newTime.getAsCalendar().getTimeInMillis();
    }
View Full Code Here

        }
        return result;
    }

    public static Time convertTotime(String s) {
        return new Time(s);
    }
View Full Code Here

TOP

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

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.