andrewmcgivery / angular-soap

An angular port of a Javascript SOAP Client into a factory that has a similar syntax to $http.
114 stars 84 forks source link

fix Uncaught TypeError: Cannot read property 'constructor' of null #38

Closed jason-s13r closed 8 years ago

jason-s13r commented 8 years ago

When a void response is given from the SOAP service, the e parameter of the soapCallback is null.

This should solve issues #24, #17. Possibly #12 but an example there suggests assume failure rather than assume success.

jason-s13r commented 8 years ago

example response data that I have that causes the error:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <someVoidResponse xmlns="http://www.example.com/" />
  </soap:Body>
</soap:Envelope>
elia-c commented 8 years ago

I think the problem is in xmlHttp when an error occur in the WS it doesn't return the error as response but return the empy request.