Skip to content

All Generated Properties Are Optional #110

@jpbulman

Description

@jpbulman

Today, all fields of a converted object are marked as optional. The client should only mark a type as optional if the corresponding WSDL entry is marked with minOccurs=0. This issue stems from this bit of code where the field for making the type optional is always set to true.

The fix for this might be a bit annoying, I started taking a look, but don't have the capacity to write up a full solution. When definition parsing begins, the SOAP library parts field gives a recursive list of all the children of the definition, which is great. However, it unfortunately does not give metadata of each child, so there's no way for parseDefinition to know at any point if a field has minOccurs=0 set. To get around this, it would probably make sense to have some sort of once-over scan of all elements and make a map from propName (or something like that) to a metadata string.

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