?
Solved

What is wrong with this http post script

Posted on 2006-04-12
5
Medium Priority
?
272 Views
Last Modified: 2012-06-27
All i get as a response is ?????????????????????????????????? a whole bunch of question marks

according to my pathetic understanding of this, to get the reply from the server i use
ResultBytes = XMLHTTP.responseBody
response.write ResultBytes
but all i get is the question marks from the fedex server.

<%
     
     dim xmlhttp
     set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
     xmlhttp.Open "POST","https://gatewaybeta.fedex.com:443/GatewayDC",false
 
  set xmlDoc = Server.CreateObject("Msxml2.DOMDocument")
xmlDoc.async = false
xmlDoc.load("C:\websites\bjcwye\fedex\fcon.xml")
   

XMLHTTP.setRequestHeader "Referer","ABC LTD."
XMLHTTP.setRequestHeader "Host", "gatewaybeta.fedex.com:443"
XMLHTTP.setRequestHeader "Accept","image/gif, image/jpeg, image/pjpeg,text/plain, text/html, */*"
XMLHTTP.setRequestHeader "Content-Type","image/gif"
XMLHTTP.setRequestHeader "Content-Length", Len(xmldoc.xml)

     
     xmlhttp.send xmldoc.xml
    ResultBytes = XMLHTTP.responseBody
response.write ResultBytes
             Set xmlhttp = nothing
%>
0
Comment
Question by:Ricky11
  • 2
  • 2
5 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 1000 total points
ID: 16434126
Shouldn't
XMLHTTP.setRequestHeader "Content-Type","image/gif"
Be:
xmlhttp.setRequestHeader "Content-Type","text/xml"

-r-
0
 

Author Comment

by:Ricky11
ID: 16434422
same response.....

this to be exact

"
?????????•??????????????????????????????????????????????•???????????????????????????=????????????????????????????????????????????????????????????????????4???????????????????????????????>
"
0
 
LVL 49

Expert Comment

by:Roonaan
ID: 16434441
My ASP isn't that great, but could it be that the respnse is in unicode?

-r-
0
 
LVL 60

Assisted Solution

by:Geert Bormans
Geert Bormans earned 1000 total points
ID: 16434780
Hi Ricky11,
>     ResultBytes = XMLHTTP.responseBody

try ResultBytes = XMLHTTP.responseXML
and threat it as text

my 2cts

Cheers!
0
 

Author Comment

by:Ricky11
ID: 16506019
tried everthing... talking to fedex now... still doesn't work

anyway will close this...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question