loopbackio / loopbackio/strong-soap
jsonToXml don't serialize Date value as ISO8601 format.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 410
- Forks
- 162
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 7
Description
I found strong-soap's XMLHandler use `toString`, not `toISOString` for serializing `xsd:dateTime` value in request arguments.
I think string format for `xsd:dateTime` is ISO8601. (format: `[-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]`)
http://books.xmlschemata.org/relaxng/ch19-77049.html
Here is my sample code:
```javascript
var handler = new soap.XMLHandler();
var node = handler.jsonToXml(null, null, soap.XMLHandler.createSOAPEnvelopeDescriptor("soap"), {"date": new Date()});
var xml = node.end({pretty: true});
console.log(xml);
```
Expect:
```
2017-04-18T15:24:26.871Z
```
Actual:
```
Wed Apr 19 2017 00:24:26 GMT+0900 (JST)
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in XMLHandler.jsonToXml and reproduce the provided sample with a Date value. Compare the generated XML with the expected ISO8601 xsd:dateTime format; the issue is done when Date values serialize with that format instead of the shown Date.toString output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100