Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

PHP - Initiate SoapClient inside a SoapServer class function?

  • 17-02-2010 06:03PM
    #1
    Closed Accounts Posts: 8,478 ✭✭✭


    So I have a SoapServer class that handles whatever functions is requested of it from the client. Within one of those functions I need to call a 3rd party soap service, so I set about getting what I need as a SoapClient and returning the result back to my SoapServer. Here's a copy of the stack trace:
    **** About to call ReadCategories (My SoapClient call, sitting inside my SoapServer function
    )
    **** ReadCategories Respsonse:SoapFault exception: [HTTP] Error Fetching http headers in class_Client.php:47
    
    Stack trace:
    
    #0 class_Client.php(47): SoapClient->__doRequest('<?xml version="...', 'https://<url>...', 'http://schemas....', 1)
    #1 [internal function]: ExtendedClient->__doRequest('<?xml version="...', 'https://<url>...', 'http://schemas....', 1, 0)
    #2 [internal function]: SoapClient->__call('ReadCategories', Array)
    #3 class_Server.php(77): ExtendedClient->ReadCategories(Object(stdClass))
    #4 class_Server.php(123): SoapServer->GetCategories('301e7b3f-db6c-4...')
    #5 class_Server.php(293): SoapServer->ManageProducts(Object(stdClass), 'CreateProducts')
    #6 [internal function]: SoapServer->CreateProducts(Object(stdClass))
    #7 index.php(35): SoapServer->handle()
    #8 {main}
    

    Note the Error Fetching http headers in class_Client.php error. Strangely, when I trace my httpd request log, I see (after a considerable timeout time) that it makes 3 requests within milliseconds of eachother - where it should only make one.

    Help?!


Advertisement