Skip to content

XmlSerializer WSDL: Add check for ShouldSerialize method when set minOccurs attribute.#1189

Merged
andersjonsson merged 1 commit into
DigDes:developfrom
avoronin565:ShouldSerializeMethod
May 29, 2026
Merged

XmlSerializer WSDL: Add check for ShouldSerialize method when set minOccurs attribute.#1189
andersjonsson merged 1 commit into
DigDes:developfrom
avoronin565:ShouldSerializeMethod

Conversation

@avoronin565
Copy link
Copy Markdown
Contributor

When generating WSDL, check ShouldSerialize{PropName} methods to determine if a property should be optional.

Previously, all value type properties had minOccurs="1". Now, if ShouldSerialize{PropName} exists the element gets minOccurs="0".

Added a new test CheckShouldSerializeMemberSerialization() to verify.

Fixes #1188

@andersjonsson andersjonsson merged commit 7994ae7 into DigDes:develop May 29, 2026
3 checks passed
@andersjonsson
Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShouldSerialize methods ignored when generating WSDL (minOccurs always 1)

2 participants