Solved

c# web service returns xml on most calls, but one returns binary

Posted on 2013-05-18
1
540 Views
Last Modified: 2013-05-18
Hi,
I am not sure how to handle this.  I have a web service that returns xml and everything was working well.  I was making requests and getting the response.  Apparently one function call streams binary data.  I am not sure how to deal with this.

Here is my code:
                XMLHTTP xmlHttp = new XMLHTTP();
                xmlHttp.open("POST", queryString, false, _userId, _password);
                xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                xmlHttp.setRequestHeader("Accept",
                                         "Accept      image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*");
                xmlHttp.send(postData);
                apiResponse.XmlHeaders = xmlHttp.getAllResponseHeaders();
                apiResponse.XmlResponse = xmlHttp.responseText;
0
Comment
Question by:jackjohnson44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
HugoHiasl earned 500 total points
ID: 39177864
You set an "Accept" header that allows also binary responses like images...
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

627 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