Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The code below is in VB2003 to send a file to a webservice to download to our server.

VB
proxy = Web Service class
proxy.RequestSoapContext.Attachments.Add(attachment)
proxy.UploadFile(FileName

in converting to VB2010 the RequestSoapContext gets an error "RequestSoapContext is not a member of the Web Service class"

The question is: What code takes the place of the proxy.RequestSoapContext in VB2010?
Posted
Updated 28-Dec-10 7:58am
v3
Comments
Dr.Walt Fair, PE 28-Dec-10 13:57pm    
Fixed formatting.

1 solution

Try the following steps:

1. generate the proxy class using wsdl.exe tool
2. edit the resulting vb or cs file and change the line
Inherits System.Web.Services.Protocols.SoapHttpClientProtoc ol

to
Inherits Microsoft.Web.Services2.WebServicesClientProtocol
3. to compile the proxy class

add the reference like

VB
vbc /out:Auction.dll /t:library
/r:System.dll,System.XML.dll,Microsoft.Web.Services 2.dll,System.Web.Services.dll Auction.vb

Copy the file into the clients bin directory and refernce it in the
project.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900