Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

302 Redirect when retreiving WSDL

Help
Quentin
2012-02-23
2013-06-06
  • Quentin
    Quentin
    2012-02-23

    Hello,

    When the call to getProxy is executed, I'm getting a redirect error

    $proxy =& $client->getProxy();

    wsdl error: HTTP ERROR: Couldn't open socket connection to server http://<domain removed>/index.php?page=logistics, Error (-2145328860):

    The debug dump from var_dump($client) is (sorry for the long post - I've snipped out the seemingly uninteresting parts.)

    object(nusoap_client)#2 (49) {

      =>
      string(70) "http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl"

      =>
      string(6) "NuSOAP"
      =>
      string(5) "0.7.3"
      =>
      string(18) "$Revision: 1.114 $"
      =>
      string(135) "wsdl error: HTTP ERROR: Couldn't open socket connection to server http://www.<domain removed>/index.php?page=logistics, Error (-2145328860): "
      =>
      string(5522) "2012-02-23 12:56:29.689311 nusoap_client: ctor wsdl=1 timeout=0 response_timeout=30
    endpoint=string(70) "http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl"
    2012-02-23 12:56:29.689544 nusoap_client: will use lazy evaluation of wsdl from http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.689860 nusoap_client: in getProxy endpointType=wsdl
    wsdl=NULL
    2012-02-23 12:56:29.690058 nusoap_client: instantiating wsdl class with doc: http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.690208 wsdl: ctor wsdl= timeout=0 response_timeout=30
    2012-02-23 12:56:29.690323 wsdl: parse and process WSDL path=
    2012-02-23 12:56:29.694452 wsdl: setCredentials username= authtype= certRequest=
    array(0) {
    }
    2012-02-23 12:56:29.694577 wsdl: parse and process WSDL path=http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.694672 wsdl: parse WSDL at path=http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.694776 wsdl: getting WSDL http(s) URL http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.694929 soap_transport_http: ctor url=http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl use_curl= curl_options:
    array(0) {
    }
    2012-02-23 12:56:29.695058 soap_transport_http: parsed URL scheme = http
    2012-02-23 12:56:29.695165 soap_transport_http: parsed URL host = localhost
    2012-02-23 12:56:29.695264 soap_transport_http: parsed URL path = /wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl
    2012-02-23 12:56:29.695367 soap_transport_http: set header Host: localhost
    2012-02-23 12:56:29.695495 soap_transport_http: set header User-Agent: NuSOAP/0.7.3 (1.114)
    2012-02-23 12:56:29.695602 soap_transport_http: entered send() with data of length: 0
    2012-02-23 12:56:29.695707 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host localhost, port 80
    2012-02-23 12:56:29.695812 soap_transport_http: calling fsockopen with host localhost connection_timeout 0
    2012-02-23 12:56:29.692718 soap_transport_http: set response timeout to 30
    2012-02-23 12:56:29.692829 soap_transport_http: socket connected
    2012-02-23 12:56:29.692950 soap_transport_http: set header Content-Length: 0
    2012-02-23 12:56:29.693048 soap_transport_http: HTTP request: GET /wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl HTTP/1.0
    2012-02-23 12:56:29.693145 soap_transport_http: HTTP header: Host: localhost
    2012-02-23 12:56:29.693240 soap_transport_http: HTTP header: User-Agent: NuSOAP/0.7.3 (1.114)
    2012-02-23 12:56:29.693336 soap_transport_http: HTTP header: Content-Length: 0
    2012-02-23 12:56:29.694212 soap_transport_http: wrote data to socket, length = 141
    2012-02-23 12:56:29.694370 soap_transport_http: read line of 20 bytes: HTTP/1.1 302 Found
    2012-02-23 12:56:29.698504 soap_transport_http: read line of 37 bytes: Date: Wed, 22 Feb 2012 23:56:29 GMT
    2012-02-23 12:56:29.698607 soap_transport_http: read line of 35 bytes: Server: Apache/2.2.3 (Linux/SUSE)
    2012-02-23 12:56:29.698720 soap_transport_http: read line of 58 bytes: Location: http://www.<domain removed>/index.php?page=logistics
    2012-02-23 12:56:29.698822 soap_transport_http: read line of 21 bytes: Content-Length: 308
    2012-02-23 12:56:29.698923 soap_transport_http: read line of 19 bytes: Connection: close
    2012-02-23 12:56:29.699023 soap_transport_http: read line of 45 bytes: Content-Type: text/html; charset=iso-8859-1
    2012-02-23 12:56:29.699123 soap_transport_http: read line of 2 bytes:
    2012-02-23 12:56:29.699262 soap_transport_http: found end of headers after length 237
    2012-02-23 12:56:29.699420 soap_transport_http: want to read content of length 308
    2012-02-23 12:56:29.699541 soap_transport_http: read buffer of 308 bytes
    2012-02-23 12:56:29.699644 soap_transport_http: read to EOF
    2012-02-23 12:56:29.699737 soap_transport_http: read body of length 308
    2012-02-23 12:56:29.699829 soap_transport_http: received a total of 545 bytes of data from server
    2012-02-23 12:56:29.700022 soap_transport_http: closed socket
    2012-02-23 12:56:29.696350 soap_transport_http: Got 302 Found with Location: http://www.<domain removed>/index.php?page=logistics
    2012-02-23 12:56:29.696453 soap_transport_http: parsed URL scheme = http
    2012-02-23 12:56:29.696553 soap_transport_http: parsed URL host = www.<domain removed>
    2012-02-23 12:56:29.696663 soap_transport_http: parsed URL path = /index.php
    2012-02-23 12:56:29.696757 soap_transport_http: parsed URL query = page=logistics
    2012-02-23 12:56:29.696857 soap_transport_http: set header Host: www.<domain removed>
    2012-02-23 12:56:29.696962 soap_transport_http: connect connection_timeout 0, response_timeout 30, scheme http, host www.<domain removed>, port 80
    2012-02-23 12:56:29.697064 soap_transport_http: calling fsockopen with host www.<domain removed> connection_timeout 0
    2012-02-23 12:56:29.698348 soap_transport_http: Couldn't open socket connection to server http://www.<domain removed>/index.php?page=logistics, Error (-2145328860):
    2012-02-23 12:56:29.702485 wsdl: HTTP ERROR: Couldn't open socket connection to server http://www.<domain removed>/index.php?page=logistics, Error (-2145328860):
    2012-02-23 12:56:29.702607 nusoap_client: checkWSDL
    2012-02-23 12:56:29.702703 nusoap_client: got wsdl error: HTTP ERROR: Couldn't open socket connection to server http://www.<domain removed>/index.php?page=logistics, Error (-2145328860):
    2012-02-23 12:56:29.702802 nusoap_client: Error from _getProxyClassCode, so return NULL
    "

      =>
      string(70) "http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl"
      =>
      object(wsdl)#3 (48) {
        =>
        string(70) "http://localhost/wsdl/wsdl/FreightTracking_FreightTrackingExport1.wsdl"

        =>
        string(6) "NuSOAP"
        =>
        string(5) "0.7.3"
        =>
        string(18) "$Revision: 1.114 $"
        =>
        string(123) "HTTP ERROR: Couldn't open socket connection to server http://www.<domain removed>/index.php?page=logistics, Error (-2145328860): "
        =>
        string(0) ""

    }

    I'm pretty sure that the location of the wsdl is correct (and have tried other options of relative path, IP address, full domain name), but something (Apache) is forcing a 302 redirect to a location where the wsdl isn't.

    Any clues as to where to look would be appreceiated!

    Thanks in advance.

    Quentin