-
Notifications
You must be signed in to change notification settings - Fork 163
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
fix regression errors for all test cases #11
Conversation
432628e
to
5e54dba
Compare
@@ -138,7 +138,7 @@ class XMLHandler { | |||
nsContext.popContext(); | |||
} | |||
return node; | |||
} else { | |||
} else if (typeof val !== "undefined" && typeof val !== null){ | |||
let attrs = val[this.options.attributesKey]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A simpler test is val != null
. Please note it is !=
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raymondfeng is val==null same as val!==null ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I had a typo. Fixed now
@@ -442,13 +442,16 @@ describe('SOAP Client', function() { | |||
var data = { | |||
Request: { | |||
$attributes: { | |||
$xsiType: '{xmlnsTy}Ty' | |||
$xsiType: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove the support for stringified qname?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raymondfeng it was not supported before, I can add support if you decide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not supported by soap
module but I added it. If it's not working, we need to fix it.
$xsiType: '{xmlnsTy}Ty' | ||
$xsiType: { | ||
"type": "Ty", | ||
"xmlns": "xmlnsTy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property is better off as nsURI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raymondfeng I will check for consistency with other features and get back to you
@@ -268,7 +268,7 @@ describe('SOAP Client', function() { | |||
|
|||
//lastRequest should have proper header value of above JSON header object serialized based on header schema defined | |||
//in default-namespace1.wsdl | |||
var lastRequest = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <soap:Header>\n <MyHeaderElem>\n <esnext>false</esnext>\n <moz>true</moz>\n <boss>true</boss>\n <node>true</node>\n <validthis>true</validthis>\n <globals>\n <EventEmitter>true</EventEmitter>\n <Promise>true</Promise>\n </globals>\n </MyHeaderElem>\n </soap:Header>\n <soap:Body/>\n</soap:Envelope>'; | |||
var lastRequest = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <soap:Header>\n <ns1:MyHeaderElem xmlns:ns1=\"http://www.example.com/v1\">\n <ns1:esnext>false</ns1:esnext>\n <ns1:moz>true</ns1:moz>\n <ns1:boss>true</ns1:boss>\n <ns1:node>true</ns1:node>\n <ns1:validthis>true</ns1:validthis>\n <ns1:globals>\n <ns1:EventEmitter>true</ns1:EventEmitter>\n <ns1:Promise>true</ns1:Promise>\n </ns1:globals>\n </ns1:MyHeaderElem>\n </soap:Header>\n <soap:Body/>\n</soap:Envelope>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the long string multi line?
5e54dba
to
08029f9
Compare
// $xsiType has two fields - type, xmlns | ||
let xsiType = QName.parse(child.type, child.xmlns); | ||
let xsiType; | ||
if(typeof child === "object" && typeof child.type !== "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note we use single quote for strings.
08029f9
to
4e71961
Compare
regression errors after checking in request-response-sample test case fixes
4e71961
to
d95ac68
Compare
regression errors after checking in request-response-sample
test case fixes