Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2005

Tip: Looking for answers? Try searching our database.

Please Help with webservice.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klj_mcsd@hotmail.com - 12 Jul 2005 20:18 GMT
I get the file in the webservice like this.

bImage = New Bitmap("C:\Inetpub\wwwroot\ima­ges\GR4001.PNG")
                   'Save as PNG file
                   bImage.Save(bFile,
System.Drawing.Imaging.ImageFo­rmat.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.Se­rverXMLHTTP")
' 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
Martin Kulov - 18 Jul 2005 22:46 GMT
> Nothing appears in the browser window but I get the binary back.

Hi,

you can use aspx page to return image data to the client. IMHO web service
call won't work since the web service returns soap body in the HTTP stream
and the img tag expects binary data instead.
Look here for an example [1].

[1] http://www.csharp-station.com/Articles/Thumbnails.aspx

HTH,

Signature

Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD

Saverio Tedeschi - 19 Jul 2005 21:26 GMT
Hi,
maybe you could use DIME to transfer binary content thru web service. HTH
>> Nothing appears in the browser window but I get the binary back.
>
[quoted text clipped - 8 lines]
>
> HTH,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.