lula / ngx-soap

Simple SOAP client for Angular
MIT License
66 stars 61 forks source link

Cannot read property 'services' of undefined #55

Open Hanzofm opened 5 years ago

Hanzofm commented 5 years ago

Hi,

I am using this library(v0.6) into a Ionic v4/Angular 8 project. First:

When I try to create a client, your docs says this:

this.soap.createClient('assets/calculator.wsdl').subscribe(client => this.client = client);

But into my installed version the createClient method returns a Promise

If do a create client with a promise the method returns this exception:

TypeError: Cannot read property 'services' of undefined
    at Client.push../node_modules/ngx-soap/fesm5/ngx-soap.js.Client._initializeServices (ngx-soap.js:2957)
    at new Client (ngx-soap.js:2871)
    at ngx-soap.js:3270
    at step (tslib.es6.js:99)
    at Object.next (tslib.es6.js:80)
    at fulfilled (tslib.es6.js:70)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
    at Object.onInvoke (core.js:26769)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)
    at resolvePromise (zone.js:852)
    at resolvePromise (zone.js:809)
    at zone.js:913
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:26760)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
    at invokeTask (zone.js:1693)

What I am doing wrong?

pr0thean commented 4 years ago

Hi did you manage to solve this?

ishantha-99x commented 3 years ago

I am experiencing same problem. Once build in production mode, this error comes to me in run time. Any fixes for this?

shreyansh-jain commented 3 years ago

Did anybody find the solution?