why does not the result of a webservice appear in SOAP?

0

Good day, I have this Webservice that when I invoke it returns the result in xmlns, even though I have it "configured" so that I can take care of it in SOAP:

public class WebService : System.Web.Services.WebService
{

    [WebMethod]
    [SoapDocumentMethod (
    Action = "consultaIndividualSUCIS",
        RequestNamespace = "http://localhost:53680",
        ResponseNamespace = "http://localhost:53680",
        Use = SoapBindingUse.Literal,
        ParameterStyle = SoapParameterStyle.Wrapped
        )]

    public DataTable consultaIndividualSUCIS(int tipoId, int numId)
    {
        string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
        using (SqlConnection con = new SqlConnection(constr))
        {

            using (SqlCommand cmd = new SqlCommand("SELECT tipoCodigoEntidad,    Nombre,     estadoAutorizacion,     tipoIntermediario,  indicadorVinculado,     tipoIdEntidadVincula,   numIdEntidadVincula,    nombreEntidadVincula,   fechaVinculacion,   fechaDesvinculacion,    organismoAutorizado,    fechaIniAcreditacion,   fechaFinAcreditacion,   ramosAutorizados FROM Idoneidad_Funcionarios WHERE tipoId = @tipoId AND numId = @numId"))
            {
                using (SqlDataAdapter sda = new SqlDataAdapter())
                {
                    cmd.Parameters.AddWithValue("@tipoid", tipoId);
                    cmd.Parameters.AddWithValue("@numId", numId);

                    cmd.Connection = con;
                    sda.SelectCommand = cmd;
                    using (DataTable dt = new DataTable())
                    {
                        dt.TableName = "Idoneidad_Funcionarios";

                        sda.Fill(dt);
                        return dt;
                    }
                }
            }
        }
    }

}
    
asked by Vulpex 26.05.2017 в 15:31
source

0 answers