consume webservice in WCF with ajax

0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<form id="form1">
    <div class="jumbotron">
        <input type="text" id="codUser"/>
        <button onclick="ConsUsuario(); return false;">Consulta Usuario</button>
    </div>
</form>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script><scripttype="text/javascript">
    function ConsUsuario(){
        var value = $("#codUser").val();

        $.ajax({
        url: "http:/food-fast-com.web27.redehost.net/ServiceUsuario.svc/ConsultarRegistroPorCodigo",
        type: "GET",
        data: JSON.stringify(value),
        dataType: "json",
        contentType: "application/json",
        success: function (result) {
            console.info(result);
            }
        });
    }
 </script>

I get the error Failed to load resource: the server responded with a status of 404 , as if I did not find the webservice path, but in soapUI it works blz.

    
asked by anonymous 09.05.2017 / 13:58

0 answers