Click here to Skip to main content
16,021,687 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionparameterisedthreadstart Pin
balakpn21-May-07 1:37
balakpn21-May-07 1:37 
AnswerRe: parameterisedthreadstart Pin
Sonia Gupta21-May-07 1:51
Sonia Gupta21-May-07 1:51 
GeneralRe: parameterisedthreadstart Pin
balakpn21-May-07 2:56
balakpn21-May-07 2:56 
Questionpassing Custom Class to Web Service Pin
BobsAfro21-May-07 0:58
BobsAfro21-May-07 0:58 
AnswerRe: passing Custom Class to Web Service Pin
Christian Graus21-May-07 1:36
protectorChristian Graus21-May-07 1:36 
GeneralRe: passing Custom Class to Web Service Pin
BobsAfro21-May-07 3:43
BobsAfro21-May-07 3:43 
GeneralRe: passing Custom Class to Web Service Pin
Dave Kreskowiak21-May-07 4:45
mveDave Kreskowiak21-May-07 4:45 
AnswerRe: passing Custom Class to Web Service [modified] Pin
Dave Herren21-May-07 4:53
Dave Herren21-May-07 4:53 
After a very quick look at your example I believe you need:

Dim Person As New localhost.Simple
Dim Proxy As localhost.Service
Person = Proxy.Returnnames(Person)

instead of

Dim Person As New Eurofins.Simple
Dim Proxy As localhost.Service
Person = Proxy.Returnnames(Person)

My thought on this being that a proxy class of type 'Simple' should have been created when you made a reference to the webservice. These generated proxy classes are marked up with alot of Soap attributes that make everything work. If you are referencing another class with the name of Simple instead of the generated proxy class I can understand why you would get errors because localhost.Service is expecting a class within it's namespace. You can actually navigate to the proxy class code through the object browser if you double click on the web reference.

Also it is possible to do this without a web reference and create your own proxy class (or the gerated one and modify it) if that is what you want or need. Here's a sample from my code using xml serialization, actual classes not included.

private UserInformation GetUserInfoFromWebService(Uri ServiceUri)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(ServiceUri);
request.Method="GET";

request.Credentials = CredentialCache.DefaultCredentials;

request.ContentType="application/x-www-form-urlencoded";

HttpWebResponse response = (HttpWebResponse) request.GetResponse();


XmlSerializer UserInfoSerializer= new XmlSerializer(typeof(UserInformation),"http://localhost/UserServices/");

Stream responseStream = response.GetResponseStream();
StreamReader responseReader = new StreamReader(responseStream);

UserInformation UserInfo = (UserInformation)UserInfoSerializer.Deserialize(responseReader);

responseStream.Close();
response.Close();


return UserInfo;
}





Hope this helps.





-- modified at 11:12 Monday 21st May, 2007


-- modified at 11:14 Monday 21st May, 2007

topcoderjax

QuestionFind and Bind Data From MDB. Pin
NANCO21-May-07 0:56
NANCO21-May-07 0:56 
AnswerRe: Find and Bind Data From MDB. Pin
Sonia Gupta21-May-07 1:08
Sonia Gupta21-May-07 1:08 
GeneralRe: Find and Bind Data From MDB. Pin
NANCO21-May-07 3:18
NANCO21-May-07 3:18 
QuestionHow to insert combobox in datagrid by using VB.Net? Pin
Nagarjuna M20-May-07 23:26
Nagarjuna M20-May-07 23:26 
QuestionRe: How to insert combobox in datagrid by using VB.Net? [modified] Pin
Sonia Gupta20-May-07 23:41
Sonia Gupta20-May-07 23:41 
AnswerRe: How to insert combobox in datagrid by using VB.Net? Pin
Dave Kreskowiak21-May-07 3:28
mveDave Kreskowiak21-May-07 3:28 
QuestionChanges in clipboard Pin
ParagGupta20-May-07 23:03
ParagGupta20-May-07 23:03 
QuestionRe: Changes in clipboard Pin
Sonia Gupta20-May-07 23:08
Sonia Gupta20-May-07 23:08 
AnswerRe: Changes in clipboard Pin
Christian Graus20-May-07 23:22
protectorChristian Graus20-May-07 23:22 
QuestionHow to solve this problem? Pin
braleping20-May-07 22:48
braleping20-May-07 22:48 
AnswerRe: How to solve this problem? Pin
Sonia Gupta20-May-07 22:55
Sonia Gupta20-May-07 22:55 
AnswerRe: How to solve this problem? Pin
Sonia Gupta20-May-07 23:16
Sonia Gupta20-May-07 23:16 
GeneralRe: How to solve this problem? Pin
Guffa21-May-07 0:11
Guffa21-May-07 0:11 
AnswerRe: How to solve this problem? Pin
Dave Kreskowiak21-May-07 3:25
mveDave Kreskowiak21-May-07 3:25 
QuestionUSER PROFILE Pin
Sonia Gupta20-May-07 21:22
Sonia Gupta20-May-07 21:22 
AnswerRe: USER PROFILE Pin
Christian Graus20-May-07 22:20
protectorChristian Graus20-May-07 22:20 
QuestionRe: USER PROFILE Pin
Sonia Gupta20-May-07 22:24
Sonia Gupta20-May-07 22:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.