Overriding URI/namespace from WSDL
[email protected] (Magnus Olsson) Sun, 2 Sep 2012 02:04:49 +0200
| Newsgroups | php.soap |
|---|---|
| Message-ID | <CAHUeKyNhYLhY=u_KWtykqRu__nKYKE8fiti+MvxtkRaZywL16w@mail.gmail.com> |
--bcaec54ee49813adf704c8acc67b
Content-Type: text/plain; charset=UTF-8
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
[email protected]
--bcaec54ee49813adf704c8acc67b--