Forum Discussion

Michael_Heinze's avatar
Michael_Heinze
Contributor
15 years ago

empty elements in requests with xsi:nil="true" sometimes are removed

hello,

in various different projects we found empty elements being removed from the xml. e.g.:

this is a problem as we then always receive a deserialization error because this elements are required fields in the wsdl.

is there any setting or action that would remove those empty elements like pretty print, refactor,...

regards,
Chris
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    it looks like the corresponding schema is defining them to be nilable (hence the xsi:nilable="true" attribute).. is this not the case?

    regards!

    /Ole
    eviware.com
  • hi,

    what i meant is that sometimes the elements are not in the xml that is sent in:

    thats how the xml looks like:


                  WESTINEP
                  false

    where the elements Code, Name,... are missing. and this is the problem that causes the troubles.

    correct would be:

                  WESTINEP
                 
                 
                 
                  false

    where Code eg. is sent in as nilable.

    hope that explains it a bit better.

    regards
    Chris
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Chris,

    ok.. sorry for misunderstanding.. can you attach (or mail) the wsdl/schemas? (or a project with it imported..)

    regards!

    /Ole
    eviware.com