You are here: Re: soap client for apache soap server. « PHP Programming Language « IT news, forums, messages
Re: soap client for apache soap server.

Posted by Michael Placentra II on 04/23/07 21:11

Here's a basic idea of how to use NuSOAP:

$ns = 'https://name/space/here!!!';
$nusoap = new soapclient( $ns, true );
$nusoap->soap_defencoding = 'UTF-8';
$nusoap->setHeaders( '<...>...headers here!!!...</...>' );
$response = $nusoap->call( 'command', '<...>...data here!...</...>', $ns );

Then $response will be an associative array of whatever data was
returned. You should also be checking for errors after each action with
a function like this:

function errorCheck( $nusoapObj )
{
if( $soapObj->fault )
{
trigger_error( "{$soapObj->faultstring}: {$soapObj->faultdetail}",
E_USER_ERROR );
}

$clientError = $soapObj->getError();
if( $clientError )
{
trigger_error( $clientError, E_USER_ERROR );
}
}

$nusoap = new soapclient( $ns, true );

errorCheck( $nusoap );

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация