How do I send the input response to the soapUI

0

My code:

<html>
  <head>
    <title></title>
    <script type="text/javascript">

       function valor() {
         var form1 = document.frm;
         var dados = form1.dados.value;

         if (dados == "teste"){
            alert('pegando dados');
            form1.dados.focus();
            return false;
         }

         return true;
       }
    </script>
  </head>
  <body>
    <form onSubmit="return valor()" name="frm" method="post" 
          action="http://schemas.xmlsoap.org/soap/envelope/">
      <input name="dados"  placeholder="email">
      <input type="submit" onClick="return valor()" value='Inserir texto'/>
    </form> 
  </body>
</html>
    
asked by anonymous 27.02.2015 / 14:10

1 answer

0

I believe you already have a functional MockService in your SOAPUI and know which address and endpoint you need to access.

In this case you can use a jQuery plugin to work with SOAP messages: jQuery SOAP

Your request would be something like:

$.soap({
    url: '[coloque o endereço do MockService aqui]',
    method: '[Coloque a Ação a ser executada (Metodo)]',    
    data: {
        dados: "[email protected]"
    },    
    success: function (soapResponse) {
        // soapResponse é a resposta SOAP.
        // você pode usar o método soapResponse.toJSON() para fazer um parse para JSON.
    },
    error: function (soapResponse) {
        // exibir erro.
    }
});
    
27.02.2015 / 14:24