SOAP call troubles.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

SOAP call troubles.

Post by shiznatix »

I have a quite strange SOAP problem. I have 3 servers in the production cycle here, localhost->development/test->live. I have a script that makes a SOAP call to an outside server to get some data and this script works 100% on localhost and on the development servers but for some reason does not work on the live server. The code basically is this:

Code: Select all

//some stuff above this line
$params = array(
    'username' => '********',
    'password' => '*********',
    'year' => date('Y', $helper->timestamp),
    'month' => date('n', $helper->timestamp),
    'day' => date('j', $helper->timestamp)
);
 
$client = new SoapClient('https://www.betsson.com/ws/PartnerCom/PokerPartners.asmx?WSDL');
$return = $client->GetPokerStatsDay($params);
Like I said, it works on localhost and development server but on the live server I get this error message:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.server.com/path/to/soap/call' : Start tag expected, '<' not found
in /file/path/file.php:16
Stack trace:
#0 /file/path/file.php(16): SoapClient->SoapClient('https://www.ser...')
#1 {main}
thrown in /file/path/file.php on line 16
I have wondered if it was IP blocking but they swear they don't do any IP restrictions or anything so I am at a lose as to why this would be happening. Anyone have any insight as to the possibilities here?
johniem
Forum Commoner
Posts: 29
Joined: Mon Jul 20, 2009 8:58 am

Re: SOAP call troubles.

Post by johniem »

The version of all software distributions (PHP,SOAP etc) you are using is the same or newer on hoster than the one on localhost and development server??
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: SOAP call troubles.

Post by shiznatix »

Apparently 5.2.9 has some troubles with SOAP. I changed to 5.2.10 and now all is well. Stupid php.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: SOAP call troubles.

Post by shiznatix »

Sorry for the thread necromancy but same problem. I am now running php version 5.2.6 because of problems with imap_search.

Basically, this problem still exists for me while running 5.2.6. I can't upgrade to version 5.2.10 because of this bug: http://bugs.php.net/bug.php?id=48619 but now I still can't use SOAP.

The only versions of PHP that I can use on the live server are 5.2.6, 5.2.8, 5.2.9, and 5.2.10 but I need both imap_search and SOAP to work on the same version (obviously) but none of these versions do that for me. Does anyone have any ideas? Maybe the SOAP server is out of date or something? Would there be a way to check that?
Post Reply