Struggling to access a local webservice through XML:
Take a look at the code below:
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'text/xml',
'Accept': 'text/xml',
'Response-Type': 'text'
})
};
login() {
const postedData = `
<authenticationDetail>
<userName>myusername</userName>
<password>mypassword</password>
</authenticationDetail>`;
return this.http.post('http://localhost/login.ws', postedData, httpOptions)
.subscribe(
result => {
console.log('This result is' + result);
},
error => {
console.log('There was an error: ', error);
}
);
}
The specific error message received reads:
Http failure during parsing for 'http://localhost/login.ws'
Trying to identify and resolve the issue - Any suggestions?