logo       

Re: Newbie and Viamichelin: msg#00081

php.nusoap.general

Subject: Re: Newbie and Viamichelin

Here is a quick sample

<?php
require_once('../lib/nusoap.php');
require_once('../lib/class.wsdlcache.php');

// Set your viamichelin login and password here
$login = 'login';
$password = 'password';

$wsdlurl = 'http://www.viamichelin.com/ws/services/Geocoding?wsdl';
$cache = new wsdlcache('.', 120);
$wsdl = $cache->get($wsdlurl);
if (is_null($wsdl)) {
$wsdl = new wsdl($wsdlurl);
$cache->put($wsdl);
} else {
$wsdl->debug_str = '';
$wsdl->debug('Retrieved from cache');
}
$client = new soapclient($wsdl, true);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}

$inputAddresses[] = array(
'address' => '45 Liberty Blvd.',
'cityName' => 'Malvern',
'countryCode' => 'USA',
'postalCode' => '19355',
'stateName' => 'PA'
);
$geocodingrequest = array('addressesList' => $inputAddresses);
$params = array('request' => $geocodingrequest, 'check' => "$login|$password");
$result = $client->call('getLocationsList', $params);

// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) .
'</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES)
. '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) .
'</pre>';
?>

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Janick-Yves BURBAN" <janick-yves.burban@xxxxxxxxxxx>
To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, April 21, 2005 1:18 PM
Subject: [Nusoap-general] Newbie and Viamichelin


> hi,
> i tried to connect on ViaMichelin Evaluation by NuSoap but it's not
> working.......i know i'm a big newbie...
> but if there is someone can help me just to connect on viamichelin
> webservices.
> i got the WSDL file (http://www.viamichelin.com/ws/services/Geocoding?wsdl)
> but i don't understand how to write in php/NuSoap the request
> and how to request server
> Thanks
> Janick
>
> INFO:
> the login and document are on:
> http://ws.viamichelin.com/wswebsite/gbr/jsp/hme/MaHomePage.jsp
>
>
> ------------------------------------------------------- SF email is sponsored
> by - The IT Product Guide Read honest & candid reviews on hundreds of IT
> Products from real users. Discover which products truly live up to the hype.
> Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________ Nusoap-general mailing list
> Nusoap-general@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/nusoap-general


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise