Web Service calls from PHP using SOAP

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
GreyWolf
Registered User
Posts: 4754
Joined: 06 Aug 2003, 02:00
Processor: PHENOM II 945
Motherboard: Asus M4A78
Graphics card: HIS ICEQ 4850 1GB
Memory: 4GB CORSAIR XMS II 1066
Location: , location, location!

Web Service calls from PHP using SOAP

Post by GreyWolf »

Right, so I have been trying to call a web service using php for the last 2 days.

So far I have managed to make it so that there are no exceptions, but I do get a fatal error because the execution time of 30 seconds was exceeded.

Here is my code:

Code: Select all

<?php
try {
	$client = new SoapClient(null, array('location' => 'http://localhost:8080/nuSoap/samples/kmq-4.php','uri' => '****')); 
	$result = $client->__soapCall('GetItemQuantityOnHand', array(new SoapParam('SB3510/BK', '001'))); 
	printf("Result = %s\n", $result); 
	} 
	catch (Exception $e) 
	{
    printf("Message = %s\n",$e->__toString());
	}


?>
Can you guys spot an error in my code (I masked out the uri on purpose), or do I need to call the guys responsible for the web service and ask them to sort out their service?
"Every normal man must be tempted at times to spit on his hands, hoist that black flag, and begin slitting throats."
- H. L. Mancken
ameaq
G3AR Webmaster
Posts: 4
Joined: 10 Aug 2011, 07:38

Re: Web Service calls from PHP using SOAP

Post by ameaq »

It all depends on how they configure their server, or servers I guess.You would need to be more specific about which server/servers you are trying to communicate with for anyone to help you. Popular ones limit external communication
GreyWolf
Registered User
Posts: 4754
Joined: 06 Aug 2003, 02:00
Processor: PHENOM II 945
Motherboard: Asus M4A78
Graphics card: HIS ICEQ 4850 1GB
Memory: 4GB CORSAIR XMS II 1066
Location: , location, location!

Re: Web Service calls from PHP using SOAP

Post by GreyWolf »

ok, after 2 weeks of problem solving, I figured out that the web service was configured incorrectly.

My php was fine.
"Every normal man must be tempted at times to spit on his hands, hoist that black flag, and begin slitting throats."
- H. L. Mancken
Post Reply