Package javax.xml.datatype

Examples of javax.xml.datatype.DatatypeFactory.newDuration()


    private void performTestNewDurationArray(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        Duration[] da = new Duration[3];
        da[0] = df.newDuration(1000000000000L);
        da[1] = df.newDurationDayTime(1000000000000L);
        da[2] = df.newDurationYearMonth(true, 1, 3);

        Duration[] actual = serviceClient.getNewDurationArrayForward(da);
        Assert.assertEquals(da.length, actual.length);
View Full Code Here


    }

    private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        Duration[] da = new Duration[3];
        da[0] = df.newDuration(1000000000000L);
        da[1] = df.newDurationDayTime(1000000000000L);
        da[2] = df.newDurationYearMonth(true, 1, 3);

        for (int i = 0; i < da.length; ++i) {
            Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i]));
View Full Code Here

    private void performTestNewDurationArray(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        Duration[] da = new Duration[3];
        da[0] = df.newDuration(1000000000000L);
        da[1] = df.newDurationDayTime(1000000000000L);
        da[2] = df.newDurationYearMonth(true, 1, 3);

        Duration[] actual = serviceClient.getNewDurationArrayForward(da);
        Assert.assertEquals(da.length, actual.length);
View Full Code Here

                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(true);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(df.newDuration(5000));
                        sub.setBindingKey("uddi:uddi.joepublisher.com:mykey");
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindService(new FindService());
                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
View Full Code Here

                GregorianCalendar gcal = new GregorianCalendar();
                gcal.setTimeInMillis(System.currentTimeMillis());
                gcal.add(Calendar.HOUR, 1);
                s.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

                s.setNotificationInterval(df.newDuration(5000));
                list.value.add(s);
                subscriptionJoe.saveSubscription(authInfoJoe, list);

                //ok have sam change his business around.
                sb = new SaveBusiness();
View Full Code Here

                GregorianCalendar gcal = new GregorianCalendar();
                gcal.setTimeInMillis(System.currentTimeMillis());
                gcal.add(Calendar.HOUR, 1);
                s.setExpiresAfter(df.newXMLGregorianCalendar(gcal));

                s.setNotificationInterval(df.newDuration(5000));
                list.value.add(s);
                logger.info("subscribing joe's to updates for sam's business");
                subscriptionJoe.saveSubscription(authInfoJoe, list);

                //ok have sam change his business around.
View Full Code Here

    private void performTestNewDurationArray(StandardTypesServiceClient serviceClient)
        throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        Duration[] da = new Duration[3];
        da[0] = df.newDuration(1000000000000L);
        da[1] = df.newDurationDayTime(1000000000000L);
        da[2] = df.newDurationYearMonth(true, 1, 3);

        Duration[] actual = serviceClient.getNewDurationArrayForward(da);
        Assert.assertEquals(da.length, actual.length);
View Full Code Here

        GorillaInterface proxy = getProxy();
        GregorianCalendar cal = new GregorianCalendar(Calendar.YEAR, Calendar.MONTH, Calendar.DAY_OF_MONTH);
        DatatypeFactory javaxtypeFactory = DatatypeFactory.newInstance();
        XMLGregorianCalendar request=  javaxtypeFactory.newXMLGregorianCalendar(cal);
        System.out.println("Javax Factory Clazz Name = "+request.getClass().getName());
        Duration d = javaxtypeFactory.newDuration(System.currentTimeMillis());
        XMLGregorianCalendar response = proxy.echoDate(request, d);
        System.out.println(response.toString());
        assertNotNull(response);
      }catch(Exception e){
        e.printStackTrace();
View Full Code Here

            Date dueDate = delegateTask.getDueDate();
            Calendar calendar = Calendar.getInstance();
            calendar.setTime(dueDate);

            DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
            Duration duration = datatypeFactory.newDuration("-"
                    + bpmConfNotice.getDueDate());
            duration.addTo(calendar);

            Date noticeDate = calendar.getTime();
            Date now = new Date();
View Full Code Here

    }

    private void performTestNewDuration(StandardTypesServiceClient serviceClient) throws DatatypeConfigurationException {
        DatatypeFactory df = DatatypeFactory.newInstance();
        Duration[] da = new Duration[3];
        da[0] = df.newDuration(1000000000000L);
        da[1] = df.newDurationDayTime(1000000000000L);
        da[2] = df.newDurationYearMonth(true, 1, 3);

        for (int i = 0; i < da.length; ++i) {
            Assert.assertEquals(da[i].negate(), serviceClient.getNewDurationForward(da[i]));
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.