Date and WebService - InfoPath Dev
in

InfoPath Dev

Date and WebService

Last post 05-22-2006 12:59 AM by Coita Thierry. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-18-2006 12:35 AM

    Date and WebService

    I have a DatePicker in a form. When I click a button the form is post to a web service, but if the date picker value is empty an error occours:

    "DateTime not valid"

    Help please....I have no default value for the picker.....
    Thank's
  • 05-18-2006 04:43 AM In reply to

    • rohan
    • Not Ranked
    • Joined on 12-08-2005
    • India
    • Posts 2
    Are you checking whether the value is null in the web method? If it is null, may be you need to do alternative processing of data.

    Thanks,
    Rohan Reddy
  • 05-19-2006 12:48 AM In reply to

    Only one solution:chage data type from Date to String....and parse the value in the web service
  • 05-22-2006 12:59 AM In reply to

    Hi,

    There is another solution if your datePicker is an element in the schema (if it's an attribute that don't work and your solution is the best):

    You can set in your schema for this element that the element can be nillable.

    in schema:
    <xs:element name="Date" type="xs:date" nillable="true" maxOccurs="unbounded"/>


    and your webservice need to make return like this:
    <Date xsi:nil="true" />


    And so your element can be empty.

    Hope this help

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.