-
Passing a stream to a Web Service
I'd like to set up a VB client app which will allow users to scan
documents into .tif (image) files. I would like to send these
files to Web Service running on a server where they can be stored,
catalogued and referenced.
When I use -
m_WebService1.BeginWrite_Image(ImgStream, strContext,
New AsyncCallback(AddressOf Me.SendImgParmsCallBack), Nothing)
I get the error
Value of type 'System.IO.Stream' cannot be converted to
WindowsApplication.WebReference1.Stream
Any suggestions?
Bob Anderson
-
Re: Passing a stream to a Web Service
"Bob Anderson" <parksys741@hotmail.com> wrote:
>
>I'd like to set up a VB client app which will allow users to scan
>documents into .tif (image) files. I would like to send these
>files to Web Service running on a server where they can be stored,
>catalogued and referenced.
>
>When I use -
>
>m_WebService1.BeginWrite_Image(ImgStream, strContext,
> New AsyncCallback(AddressOf Me.SendImgParmsCallBack), Nothing)
>
> I get the error
>
>Value of type 'System.IO.Stream' cannot be converted to
>WindowsApplication.WebReference1.Stream
>
>Any suggestions?
>
>
>
>Bob Anderson
Bob,
I have experienced the same problem. Somehow it seems logical to me that
the webservice creates a new (proxy) object that is exposed to the 'public'
so that the 'public' using the webservice knows how the object looks like
if the webservice returns one.
I want to do the same with a custom made object (e.g. a Person object) and
when retrieving this object via a webservice with the function GetPerson()
as Person it returns me a Person object created by the webservice but not
my original one. Marking this Person object as serializable or even implementing
custom serialization doesn't really change a thing. However when retrieving
a dataset via a webservice, there seems to be no problem at all. So there's
probably a way...
Anyone a solution?
Chris
-
Re: Passing a stream to a Web Service
Got the answer in another discussion group. Instead of a stream I used
a byte array and it worked fine.
"Chris Deceuninck" <deceuninck@yahoo.com> wrote:
>
>"Bob Anderson" <parksys741@hotmail.com> wrote:
>>
>>I'd like to set up a VB client app which will allow users to scan
>>documents into .tif (image) files. I would like to send these
>>files to Web Service running on a server where they can be stored,
>>catalogued and referenced.
>>
>>When I use -
>>
>>m_WebService1.BeginWrite_Image(ImgStream, strContext,
>> New AsyncCallback(AddressOf Me.SendImgParmsCallBack), Nothing)
>>
>> I get the error
>>
>>Value of type 'System.IO.Stream' cannot be converted to
>>WindowsApplication.WebReference1.Stream
>>
>>Any suggestions?
>>
>>
>>
>>Bob Anderson
>
>Bob,
>
>I have experienced the same problem. Somehow it seems logical to me that
>the webservice creates a new (proxy) object that is exposed to the 'public'
>so that the 'public' using the webservice knows how the object looks like
>if the webservice returns one.
>
>I want to do the same with a custom made object (e.g. a Person object) and
>when retrieving this object via a webservice with the function GetPerson()
>as Person it returns me a Person object created by the webservice but not
>my original one. Marking this Person object as serializable or even implementing
>custom serialization doesn't really change a thing. However when retrieving
>a dataset via a webservice, there seems to be no problem at all. So there's
>probably a way...
>
>Anyone a solution?
>
>Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks