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 for "Uncaught TypeError: Cannot read property '0' of undefined". #248

Merged
merged 2 commits into from
Feb 16, 2014

Conversation

ankush-garg
Copy link
Contributor

Hello,

A call to client.describe() fails for 'https://webservices.netsuite.com/wsdl/v2013_2_0/netsuite.wsdl' wsdl. The following mocha test can be used to reproduce the issue:

var soap = require('..');
var assert = require('assert');

describe('NetSuite Service Manager', function() {

it('should describe the wsdl', function(done) {
this.timeout(0);
soap.createClient('https://webservices.netsuite.com/wsdl/v2013_2_0/netsuite.wsdl', function(err, client) {
assert.ok(client);
console.log(client.describe());
done();
});
});

});

I made the required changes to fix this issue in wsdl.js. Please review.

Thanks,
Ankush

@jsdevel
Copy link
Collaborator

jsdevel commented Feb 7, 2014

@ankush-garg Can you include the wsdl you're using under test/wsdl... and add a test case to test/server-test.js?

@aheckmann we really need to get #234 merged in to keep whitespace etc. consistent in our tests.

@ankush-garg
Copy link
Contributor Author

@jsdevel The wsdl I am using has about 46 xsd files associated with it. Do you want to me drop all of them in the test/wsdl folder? Its given here - https://system.netsuite.com/download/WSDL_v2013_2_0.zip Just want to check before dropping the stuff there as it might create too much noise in the folder. Or, I can create another sub folder for this wsdl. Please let me know what works best.

@jsdevel
Copy link
Collaborator

jsdevel commented Feb 10, 2014

@ankush-garg ideally you could find what the issue is, then make a simple wsdl that recreates the issue. I'm a fan of keeping the commits small wherever possible.

@ankush-garg
Copy link
Contributor Author

@jsdevel Good idea. I updated the Wsdl and committed the code. Please review.

vpulim pushed a commit that referenced this pull request Feb 16, 2014
Fix for "Uncaught TypeError: Cannot read property '0' of undefined".
@vpulim vpulim merged commit 7d0bff6 into vpulim:master Feb 16, 2014
@jsdevel
Copy link
Collaborator

jsdevel commented Feb 16, 2014

@ankush-garg looks great! Thanks for adding this.

diarmaidm pushed a commit to diarmaidm/node-soap that referenced this pull request Feb 3, 2016
Fix for "Uncaught TypeError: Cannot read property '0' of undefined".
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.

3 participants