[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_url_post_xml
Hi Ruben,
What problem am I trying to spot? What is going wrong?
I'm looking at your request, and I'm not familiar with the format of the
trace file that you've sent, but it appears that the HTTPAPI request
looks like this (please forgive any line-wrapping)
POST /onlineserviceocsservice/onlineserviceocsdataservice.asmx
HTTP/1.1\r\n
Host: oos-tst.oce.net\r\n
User-Agent: http-api/1.20\r\n
Content-Type: text/xml\r\n
SOAPAction: http://oosocsservice.oce.com/GetMachineCNTData\r\n
Expect: 100-continue\r\n
Content-Length: 414\r\n
\r\n
And the successful (non-HTTPAPI) session looks like this:
POST /onlineserviceocsservice/onlineserviceocsdataservice.asmx
HTTP/1.1\r\n
Host: oos-tst.oce.net\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 4.0.30319.239)\r\n
Content-Type: text/xml; charset=utf-8\r\n
SOAPAction: http://oosocsservice.oce.com/GetMachineCNTData\r\n
Expect: 100-continue\r\n
Content-Length: 406\r\n
Expext: 100-continue\r\n
Connection: Keep-Alive\r\n
\r\n
To know which difference might be relevant, I need to know what the
problem is. But, the following differences might cause an issue
(depending on the problem)
1) User-Agent. Some sites only allow certain user agents... Are you
getting an error saying "Only Internet Explorer is allowed" or something
like that?
2) The charset on the content-type. You aren't specifying a character
set, but they have specified utf-8. Are you getting an error with
unrecognized character set? OR a problem with characters being
mistranlated?
3) Content-length... they are sending 408 bytes, but you are sending
414. That means the data you're sending is different from theirs. I
don't know that the difference is, or what error you're receiving, so
it's hard to say if the extra 6 bytes you're sending might be causing
the problem?
All of three of these values are controlled by the parameters you pass
to HTTPAPI. User-Agent and Content-Type are parameters to
http_url_post_xml (I'm assuming that's the API you're calling, because
you made it the subject of the e-mail.) Content-length is simply the
length of the postData you've sent.
This sure would be easier if I knew what problem you are experiencing.
On 1/31/2012 12:40 AM, Ruben Dessart wrote:
> Hi, sorry for the late reply. But here I am again ;)
> This is the request that is received which causes the problem according
> to the guys that maintain this webservice:
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------