Skip to content
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

Merged
merged 1 commit into from
Sep 19, 2016
Merged

Conversation

deepakrkris
Copy link
Contributor

regression errors after checking in request-response-sample
test case fixes

@@ -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];
Copy link
Contributor

@raymondfeng raymondfeng Sep 15, 2016

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 !=.

Copy link
Contributor Author

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 ??

Copy link
Contributor

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: {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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"
Copy link
Contributor

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

Copy link
Contributor Author

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>';
Copy link
Contributor

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?

// $xsiType has two fields - type, xmlns
let xsiType = QName.parse(child.type, child.xmlns);
let xsiType;
if(typeof child === "object" && typeof child.type !== "undefined") {
Copy link
Contributor

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.

regression errors after checking in request-response-sample
test case fixes
@deepakrkris deepakrkris merged commit 4fb6c14 into master Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants