Overriding URI/namespace from WSDL

From: Date: Sun, 02 Sep 2012 00:04:49 +0000
Subject: Overriding URI/namespace from WSDL
Groups: php.soap 
Request: Send a blank email to php-soap+get-3369@lists.php.net to get a copy of this message
Hi! I am developing a connection from my ecommerce platform to an eBay-like service. This service has a Web Service API so one can add auctions and such. The main API specification is located at: http://api.exampleservice.com/v4/Restricted.asmx?WSDL While the test API specification is located at: http://api-test.exampleservice.com/v4/Restricted.asmx?WSDL The problem is that the specification for the test API still returns URL/namespace in the format: http://api.exampleservice.com/AddItem So I don't get the test API paths. Right now I do it like this (specification from their documentation): <?php $client = new SoapClient( 'http://api-test.exampleservice.com/v4/Restricted.asmx?WSDL', array('location' => ' http://api-test.exampleservice.com/v4/Restricted.asmx?appId=xxx&appKey=xxx') ); $addItem = new stdClass(); $addItem->name = 'New Auction'; $client->AddItem($addItem); ?> I then get an error saying my app id and app key is rejected by http://api.exampleservice.com/, no -test. I have run into this problem with an invoice payment API before and never looked into it. Is there a way to bypass the URI/namespace from the WSDL so that I can run some tests before I go on to the live API? -- Best regards, Magnus Olsson datamange@gmail.com

« previous php.soap (#3369) next »