PHP 4 try-catch |
[eluser]FuzzyJared[/eluser]
I have developed a FedexAPI class within a PHP 5 environment, but the host is currently running PHP 4. So the try catch function breaks under PHP 4. I have looked on the web for alternatives, but have not found one that is really applicable. Any suggestions would be helpful! Code: try {
[eluser]FuzzyJared[/eluser]
I was able to find this, but have not been able to get it working with my example as of yet. Code: <?php
[eluser]FuzzyJared[/eluser]
I could have avoided this by using nusoap instead of the PHP SOAP calls. This doesn't use try { } catch { } within the code. http://ellislab.com/forums/viewthread/66603/
[eluser]CI jforth[/eluser]
I just wrote a Fedex tracking and rates class that uses curl instead of soap works great. I'll see about putting posting it on the wiki.
[eluser]devain[/eluser]
can you post your fedex code and class for some reason I cannot get what I have working with soap
[eluser]FuzzyJared[/eluser]
http://ellislab.com/forums/viewthread/66603/ that is the thread for what I was able to get working in nusoap.
[eluser]devain[/eluser]
Basic Tracking Thanks for the reply I am trying to do the tracking part of a package and I get the following error HTTP Could not connect to host here is the code that I am using and like yours it came from the fedex site. track.php file eyeglasses123.com/track.php Code: <?PHP log file eyeglasses123.com/fedextransaction.log Here is the wsdl eyeglasses123.com/TrackService_v2.wsdl last file is the fedex-common.php5 Code: <?php If you goto the link eyeglasses123.com/track.php you will see that I get the following error Fault Code:HTTP String:Could not connect to host I am wondering what I am doing wrong and why this is not working this is installed with regular soap. I would appericate any help on this
[eluser]devain[/eluser]
this is the actual error I seem to be getting Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/eye123/public_html/track.php:44 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://gateway...', 'track', 1, 0) #1 [internal function]: SoapClient->__call('track', Array) #2 /home/eye123/public_html/track.php(44): SoapClient->track(Array) #3 {main} thrown in /home/eye123/public_html/track.php on line 44
[eluser]devain[/eluser]
By the way thanks everyone for the help with this After removing the generic error codes I came up with this error Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /home/eye123/public_html/track.php:44 Stack trace: #0 [internal function]: SoapClient->__doRequest(’<?xml version=”...’, ‘https://gateway...’, ‘track’, 1, 0) #1 [internal function]: SoapClient->__call(’track’, Array) #2 /home/eye123/public_html/track.php(44): SoapClient->track(Array) #3 {main} thrown in /home/eye123/public_html/track.php on line 44 Then after a couple of days of trying to figure out what this error was and trying different soap call constructs I decided that it was not the code and turned to my soap install After recompiling soap with the following below I got everything to work So thanks everyone for the help and input --enable-soap' '--enable-sockets' '--enable-wddx' '-- soap Soap Client enabled Soap Server enabled Directive Local Value Master Value soap.wsdl_cache 1 1 soap.wsdl_cache_dir /tmp /tmp soap.wsdl_cache_enabled 1 1 soap.wsdl_cache_limit 5 5 soap.wsdl_cache_ttl 86400 86400 |
Welcome Guest, Not a member yet? Register Sign In |