I'm while using joomla framework to come back values from the Publish request, and also the print screen shows me data, but while using the array in delivering me to some method and print or send me data.

Here' place the code that I have got grey hair,thanks ahead of time.

This is actually the controller:


/**
 * Construct (registers additional tasks to methods).
 */
function __construct(){
    parent::__construct();

    //Registro de tareas extra
    $this->registerTask('add','ingresarPlanilla');
}//function


function ingresarPlanilla(){

    // Comprueba del request la clave de falsificación
    //JRequest::checkToken('post') or die( 'Objeto invalido' );

    $task = JRequest::getVar('task');

    $model = &$this->getModel('planilla');

    if ($returnid = $model->ingresar()) {
        switch ($task) {
            case 'add' :
                $link = '?option=com_mercurio&view=planilla&controller=planilla&task=add';
                break;
            default :
                $link = 'index.php?option=com_mercurio&view=planilla';
                break;
        }   
        $msg = JText::_( 'PLANILLA INGRESADA' );
        $cache = &JFactory::getCache('com_mercurio');
        $cache->clean();
    } else {
        $msg = 'PLANILLA NO INGRESADA';
        $link = 'index.php?option=com_mercurio&view=planilla';
    }
    //$model->checkin();
    $this->setRedirect($link, $msg);
}


This is actually the model:


    $cliente = new SoapClient(URLMERCURIOWS.URLWSPLANILLA, array('login'=>LOGINWS,'password'=>PASSWORDWS));

    if (is_soap_fault($cliente)) {
        trigger_error("SOAP Fault: (faultcode: {$arr->faultcode}, faultstring: {$arr->faultstring})", E_USER_ERROR);

        return false;
    }

    $postost = JRequest::get( 'post', JREQUEST_ALLOWHTML );


    $postost['cdPoblacionOrigen']    = JRequest::getVar('cdPoblacionOrigen', '', 'post', 'cdPoblacionOrigen');
    $postost['nmSecDniCliente']    = JRequest::getVar('nmSecDniCliente', '', 'post', 'nmSecDniCliente');
    $postost['cdAgenciaCliente']    = JRequest::getVar('cdAgenciaCliente', '', 'post', 'cdAgenciaCliente');
    $postost['nmPesoTransportado']    = JRequest::getVar('nmPesoTransportado', '', 'post', 'nmPesoTransportado');
    $postost['nmVolumenTransportado']    = JRequest::getVar('nmVolumenTransportado', '', 'post', 'nmVolumenTransportado');
    $postost['nmUndsTransportadas']    = JRequest::getVar('nmUndsTransportadas', '', 'post', 'nmUndsTransportadas');

    $planilla = array();
    $planilla = $postost;

    echo $postost['cdPoblacionOrigen']."</br>"; 
    echo $postost['nmSecDniCliente']."</br>";
    echo $postost['cdAgenciaCliente']."</br>";
    echo $postost['nmPesoTransportado']."</br>";
    echo $postost['nmVolumenTransportado']."</br>";
    echo $postost['nmUndsTransportadas']."</br>";


    $cliente->ingresarPlanilla( AGENCIAXDEFECTO, null, null, null, $postost['cdPoblacionOrigen'], $post['nmSecDniCliente'],  $post['cdAgenciaCliente'],  null, $post['nmPesoTransportado'],  $post['nmVolumenTransportado'],  $post['nmUndsTransportadas'], null, null,  null,  null,  null, null,  null,  null,  null);

    return true;
}

This is actually the view:


<form id="ingresarPlanilla" name="ingresarPlanilla" method="post" action="?option=com_mercurio&view=planilla&controller=planilla&task=add">
    <table width="98%" border="1" bordercolor="#ECE9D8">    
        <tr>
          <td width="21%" class="titulo" align="center">Ingresar Planilla</td>
          <td width="29%">&nbsp;</td>
          <td width="21%">&nbsp;</td>
          <td width="29%">&nbsp;</td>
        </tr>

        <tr>
            <td colspan="2">Agencia Origen</td>         
            <td colspan="2"><input name="cdAgenciaOrigen" type="text" class="campo_noeditable" id="cdAgenciaOrigen" value="<?php echo AGENCIAXDEFECTO;?>"readonly="readonly"/></td>
        </tr>

        <tr>
            <td colspan="2">Poblacion Origen</td>           
            <td colsp man="2"><input name="cdPoblacionOrigen" type="text" class="campo" id="cdPoblacionOrigen" /></td>
        </tr>

        <tr>
            <td colspan="2">DNI Cliente</td>            
            <td colspan="2"><input name="nmSecDniCliente" value="<?php echo $aux[5];?>" type="text" class="campo" id="nmSecDniCliente"/></td>
        </tr>

        <tr>
            <td colspan="2">Peso Transportado</td>          
            <td colspan="2"><input name="nmPesoTransportado" type="text" class="campo" id="nmPesoTransportado "/></td>
        </tr>

        <tr>
            <td colspan="2">Volumnen Transportado</td>          
            <td colspan="2"><input name="nmVolumenTransportado" type="text" class="campo" id="nmVolumenTransportado"/></td>
        </tr>

        <tr>
            <td colspan="2">Unidades Transportados</td>         
            <td colspan="2"><input name="nmUndsTransportadas" type="text" class="campo" id="nmUndsTransportadas"/></td>
        </tr>


        <tr>
            <td colspan="3">Observaciones</td>
        </tr>
        <tr>
            <td colspan="3"><textarea name="observaciones" cols="60" rows="3" class="campo" id="observaciones"></textarea></td>
        </tr>

        <tr>
            <td class="label"><input type="submit" name="Enviar" id="Enviar" value="Enviar" /></td>
        </tr>

        <input type="hidden" name="option" value="com_mercurio" />
        <input type="hidden" name="cdAgenciaCliente" value="<?php echo $aux[6];?>" />
        <input type="hidden" name="view" value="<?php echo JRequest::getVar('view'); ?>" />
        <input type="hidden" name="task" value="" />
        <?php echo JHTML::_( 'form.token' ); ?>