-
Notifications
You must be signed in to change notification settings - Fork 161
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
'-' within schema causes invalid stuct name to be created '-' can't be within struct name #47
Comments
Can you give an example? |
I'm sorry for how long this took me. I messed around wtih wsdlgo/encoder.go so struct names wouldn't include the '-' character, which allowed your code to run. |
Alright, so this is mainly about removing |
correct, attached export.go that worked with example file, created cleanString function (currently removes '-' and ' ') |
Yeah we need to fix this. @flavioayra just reported the same problem, finding "-" and "." in type/op names. |
Should be good now. |
@fiorix i am still seeing this issue with "." in the name, was this added to fix "." or just "-" here is an example file. it is from the F5 Networks WSDL. unfortunately they use "." all over the place. for refrence here is the error
|
I think I missed the "." in the regex that makes it a valid Go symbol: Line 1243 in 8877781
|
@fiorix in this case the "." is actually invalid in the type name, i think that problem is that it is not using the |
PR? |
@fiorix I'm also seeing this as well. For example: $ wsdl2go < ParseAddress.wsdsl > ParseAddr.go
2022/10/03 12:04:06 generated bad code: 3:13: expected ';', found '-'
1 // Code generated by wsdl2go. DO NOT EDIT.
2
3 package plsp-public
... This WSDL comes from: https://information.qld.gov.au/service/Addressing/ValidationService/PLSplusPublic/soap?wsdl |
#47 fixes a bunch of bugs I found with generating type names, method names and so on. This resolves my problem as well as the one found in this issue. I'm not happy with the code, but it generated valid Go code finally 😅 |
FWW I achieved much better results by using the |
injested wsdl files with - in there field name,
In order to get the program to create the go code,
I needed to go through encoder.go and add string.Replace on '-' with "" one the various tag fields
The text was updated successfully, but these errors were encountered: