I get the file in the webservice like this.
bImage = New Bitmap("C:\Inetpub\wwwroot\images\GR4001.PNG")
'Save as PNG file
bImage.Save(bFile,
System.Drawing.Imaging.ImageFormat.Png)
'Return Binary file in a byte array
Return bFile.GetBuffer()
Now I call the webservice like this.
Response.ContentType = "image/png"
Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
' Point to an image file with adequate access permissions granted
objHTTP.open "GET",
"http://localhost/wsImage/wsImage.asmx/GetSpecimenImage", false
objHTTP.send
Response.BinaryWrite objHTTP.ResponseBody
Set objHTTP = Nothing
Nothing appears in the browser window but I get the binary back. Please
Help
Keenan Newton - 12 Jul 2005 22:02 GMT
I am willing to bet you are sending some HTML before the binary image.
Try this.
*******************
Response.Buffer = true
Response.Clear()
'Do the rest of your code here.
*******************
You could also look at using HttpResponse.Outputstream to stream out
the binary image.
Just some ideas.
klj_mcsd@hotmail.com - 13 Jul 2005 02:37 GMT
Did that and it still does not work. Any more suggestions will be
greatly appreciated