1

I'm considering moving a project to Vuejs and I have a lot of .net soap webservices already created and tested. I know that I can use axios to interact with REST webservices, but can i consume the .net soap webservices from vue ? I already serch and I can't find anything that fits... any idea ?

Basically I need to replace this code without use jquery:

$.ajax({type: 'POST', url: webservice_url , data: data_to_send, 
contentType: 'application/json; charset=utf-8', dataType: 'json',
   success: function (response) {

   },
   error: function (XMLHttpRequest, textStatus, errorThrown) {

   }
});
José Matos
  • 569
  • 4
  • 13

1 Answers1

1

Yes, you can interact with Soap from Vue via Axios.

Your code will look like this:

  axios({
    method: 'post',
    url: webservice_url,
    data: data_to_send
  })
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });

https://github.com/axios/axios - axios documentation with extended examples and good example with SOAP is this link: https://stackoverflow.com/a/49153096/5808830

Ampersand
  • 11
  • 4