Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services 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
 
Old January 12th, 2004, 10:53 AM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Upload a file with a webservice method.

I am looking to be able to upload a file using a webservice.

My problem is as follows:

a) The webservice method must be accessible from a standard, static HTML page (not served by the .NET web server)

b) The HTML form needs to use the enctype="multipart/form-data" attribute on the FORM tag in order to send the file to the webservice.

c) The webservice method fails because of the enctype attribute.

Can anyone help? (I've seen examples of processing the file using an ASPX page and then calling the webservice from there, but this is not the solution I want - I need the webservice to be called directly).


Regards,

Chris
 
Old January 12th, 2004, 10:58 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you want to be able to call a web service from a plain HTML page, this sounds like more of a very complex JavaScript operation than a web service one. You'll have to write javascript that will read the file locally and then somehow formulate a call to the web service. I don't think this will be very easy. Why the requirement of a static HTML page?

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old March 14th, 2005, 10:42 AM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try the following link:

http://www.dotnetmonster.com/Uwe/For...to-web-service






Similar Threads
Thread Thread Starter Forum Replies Last Post
WebService(Method Cal) RAGHAVENDRAN .NET Web Services 1 January 2nd, 2008 10:17 AM
Upload file method kingvn2005 ASP.NET 2.0 Professional 1 August 21st, 2007 05:06 AM
Error calling a method in the webservice madhusrp .NET Web Services 1 April 12th, 2007 08:54 AM
can the webservice return a file? albusr .NET Web Services 1 December 19th, 2005 11:59 AM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.