Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

2.2K
Visualizações
How to make a Soap call in React js?

I have tried a few ways to make a Soap call through Reactjs. But I am always facing some error in every approach. Can someone help me out here or kindly provide me with any small working example so that I could refer it?

I had tried using the npm soap and easysoap package but I am not able to succeed. Any working example is greatly appriciated. I also tried the following way but it too doesn't work.

var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', '{My soap endpoint}', true);

// build SOAP request
var sr =
    '<soap:Envelope xmlns:soap="{My soap request}"'

xmlhttp.onreadystatechange = function () {
    if (xmlhttp.readyState == 4) {
        if (xmlhttp.status == 200) {
            alert('done. use firebug/console to see network response');
        }
    }
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Both npm soap and easysoap are Node.js packages, which means that they run on the server but not on the client, where ReactJS lives.

So, if you want to call a soap service from the client, you can try this example of pure javascript or use a third-party tool like jquery-soap.

Hope this helps :)

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda