Skip to content

Empty string elements with XSD restrictions are deserialized as null instead of "" #1412

@kouak

Description

@kouak

I've encountered an inconsistency in how empty XML elements are deserialized when XSD restrictions are involved.

When an element is defined as a simpleType based on xs:string with a restriction (such as xs:pattern), receiving an empty tag in the SOAP response (<myField></myField>) results in the value being deserialized as null.

The value should be deserialized as an empty string "", which is the behavior observed for fields defined without restrictions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions