Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/05/2009, 08:34
hmv
 
Fecha de Ingreso: abril-2005
Mensajes: 323
Antigüedad: 19 años, 1 mes
Puntos: 0
Busqueda Conectarme a un webservice

Hola amigos,
Pues tengo un gran problema, estoy usando el webservice de otra empresa pero no consigo conectarme, ademas que conosco poco(casi nada de wdsl) de este herramienta SOAP. Ellos me enviaroón un mail, pero no entiendo(El ingles si lo entiendo) como hacerlo funcioanar, a que se refiere con el punto 2, donde pongo esto?? y como??? en el punto 1, me baje el archivo y lo puse dentro de mi carpeta donde esta el script index.php, es esto correcto???

El 'tiStarfish.class.php' si lo tengo.
- El hosting lo tengo con una empresa y el server esta en linux

------------
1.)To create all classes needed please install wsdl2php pear library:
wget
http://mesh.dl.sourceforge.net/sourc...0.2.1-pear.tgz
sudo pear install wsdl2php-0.2.1-pear.tgz

2.) After installing you can generate files using command below from any
location:
php wsdl2php.php
https://xml.starfishinteractive.com/...7/xmlapi7.wsdl

It will generate starfish_xmlapi_7.php with all classes needed. I've
included also our custom tiStarfish.class.php file which will help to
connect.

Example:

Código PHP:
   
require_once('tiStarfish.class.php');
$result_variable tiStarfish::call'Ping'
array(
'affiliate'=>
array(
'id'=>'CD28',
'trace'=>'false')
)
);
 
print_r($result_variable);
 
$result_variable tiStarfish::call'ListHotelRoomsAvailability',
 
array(
'affiliate'=>
array(
'id'=>'CD28',
'trace'=>'false'),
'numberAdults' => 2,
'hotelId' => 80,
'fromDate' => '2009-02-01',
'toDate' => '2009-02-02' 
)
); 
Al ejecutar estas consultas me sale este error:
Código PHP:
WarningSoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning failed to load external entity "https://xml.starfishinteractive.com/xml/xmlapi7/xmlapi7.wsdl" in /home/barcelon/public_html/sleeping/starfish_xmlapi_7.php on line 634

Fatal error
: Class 'sfContext' not found in /home/barcelon/public_html/sleeping/tiStarfish.class.php on line 34 

Última edición por hmv; 06/05/2009 a las 08:46