Overriding URI/namespace from WSDL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux