Donald
2008-10-12 02:56:00 UTC
Hi all,
This might seem like a newbie question, but I am stuck with Web Services in
VS 2008. I have 2 problems:
1) I am not able to provide my UID/password credentials when I call the
remote web service
2) I can’t get my Web Services Client code to look like the
documentation’s example code
Here is the background:
I am trying to call the services at
http://staging.mappoint.net/standard-30/mappoint.wsdl
In VS 2008, I add a Services Reference into my VB project and I am able to
reference it in call it.
I have Problem #1 because when I call the web service I get the following
error message:
The HTTP request is unauthorized with client authentication scheme
'Anonymous'. The authentication header received from the server was 'Digest
qop="auth", realm="MapPoint",
nonce="a17e71846cb67ac73650773221001af264661b46f929b4eca744e3adcd37"'.
This MSDN page http://msdn.microsoft.com/en-us/library/cc514450.aspx says I
should write this code
' Initialize the credentials of the find service
' Use your customer ID and password for the UserID and Password parameters
Dim findService As New FindServiceSoap()
findService.Credentials = New System.Net.NetworkCredential("UserID",
"Password")
findService.PreAuthenticate = True
I’ve tried that code, but I get a compile error. This brings me to Problem
#2.
In VS 2008 the generated Web Service client code does not look like this.
My generated code has FindServiceSoap being an interface (and you can’t
instantiate an interface). In VS 2008, my project has a
FindServiceSoapClient class which implements the FindServiceSoap interface,
however, the client class does not have a credentials property.
Can someone help me solve Problems #1 & #2?
Thanks in advance,
Donald
This might seem like a newbie question, but I am stuck with Web Services in
VS 2008. I have 2 problems:
1) I am not able to provide my UID/password credentials when I call the
remote web service
2) I can’t get my Web Services Client code to look like the
documentation’s example code
Here is the background:
I am trying to call the services at
http://staging.mappoint.net/standard-30/mappoint.wsdl
In VS 2008, I add a Services Reference into my VB project and I am able to
reference it in call it.
I have Problem #1 because when I call the web service I get the following
error message:
The HTTP request is unauthorized with client authentication scheme
'Anonymous'. The authentication header received from the server was 'Digest
qop="auth", realm="MapPoint",
nonce="a17e71846cb67ac73650773221001af264661b46f929b4eca744e3adcd37"'.
This MSDN page http://msdn.microsoft.com/en-us/library/cc514450.aspx says I
should write this code
' Initialize the credentials of the find service
' Use your customer ID and password for the UserID and Password parameters
Dim findService As New FindServiceSoap()
findService.Credentials = New System.Net.NetworkCredential("UserID",
"Password")
findService.PreAuthenticate = True
I’ve tried that code, but I get a compile error. This brings me to Problem
#2.
In VS 2008 the generated Web Service client code does not look like this.
My generated code has FindServiceSoap being an interface (and you can’t
instantiate an interface). In VS 2008, my project has a
FindServiceSoapClient class which implements the FindServiceSoap interface,
however, the client class does not have a credentials property.
Can someone help me solve Problems #1 & #2?
Thanks in advance,
Donald