lula / ngx-soap

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

http://localhost:4200/calculator/calculator.asmx 404 (Not Found) #2

Closed gennadii-LineUp closed 7 years ago

gennadii-LineUp commented 7 years ago

I test the Example. I did 'ng serve', then opened an app at localhost. The button 'sum' at the app makes this error:

Any suggestions..?

lula commented 7 years ago

Try serving with a proxy with command npm run serve:proxy. That should avoid CORS problem.

If you see this line of code in example app (app.component.ts):

wsurl = wsurl.replace("http://www.dneonline.com", "/calculator");

I'm tweaking the web service url from wsdl in order to use proxied url. If you comment this out you should call the web service url defined in wsdl. However, if you test from localhost you might run into CORS issue though.

README of example application mentions it already. I'm going to remove the ng serve part, as in the example app I'm using only proxied url.

gennadii-LineUp commented 7 years ago

Thank you! it works!