Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Null value causes "column is not a valid date"

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
This may be more of an XML question, but...

We have a non-required complexType element within a request message which takes data of type Date with an attribute which takes 'true' or 'false' as a value. As far as our service is concerned, we can pass the equivalent of:

CODE
<MyDt MyAttr="true"/>

However, SOAtest is giving me a Value "" from the "MyDt" column is not a valid date error when the parametized value from the database data source is NULL

I can get around this by telling SOAtest to Ignore Schema type of Children on this element.

But should I have to?

Roxanne
SOAtest verion 5.5.2 SP 1
Java 1.5.0_11
Tagged:

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    SOAtest will always verify elements according to how the schema defines the elements. Since your service accepts non date inputs, and assuming this is the desirable behavior of your service, then yes it would be necessary for you to turn off the enforcement of schema type option. Again this falls back to what the desirable behavior is for your service, but by default SOAtest will always check the type for the input to see if it adheres to the schema definition unless it is turned off.

    This may be more of an XML question, but...

    We have a non-required complexType element within a request message which takes data of type Date with an attribute which takes 'true' or 'false' as a value. As far as our service is concerned, we can pass the equivalent of:

    CODE
    <MyDt MyAttr="true"/>

    However, SOAtest is giving me a Value "" from the "MyDt" column is not a valid date error when the parametized value from the database data source is NULL

    I can get around this by telling SOAtest to Ignore Schema type of Children on this element.

    But should I have to?

    Roxanne
    SOAtest verion 5.5.2 SP 1
    Java 1.5.0_11
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭

    SOAtest will always verify elements according to how the schema defines the elements. Since your service accepts non date inputs

    Again, it's probably my shallow understanding of the XML standard, but why would a NULL value for a date [that is an optional element] be invalid?

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited April 2008
    An optional element means that it could appear in the XML or it could be absent. In the event that it is present in the XML, then it must adhere to the data type defined by its XSD schema (this is true for any present element defined with a concrete type), whereas NULL is not a valid date format (outlined by ISO-8601 http://www.w3.org/TR/xmlschema-2/#isoformats).

    SOAtest will always verify elements according to how the schema defines the elements. Since your service accepts non date inputs

    Again, it's probably my shallow understanding of the XML standard, but why would a NULL value for a date [that is an optional element] be invalid?

Tagged