RE: PHP and SAP Business One DI Server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-11-20 at 04:55 -0300, Andrés Robinet wrote:
> I can only speak for my experience in PHP+SOAP in a recent project, but not
> on SAP. You'll surely get more information here as the experts will start
> speaking... If this is of any help to you, then PERFECT! If not, well, hope
> not to bother you with well-known stuff at least.
> 
> The project I'm involved with uses web services to fetch vehicle data from
> Chrome (http://www.chrome.com). We are using NuSoap, because we found no
> other options for PHP 4 (PHP 5 has a native Soap Extension, but I can only
> tell you that I've READ NuSoap has more features, I didn't even test it).
> 
> You can download NuSoap here (pick the last version, the previous ones had a
> name clash problem with PHP 5).
> http://sourceforge.net/project/showfiles.php?group_id=57663
> 
> As for how to use it... well... RTFM. I don't have a clue of how the SAP
> part works (I know "very generally" what SAP is... I never faced a PHP
> integration with it). But I can give you some sample code for the PHP part,
> obviously, the last word is that of SAP's technical specifications.
> 
> /* First Create a WSDL Object and save it in the cache */
> $wsdlURL = "https://where/is/my/service?WSDL";;
> $cacheDir = "/path/to/writable/dir";
> $timeToLive = 86400; // Only one day, but wsdl's don't change that often,
> you can increase it much more
> $wsdlCache = new wsdlcache($cacheDir, $timeToLive);
> $wsdl = $wsdlCache->get($wsdlURL);
> if ($wsdl == null):
> 	$wsdl = new wsdl($wsdlURL);
> 	$wsdlCache->put($this->wsdl);
> endif;
> // After this line you have a wsdl object that was either created or
> retrieved from the cache
> 
> /* Get the client and the proxy */
> $client = new nusoap_client($wsdl, true);
> $proxy = $client->getProxy();
> 
> /* Now call SAP web service functions as documented in the tech spec */
> $param1 = 'my param 1';
> $param2 = array('whatever', 'is', 2, 'be');
> // Call one of SAP functions
> $result = $proxy->myFunctionAsReadFromSAPTechSpec($param1, $param2);
> 
> /* Now check for error codes in the result, store them in a db, whatever you
> need */
> If ($result['WhoKnows'] == 'Checking is your job'):
> 	echo "Good Job!";
> else:
> 	echo "RTFM AGAIN!!!";
> endif;

Thanks for the information Andrés though to be honest I'm looking more
for information about the actual SAP Business One integration since I
have done SOAP in the past without problem. Specifically I guess I'm
looking for the following from the group:

    - have you integrated SAP BO with PHP via DI server

    - any gotchas with respect to configuration and connecting
      to DI server?

There are a few tidbits on the net, some dating to early 2005. But none
that I read had very definitive information about PHP.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux