php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #31695 Cannot redefine endpoint when using WSDL
Submitted: 2005-01-25 23:16 UTC Modified: 2005-03-23 08:14 UTC
From: adam at trachtenberg dot com Assigned: dmitry
Status: Closed Package: Feature/Change Request
PHP Version: 5.0.3 OS: n/a
Private report: No CVE-ID:
 [2005-01-25 23:16 UTC] adam at trachtenberg dot com
Description:
------------
The SOAP extension does not allow you to both use a WSDL file and specify a custom endpoint. Some SOAP servers, including eBay, set a generic endpoint in their WSDL, and require the developer to override it with custom data.

By endpoint, I mean the location field as described here:

http://www.w3.org/TR/wsdl#_soap:address

Reproduce code:
---------------
$client = new SoapClient('some.wsdl', array('location' => 'http://localhost/soap.php'));

It is also necessary to have a setLocation() method, because it's common to need to modify the endpoint/location from request to request. Without this, the developer would need to create a second instance of SoapClient with the same WSDL.

$client->__setLocation('http://localhost/soap2.php');

Expected result:
----------------
The location from the WSDL is set to http://localhost/soap.php instead of what's in the file.

Actual result:
--------------
The location parameter is ignored.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-23 08:14 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_0.

It is possible to redefine endpoint through:

1. "location" option in SoapClient constructor
2. "location" option in SoapClient::__soapCall() method
3. SoapClient::__setLocation() method

 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 12:01:52 2014 UTC