PHP + SOAP. Could not connect to host
Results 1 to 8 of 8

Thread: PHP + SOAP. Could not connect to host

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Posts
    5

    PHP + SOAP. Could not connect to host

    Yes, I know that the issue has already been discussed on the forum, but it remains unsolved

    On my localhost with:

    Ubuntu 8.10, Apache 2.2.9, PHP 5.2.6

    i create soap object using wsdl file stored localy and send request to _https://gatewaybeta.fedex.com:443/web-services and got successfull response.

    On production server with:

    CentOS, WHM, Apache 2.2.11, PHP 5.2.9

    i create soap object using wsdl file stored localy and trying to send request to _https://gatewaybeta.fedex.com:443/web-services but got error:

    Code:
    [ERROR_SOAP] => string(44)  Code: HTTP; Descr: Could not connect to host

    Telnet from production server to _https://gatewaybeta.fedex.com:443/web-services on port 443 is success.

    SOAP requests from production server to mobilestorm are success.

    Also, tcpdump -vvv didn't catch any outgoing requests from production server to fedex server while sending soap requests.

    What may cause such problem ?
    Thnx in adv.

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,429
    Could you show us the code you used?

  3. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Mmmm. There is a lot of code. Do you need the portion of code where i create soap object ?

  4. #4
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,429
    Quote Originally Posted by ladjack
    Do you need the portion of code where i create soap object ?
    Well yes, since that seems to be the portion of your code that is having problems. When I said "the code," I really meant "the (relative) code."

  5. #5
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    =)) Kinda misunderstanding...

    Code:
         ini_set("soap.wsdl_cache_enabled", "1");
                    $params = array('trace'=>1, 'exceptions'=>1, 'location'=>'https://gatewaybeta.fedex.com:443/web-services');
                    $this->_client = new SoapClient($this->_wsdlUrl, $params);//'typemap'=>'from_xml',
                    try
                    {
                        $response = $this->_client->getRates($request);
                        
                        if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR')
                        {
                            return $response;
                        }
                        else
                        {
                            return $response;
                        }
    
                    }
                    catch (SoapFault $exception)
                    {
                           $this->_setError(FedEx_Rate::ERROR_SOAP, 'Code: '.$exception->faultcode.'; Descr: '.$exception->faultstring );
                           return false;
                    }
    $this->_wsdlUrl - points to localy stored wsdl file.

    $request - data array to fill in soap wsdl-based request.

    btw, soap.wsdl_cache_enabled can be truned off. no matter.

  6. #6
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,429
    Not really sure what the problem is either; is display_errors set to On and error_reporting set to E_ALL ?

  7. #7
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Quote Originally Posted by bradgrafelman View Post
    is display_errors set to On and error_reporting set to E_ALL ?
    definitly ))

  8. #8
    Junior Member
    Join Date
    Apr 2009
    Posts
    5
    Solved.

    Changing

    'location' => 'https://gatewaybeta.fedex.com:443/web-services'

    to

    'location'=>'https://199.81.198.77:443/web-services'

    helps ))

    Seems, kinda soap name resoution problem.....:sick:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •