public static string TestQTCNDrupalGET(string solicitante, string password, string t513_idlinea)
    {
        //Llamada a servicio REST
        var client = new SUPER.BLL.RestClient();

        #region Metodos GET
        //client.Method = HttpVerb.GET;
        //Obtener paises
        client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerPaises?solicitante=" + solicitante + "&password="******"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerProvincias?solicitante=" + solicitante + "&password="******"&t172_idpais=1";
        //Obtener Líneas
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerLineas?solicitante=" + solicitante + "&password="******"&columna=0&orden=0";
        //Obtener datos línea
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerDatosLinea?solicitante=" + solicitante + "&password="******"&t513_idlinea=8707";
        #endregion


        var    json = client.MakeRequest();
        string sAux = json;
        sAux = sAux.Substring(1);
        sAux = sAux.Substring(0, sAux.Length - 1);
        //return json;
        return(sAux);
    }
    public static string TestIberdok2(string solicitante, string password, string pedido, int code)
    {
        //Llamada a servicio REST
        var client = new SUPER.BLL.RestClient();

        client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/IberDokControl/IberDok.svc/Control";
        client.Method   = HttpVerb.POST;
        //client.PostData = "{idUsuario:admin,uidPedido:7149C6BD-B49D-418B-BD3D-73E88CFCA459,modelo:3473,tipo:PDF, clase:I}";}

        //El servicio responde
        //string sParam = @"{""idUsuario"":""admin"",""uidPedido"":""7149C6BD-B49D-418B-BD3D-73E88CFCA459"",""modelo"":""3473"",""tipo"":""PDF"",""clase"":""I""}";
        string sParam = @"{""solicitante"":""" + solicitante + @"""";

        sParam += @",""password"":""" + password + @"""";
        sParam += @",""pedido"":""" + pedido + @"""";
        sParam += @",""code"":" + code.ToString() + @"}";

        //Prueba serializando con JSON
        //IberDok oPet = new IberDok(usuario, uiPedido, modelo, tipo, clase);
        //DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(IberDok));
        //MemoryStream mem = new MemoryStream();
        //ser.WriteObject(mem, oPet);
        //string sParam = Encoding.UTF8.GetString(mem.ToArray(), 0, (int)mem.Length);

        client.PostData = sParam;

        var json = client.MakeRequest();

        return(json);
    }
    public static string GetPaisExpl(string solicitante, string password)
    {
        //Llamada a servicio REST
        var client = new SUPER.BLL.RestClient();

        client.Method = HttpVerb.GET;
        //Obtener paises
        client.EndPoint = @"http://services.intranet.ibermatica/IBSERVICES/QTCN/QTCN.svc/QTCNObtenerPaises?solicitante=" + solicitante + "&password=" + password;

        var json = client.MakeRequest();

        return(json);
    }
    public static string TestQTCNDrupalPOST(string solicitante, string password, string t513_idlinea)
    {
        //Llamada a servicio REST
        var client = new SUPER.BLL.RestClient();

        client.Method   = HttpVerb.POST;
        client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/Prueba3";
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNRegistrarInscripcionOferta";

        string sPathDoc = "d:\\Docs\\_FicheroPruebaQTCN.txt";//Fichero pequeño

        //string sPathDoc = "d:\\Docs\\CaducidadSesion.doc";
        //string sPathDoc = "d:\\Docs\\Aplicaciones_CrossBrowser.doc";
        //string sPathDoc = "d:\\Docs\\Gordos\\Doc_5Mb.doc";

        byte[] oCV           = System.IO.File.ReadAllBytes(sPathDoc);
        string temp_inBase64 = Convert.ToBase64String(oCV);

        //Prueba oPrueba = new Prueba();
        //Precandidato oPrueba = new Precandidato();
        //oPrueba.t500_sexo = "V";//V
        //oPrueba.t500_apellido1 = "ARIZTEGUI";
        //oPrueba.t500_apellido2 = "HUARTE";
        //oPrueba.t500_nombre = "MIKEL";
        //oPrueba.t172_idpais = 1;
        //oPrueba.t173_idprovincia = 20;
        //oPrueba.t500_telefono = "943613817";
        //oPrueba.t500_email = "*****@*****.**";
        //DateTime dt = new DateTime(1966, 10, 20);
        //oPrueba.t500_fecnacim = dt;
        //oPrueba.t500_nif = "72667667H";
        //oPrueba.t500_observa = "hola";
        //oPrueba.t530_idorigen = 1;
        //oPrueba.extension = "doc";
        //oPrueba.cv = temp_inBase64;//

        SolicitudPrueba oSolicitud = new SolicitudPrueba();

        oSolicitud.solicitante  = solicitante;
        oSolicitud.password     = password;
        oSolicitud.t513_idlinea = t513_idlinea;
        //oSolicitud.Prueba = JsonConvert.SerializeObject(oPrueba);
        //oSolicitud.precandidato = JsonConvert.SerializeObject(oPrueba);
        oSolicitud.t500_sexo        = "V";//V
        oSolicitud.t500_apellido1   = "ARIZTEGUI";
        oSolicitud.t500_apellido2   = "HUARTE";
        oSolicitud.t500_nombre      = "MIKEL";
        oSolicitud.t172_idpais      = 1;
        oSolicitud.t173_idprovincia = 20;
        oSolicitud.t500_telefono    = "943613817";
        oSolicitud.t500_email       = "*****@*****.**";
        DateTime dt = new DateTime(1966, 10, 20);

        oSolicitud.t500_fecnacim = dt;
        oSolicitud.t500_nif      = "72667667H";
        oSolicitud.t500_observa  = "hola";
        oSolicitud.t530_idorigen = 51;
        oSolicitud.extension     = "doc";
        oSolicitud.cv            = temp_inBase64;//

        string sParam = JsonConvert.SerializeObject(oSolicitud);

        client.PostData = sParam;

        var json = client.MakeRequest();

        return(json);
    }
    public static string TestQTCNDrupal(string solicitante, string password, string t513_idlinea)
    {
        //Llamada a servicio REST
        var client = new SUPER.BLL.RestClient();

        #region Metodos GET
        //client.Method = HttpVerb.GET;
        //Obtener paises
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerPaises?solicitante=" + solicitante + "&password="******"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerProvincias?solicitante=" + solicitante + "&password="******"&t172_idpais=1";
        //Obtener Líneas
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerLineas?solicitante=" + solicitante + "&password="******"&columna=0&orden=0";
        //Obtener datos línea
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNObtenerDatosLinea?solicitante=" + solicitante + "&password="******"&t513_idlinea=8707";
        #endregion

        #region Métodos POST
        client.Method = HttpVerb.POST;
        //Prueba
        //client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/Prueba";
        //QTCNRegistrarInscripcionOferta
        client.EndPoint = @"http://mk17706.intranet.ibermatica/IBSERVICES/QTCNDrupal/QTCN.svc/QTCNRegistrarInscripcionOferta";

        #region Pruebas
        //string sexo = "V";//M
        //string sNom = "MIKEL", sAp1 = "ARIZTEGUI", sAp2 = "HUARTE", sPais="66", sProv="20", sTfno="12346789";
        //string sEmail = "*****@*****.**", sFNac="20/10/1966", sNif="72667667H", sObs="camión ñandú";
        //string sOrigen = "1";//Amigo
        //string sExt = "doc";//, t2_iddocumento="";
        //byte[] data=null;

        //string candidato = @"{""t500_sexo"":""" + sexo + @"""";
        //candidato += @",""t500_nombre"":""" + sNom + @"""";
        //candidato += @",""t500_apellido1"":""" + sAp1 + @"""";
        //candidato += @",""t500_apellido2"":""" + sAp2 + @"""";
        //candidato += @",""t172_idpais"":""" + sPais + @"""";
        //candidato += @",""t173_idprovincia"":""" + sProv + @"""";
        //candidato += @",""t500_telefono"":""" + sTfno + @"""";
        //candidato += @",""t500_email"":""" + sEmail + @"""";
        //candidato += @",""t500_fecnacim"":""" + sFNac + @"""";
        //candidato += @",""t500_nif"":""" + sNif + @"""";
        //candidato += @",""t500_observa"":""" + sObs + @"""";
        //candidato += @",""t530_idorigen"":""" + sOrigen + @"""";
        //candidato += @",""t500_newpais"":""" + sPais + @"""";
        //candidato += @",""t500_newprovincia"":""" + sProv + @"""";
        //candidato += @",""ext"":""" + sExt + @"""";
        //if (data == null)
        //    candidato += @",""cv"":""""";
        //else
        //    candidato += @",""cv"":""" + Convert.ToBase64String(data) + @"""";
        //candidato += @"}";

        //string sParam = @"{""solicitante"":""" + solicitante + @"""";
        //sParam += @",""password"":""" + password + @"""";
        //sParam += @",""t513_idlinea"":""" + t513_idlinea + @"""";
        //candidato = "MIKEL";
        //sParam += @",""candidato"":""" + precandidato + @"""";
        //sParam += @"}";
        //string pedido = "1", code="2";

        //string sParam = @"{""solicitante"":""" + solicitante + @"""";
        //sParam += @",""password"":""" + password + @"""";
        //sParam += @",""t513_idlinea"":""" + t513_idlinea + @"""";
        //sParam += @",""candidato"":" + candidato + @"";
        //sParam += @"}";
        #endregion

        //string sPathDoc = "d:\\Docs\\_FicheroPruebaQTCN.txt";
        string sPathDoc = "d:\\Docs\\Gordos\\Doc_5Mb.doc";

        byte[] oCV           = System.IO.File.ReadAllBytes(sPathDoc);
        string temp_inBase64 = Convert.ToBase64String(oCV);

        Candidato oCandidato = new Candidato();
        oCandidato.t500_sexo      = "V";
        oCandidato.t500_nombre    = "MIKEL";
        oCandidato.t500_apellido1 = "ARIZTEGUI";
        oCandidato.t500_apellido2 = "HUARTE";
        oCandidato.t500_nif       = "73667667H";
        oCandidato.t500_telefono  = "123465789";
        oCandidato.t500_email     = "*****@*****.**";
        DateTime dt = new DateTime(1966, 10, 20);
        oCandidato.t500_fecnacim    = dt;
        oCandidato.t500_nif         = "72789456X";
        oCandidato.t500_observa     = "observaciones";
        oCandidato.t530_idorigen    = 1;
        oCandidato.t172_idpais      = 1;
        oCandidato.t173_idprovincia = 20;
        //oCandidato.t500_newpais = "";
        //oCandidato.t500_newprovincia = "";
        oCandidato.extension = "doc";
        oCandidato.cv        = temp_inBase64;

        Solicitud oSolicitud = new Solicitud();
        oSolicitud.solicitante  = solicitante;
        oSolicitud.password     = password;
        oSolicitud.t513_idlinea = t513_idlinea;
        oSolicitud.candidato    = JsonConvert.SerializeObject(oCandidato);

        string sParam = JsonConvert.SerializeObject(oSolicitud);
        client.PostData = sParam;
        #endregion

        var json = client.MakeRequest();

        return(json);
    }