Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2x-nested translation of record list fields #94

Merged

Conversation

danielfinke
Copy link
Contributor

Fixes bet365/soap#47

When using soap:erlang2wsdl on the referenced .hrl, a crash occurs as described in the above issue. This is because the nesting of the translated hobbies field is doubled up; the return value from erlsom_type2xsd:translateType/2 has the MinOccurs/MaxOccurs wrapper applied twice for lists.

Ignore the list element type's MinOccurs/MaxOccurs and use the 0 and unbounded values, for lists, respectively. This will produce the same result as shown on https://github.com/bet365/soap/blob/6848d29d9d123c37f22b309f19de848f6309b66a/doc/generating_a_wsdl.md?plain=1#L160.

Source .hrl

For bet365/soap#47

When using `soap:erlang2wsdl` on the referenced `.hrl`, a crash occurs
as described in the above issue. This is because the nesting of the
translated `hobbies` field is doubled up; the return value from
`erlsom_type2xsd:translateType/2` has the `MinOccurs`/`MaxOccurs`
wrapper applied twice for lists.

Ignore the list element type's `MinOccurs`/`MaxOccurs` and use the 0 and
unbounded values, for lists, respectively. This will produce the same
result as shown on https://github.com/bet365/soap/blob/6848d29d9d123c37f22b309f19de848f6309b66a/doc/generating_a_wsdl.md?plain=1#L160.

[Source .hrl](https://github.com/bet365/soap/blob/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/test/soap_SUITE_data/store.hrl)
@danielfinke danielfinke force-pushed the fix-doubled-nested-list-translation branch from 562f06d to e800216 Compare June 26, 2024 21:44
@willemdj willemdj merged commit 70cbbf7 into willemdj:master Jul 7, 2024
@danielfinke danielfinke deleted the fix-doubled-nested-list-translation branch July 11, 2024 17:23
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.

Wrong Type in attribute type, expected qname
2 participants