Comments (8)
What about using big.Int
for xsd:integer
?
from gowsdl.
Yeah, that sounds even better than a string, and I'll give it a try when I get back to work in a few days.
from gowsdl.
type XyzTypee big.Int
generates "invalid constant type" no matter whether 0 or "0"
from gowsdl.
@danielkwinsor Can you be more specific about what generates that error and what you did?
from gowsdl.
It looks like types_tmpl.go
assumes that all restrictions are string enumerations currently.
from gowsdl.
Yeah sure so, originally I changed line 405 of gowsdl.go in the support-for-imports branch -- to "integer": "string",
This worked to compile, though I haven't tested the client yet.
Tried "integer": "big.Int",
and hand-imported math/big, but did not change types_tmpl.go
This did not work because
myservice/myservice.go:58: invalid constant type XyzTypee
myservice/myservice.go:60: invalid constant type XyzTypee
myservice/myservice.go:62: invalid constant type XyzTypee
myservice/myservice.go:64: invalid constant type XyzTypee
type XyzTypee big.Int
const (
XyzTypee0 XyzTypee = "0"
XyzTypee1 XyzTypee = "1"
XyzTypee2 XyzTypee = "2"
XyzTypee3 XyzTypee = "3"
)
from gowsdl.
@danielkwinsor It looks like the problem you're seeing here is that big.Int
is not an allowed constant type. Assuming that could be addressed, then the next issue to tackle is that Int.setString
will need to be called to parse the enumerated values. Unfortunately, there doesn't seem to be an immutable version of big.Int
from my reading of the docs.
from gowsdl.
Now code generates:
type XyzTypee int32
const (
XyzTypee0 XyzTypee = "0"
XyzTypee1 XyzTypee = "1"
XyzTypee2 XyzTypee = "2"
XyzTypee3 XyzTypee = "3"
)
Expected
type XyzTypee int32
const (
XyzTypee0 XyzTypee = 0
XyzTypee1 XyzTypee = 1
XyzTypee2 XyzTypee = 2
XyzTypee3 XyzTypee = 3
)
from gowsdl.
Related Issues (20)
- Namespace support: naming collisions / redeclared types in different namespaces HOT 1
- XML name field tag conflicts with struct's XMLName field
- dump request
- Error when parsing response: Expected param start-info="application/soap+xml", got text/xml HOT 2
- Incorrect namespace handling HOT 5
- Empty strings in enums results in broken code HOT 1
- nodes with multiple namespace are not resolved by the generated code
- Some complex types are missing the namespace
- Separation of generated code into packages HOT 2
- 1511:11: expected type, found '-' (and 3 more errors) HOT 2
- Namespace problem HOT 3
- Cut a new Release v0.6.0 HOT 1
- Failing test TestEPCISWSDL HOT 1
- gowsdl does not respect the targetNamespace value on wsdl definition.
- SOAP Header element not present
- generate code from wsdl HOT 1
- date format: cannot unmarshal into soap.XSDDate
- Any plan to update the go.mod with latest versions. Seeing some vulnerabilities reported with the current versions used
- bad type generation for xs:choice + maxOccurs="unbounded"
- Conflicting XML tags are generated, if a struct with field XMLName is used inside another struct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gowsdl.