gowsdl
gowsdl copied to clipboard
`ArrayOfInt` generates private `int` for 24SevenOffice WSDL
When I generate using 24SevenOffices WSDL for CompanyService I get the following:
type ArrayOfInt struct {
int []int32 `xml:"int,omitempty" json:"int,omitempty"`
}
And this is what the WSDL has:
...
<s:complexType name="ArrayOfInt">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="int" type="s:int" />
</s:sequence>
</s:complexType>
...
Is the WSDL-spec bad or is this a bug with gowsdl?
+1
Seems like the issue might be here: https://github.com/hooklift/gowsdl/blob/2a06cec86c50a61d8b43fae529174ef340bc9c34/gowsdl.go#L456
I'm guessing adding a mapping for
+ "int": "aint",
could fix this?
For complex types representing ArraysOfStr, for example:
<xs:complexType name="ArrayOfstring">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
yields:
type ArrayOfstring struct {
Astring []*string `xml:"string,omitempty" json:"string,omitempty"`
}
, it would make sense if an ArrayOfint would be represented like so:
type ArrayOfint struct {
Aint []int32 `xml:"int,omitempty" json:"int,omitempty"`
}