 |
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

December 12th, 2005, 01:56 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
Image as web service parameter
Hi all,
When I add an image as the parameter to a web service I get the following error.
System.Drawing.Imaging.ImageFormat cannot be serialized because it does not have a parametless constructor.
How can I send an Image to the server as a web service parameter?
Any assistance would be greatly appreciated.
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
|

December 12th, 2005, 11:50 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
1) The class indeed doenst have a paramterless constructor- a default contructor.
2) The class is sealed i.e. not inheritable, which blocks a few possiblities that could be explored.
3) The class is not serializable, so I'm not sure if you can use it as a parameter in a webmethod, at all, i.e.
IF you are using it in a webmethod.
Regards
Ankur Verma
|

December 12th, 2005, 12:06 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
|
|
If you are doing a usual image file transfer, then it shouldnt be an issue.
Check This link
http://msdn.microsoft.com/library/de...ml/wsedime.asp
Regards
Ankur Verma
|

December 12th, 2005, 10:17 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
Thanks Ankur,
I will look into that.
I guess it is just an image file transfer, I am sending a signature panel image from a pocket pc to the server.
Many Thanks,
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
|

December 13th, 2005, 02:04 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
Hi again Ankur,
I have been looking into various area to get the job done without too much success.
Is it possible to programmatically send an MMS from Pocket PC Phone edition using C#?
I am still looking into the dime solution but I am finding it hard to transfer the information I find to the device environment at the moment, due to my lack of experience in this area.
Many thanks,
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
|

December 13th, 2005, 06:11 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
|
|
I think I have solved my problem.
I have converted the image into a byte array and used that as the parameter for hte web service.
I haven't completed the web service component to test, but its looking better.
Thanks for your assistance.
Rod
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
|
|
 |