Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help calling a web service from pl/sql

ratitaDec 8 2010 — edited Dec 10 2010
Hi, i have a web service that is called from a php, i needed to do this but from pl sql:

this is the call of web service from php:

<?PHP

//Variables de prueba - Se tienen que tomar los valores de la base de datos, de la compra y el usuario
$p_id_emec=urlencode("33355555"); //Identificador del sitio dentro de Pago Fácil
$p_id_operacion=urlencode("151"); //Identificador unívoco de la compra en el sitio
$p_id_mone_ecom=urlencode("01"); //Identificador de moneda - '01'=pesos - '02=dolares

//Inicializa Variables de URL
$serviceName="Pago XX";


$protocol="http://";


// DESARROLLO
$ipUrl="desa.e-pagoxx.com";

$port=80;

//Llamada
$call="/2130/index.php";


//Abro la conexion al port
$URLsola = $protocol.$ipUrl;

//Concatenacion del string
$txtURL = $protocol.$ipUrl.$call;
$txtURL .="?p_id_emec=".$p_id_emec;
$txtURL .="&p_id_operacion=".$p_id_operacion;
$txtURL .="&p_id_mone_ecom=".$p_id_mone_ecom;
$txtURL = $txtURL;

//***********************************************************************************//
//* Se comunica con el servidor, pasa los datos y recibe el HTML con el comprobante *//
//***********************************************************************************//



$fp = fsockopen($ipUrl, $port, &$errno, &$errstr, 30);

if(!$fp)
{
echo "No me puedo comunicar con $serviceName";
exit;
}
else
{
$file=@fopen($URLsola,"r");
$pageData=file($txtURL);

for($i=0;$i<count($pageData);$i++)
{
$sText.=$pageData[$i];
}

}

@fclose($file);
@fclose($fp);

echo($sText);

?>

I need to call this webservice from pl sql


any ideas?


thanks!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2011
Added on Dec 8 2010
10 comments
549 views