-
Notifications
You must be signed in to change notification settings - Fork 392
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
Date/time types fail to unmarshal #38
Comments
That's bummer, but you are right. I've seen it happening sometimes. |
I've encountered the same but I really only used gowsdl as a starting point since I had 3 wsdl files with lots of overlap in types / constants. I got around it by using a struct with an anonymous time.Time ala: http://stackoverflow.com/questions/17301149/golang-xml-unmarshal-and-time-time-fields?answertab=votes#tab-top |
Good to know! thanks @ruzz311 |
Here is sample for custom time https://github.com/NYTimes/encoding-wrapper/blob/master/elementalconductor/time.go which we can use for generated code. Instead of using time.Time we could use DateTime. Could it be added after #107 is merged? |
I would like to see this feature as I'm hitting this problem. My only concern is, we should only apply this custom type/unmarshalling for W3C XSD dateTime types. There is then a concern of how to handle non-XSD date/time formats, e.g. arbitrary formats from a user perspective. |
Same as @iszak, just ran into this and I have a SOAP API with a random date format. Need a way to control the formatting. |
Is there any development progress for better xsd:date, xsd:datetime and xsd:time support? I see this ticket hasn't been updated for a while. If not, I am willing to create a PR for them from what we are using. |
not much progress on this, unfortunately. Feel free to take a stab at it @moihn. |
I have created a PR for this #195 |
As far as I know the Go XML unmarshler doesn't support changing date/time format and often fails if the date/time is not in the go expected format. We should probably map these to string instead of time.Time and let the user parse these later.
The text was updated successfully, but these errors were encountered: