Im starting a new web application project with simple HTML, CSS and Angular. We are using existing Web Services to retrieve data from some servers, one service we are trying to use is a public service: Global Weather SOAP Service
Is there an "easy" way to make the request with Angular? Actually our "test" code is this (with JQuery, still does not work), but would be better to implement the Angular approach with HTTP or RxJS...
import { Injectable } from '@angular/core';
import * as $ from 'jquery';
@Injectable()
export class SoapServiceProvider {
constructor() { }
testingSoapRequest() {
$.ajax({
url: 'http://www.webservicex.net/globalweather.asmx?op=GetCitiesByCountry',
data: { CountryName: 'Spain' },
success: (data) => {
console.log('Hey, we got a success response', data);
},
error: (err) => {
console.error('We got an error :(', err);
}
});
}
}
I have never used JQuery to make requests of any type (I just use $http in AngularJS and RxJS with Angular), so I really don't know the correct way to make it possible.
Note: There is a library to make Angular SOAP Requests in GitHub but it seems that does not work anymore with new Angular versions.