Hi,
I have a webservice with a method that returns an instance of
System.IO.MemoryStream.
For example:
[WebMethod]
public MemoryStream myMeth()
{
return new MemoryStream();
}
When I call that method from the client,
MemoryStream ms = myWS.myMeth();
I receive a type cast error ("Cannot implicitly convert type
'myWS.localhost.MemoryStream' to 'System.IO.MemoryStream"). I've tried
explicitly casting it to System.IO.MemoryStream, but to no avail.
Btw. I'm trying to stream data from WS to client. Not sure if
MemoryStream is the best way of doing it
Any help or guidance would be appreciated greatly.
Thanks,
Andre 7 3093
I am not sure if you ahve posted this before on another newsgroup, but
I would convert the MemoryStream to a byte array and pss the byte array
to the client from there you can convert the byte array back into a
MemoryStream
Hello redraven,
These [0] are the supported data types. Anything else that you send accross
the wire must be 'XmlSerializable'
[0] http://support.microsoft.com/default...b;en-us;326791
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com Hi,
I have a webservice with a method that returns an instance of System.IO.MemoryStream.
For example: [WebMethod] public MemoryStream myMeth() { return new MemoryStream(); } When I call that method from the client,
MemoryStream ms = myWS.myMeth();
I receive a type cast error ("Cannot implicitly convert type 'myWS.localhost.MemoryStream' to 'System.IO.MemoryStream"). I've tried explicitly casting it to System.IO.MemoryStream, but to no avail.
Btw. I'm trying to stream data from WS to client. Not sure if MemoryStream is the best way of doing it
Any help or guidance would be appreciated greatly.
Thanks, Andre
What if the byte arry is gigantic?
Is there a way to actaully stream the array? Or will HTTP/SOAP take
care of the streaming?
"Keenan Newton" <ka*********@yahoo.com> wrote in message news:<11**********************@c13g2000cwb.googleg roups.com>... I am not sure if you ahve posted this before on another newsgroup, but I would convert the MemoryStream to a byte array and pss the byte array to the client from there you can convert the byte array back into a MemoryStream
What if the byte arry is gigantic?
Is there a way to actaully stream the array? Or will HTTP/SOAP take
care of the streaming?
"Keenan Newton" <ka*********@yahoo.com> wrote in message news:<11**********************@c13g2000cwb.googleg roups.com>... I am not sure if you ahve posted this before on another newsgroup, but I would convert the MemoryStream to a byte array and pss the byte array to the client from there you can convert the byte array back into a MemoryStream
Thanks for your reply.
What is the best way then to stream loads of data with a WS?
Dilip Krishnan <dk*******@NOSPAM.geniant.com> wrote in message news:<32**********************@msnews.microsoft.co m>... Hello redraven, These [0] are the supported data types. Anything else that you send accross the wire must be 'XmlSerializable'
[0] http://support.microsoft.com/default...b;en-us;326791
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com
Hi,
I have a webservice with a method that returns an instance of System.IO.MemoryStream.
For example: [WebMethod] public MemoryStream myMeth() { return new MemoryStream(); } When I call that method from the client,
MemoryStream ms = myWS.myMeth();
I receive a type cast error ("Cannot implicitly convert type 'myWS.localhost.MemoryStream' to 'System.IO.MemoryStream"). I've tried explicitly casting it to System.IO.MemoryStream, but to no avail.
Btw. I'm trying to stream data from WS to client. Not sure if MemoryStream is the best way of doing it
Any help or guidance would be appreciated greatly.
Thanks, Andre
Hello redraven,
You cannot stream data. if you have large files then you would need to
use DIME [0] attachments or just send data as base64 encoded bytes
[0] - http://msdn.microsoft.com/msdnmag/is...s/default.aspx
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com http://www.geniant.com Thanks for your reply.
What is the best way then to stream loads of data with a WS?
Dilip Krishnan <dk*******@NOSPAM.geniant.com> wrote in message news:<32**********************@msnews.microsoft.co m>...
Hello redraven, These [0] are the supported data types. Anything else that you send accross the wire must be 'XmlSerializable' [0] http://support.microsoft.com/default...b;en-us;326791
HTH Regards, Dilip Krishnan MCAD, MCSD.net dkrishnan at geniant dot com http://www.geniant.com Hi,
I have a webservice with a method that returns an instance of System.IO.MemoryStream.
For example: [WebMethod] public MemoryStream myMeth() { return new MemoryStream(); } When I call that method from the client, MemoryStream ms = myWS.myMeth();
I receive a type cast error ("Cannot implicitly convert type 'myWS.localhost.MemoryStream' to 'System.IO.MemoryStream"). I've tried explicitly casting it to System.IO.MemoryStream, but to no avail.
Btw. I'm trying to stream data from WS to client. Not sure if MemoryStream is the best way of doing it
Any help or guidance would be appreciated greatly.
Thanks, Andre
It won't matter if it is "gigantic", however your other options are to
convert it base64, which i think would have a bigger foot print then a
byte array or use WS-Attachments with WSE 2.0. Again I think the
easiest way in your case is the byte array. Why don't you create a
simple web service and try out the differences. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Toma Marinov |
last post by:
Hello !
I have a WebService.
When I execute WS in browser on local machine - its OK!
When I execute WS in browser on the server machine /with remote desktop/ -
its OK!
When I execute WebService...
|
by: David |
last post by:
When I call a webservice with an ASP.NET application, I get the following
error:
"The underlying connection was closed: Unable to connect to the remote
server. "
With my brower, I can get the...
|
by: woodpecker woodpecker |
last post by:
I have a webservice in my computer,it runs with no problem in my
application,and can be called in other computers or server in the same
intranet.If I don't let the server become a domain...
|
by: Fahad |
last post by:
Hi,
I am trying to update a list on sharepoint server via calling its standard
built in web service. When ever i call the UpdateListitems() method, I get
the following exception:
at...
|
by: perschrotti |
last post by:
I have simple .NET webservice coded in C# running on IIS 5 windows 2000
sp4 with .NET framework 1.1. I have a client coded in java with a
webservice client stub generated by wsdl2java (axis).
...
|
by: Sukh |
last post by:
Hello anyone,
I am printing a pre-printed continue paper on dot-matrix printer using
vb.net winform.
For printing I am creating custom size paper and selecting the same for
printing. Everything...
|
by: jack |
last post by:
Hi all, good morning
(im using vs2005)
I want to commulicate with a web service in c# i did followed all the
instructions in the book.
i have tried it and worked perfectly in my local machine...
|
by: Mahesh Devjibhai Dhola |
last post by:
Hi,
Scenario:
The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and...
|
by: Rado |
last post by:
I have one problem.
I have one webservice which is written in java.The webservice has method
public long
Test(long lastId, String login, String password)
When I'm calling this method from...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |