Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/12/2006, 10:54
josese
 
Fecha de Ingreso: diciembre-2006
Mensajes: 6
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: web service PHP->c#

CLIENTE PHP:
<html>
<head>
</head>
<body>


<?php


var_dump($_POST['llegada1']);
var_dump($_POST['llegada2']);
var_dump($_POST['llegada3']);



//if(empty($_POST['llegada1'])) {
if(!isset($_POST['llegada1']) && !count($_POST['llegada1'])) {

?>
<h3> Planificador de Procesos </h3>

<form action="procesclient.php" method="POST">
<table>
<tr>
<td>
Introduce el instante de inicio del proceso1:
<input name="llegada1">
</td>
<td>
Introduce la duracion del proceso:
<input name="duracion1">
</td>
</tr>
<tr>
<td>
Introduce el instante de inicio del proceso1:
<input name="llegada2">
</td>
<td>
Introduce la duracion del proceso:
<input name="duracion2">
</td>
</tr>
<tr>
<td>
Introduce el instante de inicio del proceso1:
<input name="llegada3">
</td>
<td>
Introduce la duracion del proceso:
<input name="duracion3">
</td>
</tr>
</table>
<input type="submit" id="mult" value="Calcular" > </input> <input type="reset" value="Borrar">

</form>

<?php

}
else
{

$llega = array($_POST['llegada1'],$_POST['llegada2'],$_POST['llegada3']);
$dura = array($_POST['duracion1'],$_POST['duracion2'],$_POST['duracion3']);

require_once('nusoap.php');
// Create the client instance
$client = new soapclient('"SERVIDOR"', true);
// Check for an error

$proxy = $client->getProxy();

$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}

$l = array('procesos' => $llega);
$d = array('duracion' => $dura);
// Call the SOAP method
$result = $proxy->fcfsp($l,$d);
// Check for a fault
if ($proxy->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $proxy->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>El tiempo en tu ciudad </h2><pre>';
var_dump($result);
print_r($result);

echo '</pre>';
}
}

}
print_r($llega);"