Closed gordon-to closed 9 years ago
I updated the soap dependency to 0.9.x -- let me know if the problem still continues
the new version of soap causes and error in client.js ./node-vsphere-soap/lib/client.js:153 self.sessionManager = result.returnval.sessionManager; ^ TypeError: Cannot read property 'sessionManager' of undefined
It seems there's something in soap 0.9.x that's broken. I'm about to lock the soap version to 0.8.0 as that tests successfully against ESXi on my laptop. Can you do a npm install soap@0.8.0
and run the tests locally to ensure it works on your system as well?
Also, which command were you experiencing the original issue on? Do you have some example code so I can create a test around it?
Just out of curiosity, have you tried using the node-vsphere module instead so you don't have to figure out all the calls to go directly to the vCenter server? Just wanted some feedback on how exactly you're using the module. I also have a Gitter setup for discussion.
I actually ended up going with pyvmomi as it's got allot more functions and example code. I'm running it as a rest api to my node app
On Fri, Jul 10, 2015 at 5:53 PM Patrick C notifications@github.com wrote:
Just out of curiosity, have you tried using the node-vsphere http://www.github.com/reedog117/node-vsphere module instead so you don't have to figure out all the calls to go directly to the vCenter server? Just wanted some feedback on how exactly you're using the module. I also have a Gitter setup for discussion.
— Reply to this email directly or view it on GitHub https://github.com/reedog117/node-vsphere-soap/issues/2#issuecomment-120537787 .
When using npm install node-vsphere-soap I get 0.0.2 installed instead of 0.0.2-5. The issue is gone in 0.0.2-5.
That's weird.. it looks like it's giving me the correct version
pc-macbook:node-vsphere-soap pat$ npm info node-vsphere-soap
{ name: 'node-vsphere-soap',
description: 'interface to vSphere SOAP/WSDL from node for interfacing with vCenter or ESXi',
'dist-tags': { latest: '0.0.2-5' },
versions:
[ '0.0.1-1',
'0.0.1',
'0.0.2-1',
'0.0.2-2',
'0.0.2-3',
'0.0.2-5',
'0.0.2' ],
maintainers: 'reedog117 <patrickc81@gmail.com>',
time:
{ modified: '2015-07-10T17:35:35.324Z',
created: '2015-02-11T06:09:25.778Z',
'0.0.1': '2015-02-11T06:09:25.778Z',
'0.0.1-1': '2015-02-13T18:26:33.006Z',
'0.0.2': '2015-02-27T15:50:18.457Z',
'0.0.2-1': '2015-03-03T15:43:04.122Z',
'0.0.2-2': '2015-03-03T16:55:19.283Z',
'0.0.2-3': '2015-06-01T18:23:05.862Z',
'0.0.2-5': '2015-07-10T17:35:35.324Z' },
homepage: 'https://github.com/reedog117/node-vsphere-soap#readme',
keywords: [ 'vsphere', 'vcenter', 'api', 'soap', 'wsdl' ],
repository:
{ type: 'git',
url: 'git+https://github.com/reedog117/node-vsphere-soap.git' },
author: 'reedog117',
bugs: { url: 'https://github.com/reedog117/node-vsphere-soap/issues' },
license: 'MIT',
readmeFilename: 'README.md',
version: '0.0.2-5',
main: 'lib/client.js',
scripts: { test: 'lab' },
dependencies: { lodash: '3.x.x', soap: '0.8.0', 'soap-cookie': '0.10.x' },
devDependencies: { code: '1.x.x', lab: '5.x.x' },
preferGlobal: false,
gitHead: 'a28a5c05aef9709c32de62fe4fc7d6faa84da3bc',
dist:
{ shasum: 'e055a17d23452276b0755949b163e16b4214755c',
tarball: 'http://registry.npmjs.org/node-vsphere-soap/-/node-vsphere-soap-0.0.2-5.tgz' },
directories: {} }
FYI, I just ran into this myself, simply running "npm install node-vsphere-soap". It's still giving out version '0.0.2' instead of the later '0.0.2-5'. I wonder if npm is having an issue with the dash (-) or something. If this can't be fixed, I'd suggest updating the README to have users install using a version number.
./vsphere-front-end/node_modules/node-vsphere-soap/node_modules/soap/lib/wsdl.js:864 elem.targetNSAlias = type.namespace; ^ TypeError: Cannot assign to read only property 'targetNSAlias' of xsd:string
can be fixed by commenting out line 864 and 865 of that file, though you should see if you can move up to a newer version of soap.