Forum Discussion

Sebastian_Vilst's avatar
Sebastian_Vilst
Contributor
17 years ago

Validation is different in form view and xml view.

I have a project where i can validate the request in XML view, but not in form view.
Is that a bug or some sort of behaviour i just don't understand?

I've attached the project and two screenshots.

Best regards,

Sebastian
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Sebastian,

    thanks for this.. there are two issues at play here:

    - the form editor erroneously validates/shows simple nillable elements as required
    - the form editor erroneously always shows nillable complex elements, these should (probably) be shown as optional..

    Upcoming nightly-build will fix the first of these.. I'll have to figure on the second one..

    regards!

    /Ole
    eviware.com
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    ok! I would like your opinion: an element defined as required (ie min/maxOccurs > 0) but nillible, should it be displayed as optional? That is how it will be anyway.. it is a bit strange though..

    regards,

    /Ole
    eviware.com
  • I don't think it should be optional, that will probably confuse people.

    I suggest that you make some way to make it nil in the form view too. Maybe a checkbox next to the nillable field, that when checked sets nil and "greys out" the value field.
    if that's too tricky to implement, you could add a rightclick option to set/unset a field = nil
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi

    ok.. but how to do this when the element is complex (ie a sequence or something).. !?

    /Ole
    eviware.com
  • hmm, good question.

    The structures currently have a littel arrow thingie that folds and unfolds, maybe that one could be expanded with somesort of "set nil". Or maybe right click on the structure bar itself and set it?

    However it's nice to have it visible that something is set to nil. Either a checkbox or maybe a colour change?
    I'm not a GUI programemr myself so I don't knwo what options you have to choose from.

    My best suggestion is to use right-click to set/unset nil, and show it with a colour change. Would that be easier than making checkboxes..?

    PS: I just noticed my skype was turned off. catch me there, it might be quicker than forum posts
  • Beno_Iskratel's avatar
    Beno_Iskratel
    Frequent Contributor
    hi,

    the same problem again.

    form and xml view are validating requests in a different way.
    one is not working correctly.

    soapUI Pro 3.6.1, Build dist-118-2010-10-18, Build Date 2010/10/18 15:21

    am i doing something wrong?
    did i miss something?

    regards,
    beno