R
Ralf Jonas
Hi,
I now did some more experiments accessing the eBay XML API using Ruby.
At home everything works fine, when I use the following statement to get a
HTTPS session handle:
handle = Net::HTTP.new('api.sandbox.ebay.com', 443, PROXY_HOST, PROXY_PORT)
where PROXY_HOST = PROXY_PORT = nil. I supply my authentication parameters
via the headers of the post-request and can execute all commands via XML.
eBay reacts very normal.
But in the office I'm sitting behind a firewall / proxy and so I defined
PROXYHOST and PROXYPORT correctly there. But I doesn't work. This is the
response from eBay:
Response: #<Net::HTTPForbidden 403 readbody=true>
Data: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<HTML><HEAD>\n<TITLE>403
Forbidden</TITLE>\n</HEAD><BODY>\n<H1>Forbidden</H1>\nYou don't have
permission to access https://api.sandbox.ebay.com:443/ws/api.dll\non this
server.<P>\n<HR>\n<ADDRESS>Apache/1.3.27 Server at newsweek.sjc.ebay.com
Port 8080</ADDRESS>\n</BODY></HTML>\n"
First you can see, eBay is contacted, so PROXYHOST and PROXYPORT are set
correctly. Furthermore you can see that port 443 (HTTPS) is called, and
that's correct too because the eBay API works with https only.
To authenticate I have to specify a lot of tokens via the header parameter
of the post-request. It seems, they're not transmitted correctly. I can't
imagine of any errors in our company's firewall/proxy configuration, so I
think the error is either in the proxy code of HTTPS or I'm doing
something really wrong. But strange enough, it works at home w/o proxies.
Cheers
Ralf
I now did some more experiments accessing the eBay XML API using Ruby.
At home everything works fine, when I use the following statement to get a
HTTPS session handle:
handle = Net::HTTP.new('api.sandbox.ebay.com', 443, PROXY_HOST, PROXY_PORT)
where PROXY_HOST = PROXY_PORT = nil. I supply my authentication parameters
via the headers of the post-request and can execute all commands via XML.
eBay reacts very normal.
But in the office I'm sitting behind a firewall / proxy and so I defined
PROXYHOST and PROXYPORT correctly there. But I doesn't work. This is the
response from eBay:
Response: #<Net::HTTPForbidden 403 readbody=true>
Data: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<HTML><HEAD>\n<TITLE>403
Forbidden</TITLE>\n</HEAD><BODY>\n<H1>Forbidden</H1>\nYou don't have
permission to access https://api.sandbox.ebay.com:443/ws/api.dll\non this
server.<P>\n<HR>\n<ADDRESS>Apache/1.3.27 Server at newsweek.sjc.ebay.com
Port 8080</ADDRESS>\n</BODY></HTML>\n"
First you can see, eBay is contacted, so PROXYHOST and PROXYPORT are set
correctly. Furthermore you can see that port 443 (HTTPS) is called, and
that's correct too because the eBay API works with https only.
To authenticate I have to specify a lot of tokens via the header parameter
of the post-request. It seems, they're not transmitted correctly. I can't
imagine of any errors in our company's firewall/proxy configuration, so I
think the error is either in the proxy code of HTTPS or I'm doing
something really wrong. But strange enough, it works at home w/o proxies.
Cheers
Ralf