8000 Fix complex content array restriction type by sywesk · Pull Request #105 · fiorix/wsdl2go · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix complex content array restriction type #105

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

Merged
merged 1 commit into from
Sep 5, 2018
Merged

Conversation

sywesk
Copy link
Contributor
@sywesk sywesk commented Sep 5, 2018

Hello,

I was using your library with a WSDL using array contentType restrictions, and I noticed the generated code had errors in it. The errors were all about the same thing :

Originally generated code, with the error :

type InvoiceitemArray struct {
	Items []*invoiceitem `...`
}

type Invoiceitem struct { ... }

As you may have noticed, the Invoiceitem struct has been generated with the correct name, but the type referenced in InvoiceitemArray lacks the capitalisation. While with another WSDL, the naming was right, but it used a different way to declare its arrays.

Also, by using this fix, we get arrays of primitive types and not arrays of pointers to primitive types, which is, performance wise, a good thing. (while still getting pointers to composite types)

Source WSDL : https://sr-pp.swissbilling.ch/EShopRequestV2Sec_DotNet.wsdl

The important extract of this WSDL:

<xsd:complexType name="invoiceitemArray">
	<xsd:complexContent>
	<xsd:restriction base="SOAP-ENC:Array">
		<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:invoiceitem[]"/>
	</xsd:restriction>
	</xsd:complexContent>
</xsd:complexType>

I'm not really familiar with this code base, so please tell me if there's something wrong / I haven't seen.

Thank you, Benjamin.

@fiorix fiorix merged commit 8a850c5 into fiorix:master Sep 5, 2018
@fiorix
Copy link
Owner
fiorix commented Sep 5, 2018

👍

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.

2 participants
0