[vwnc] Trouble with Authenticated Web Services

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Trouble with Authenticated Web Services

Thomas Koschate-2
I'm trying to access some web services published by SQL Server 2005  
using VWNC 7.6.  Initially, I'd be happy just to get the WSDL so I can  
invoke a few stored procedures that take single dates as parameters.

Here's what I've tried in the workspace (along with several variations):

myClient := WsdlClient new.
myClient transportClient
        username: 'mydomain\myid' password: 'mypassword';
        useBasicAuth.
myClient
         loadFrom: 'http://sqlhost/ws/endpoint?wsdl' asURI.

All I ever get is a Net.HttpUnauthorizedError 401.  I can open the URL  
in any browser, enter the same username and password in the  
authentication dialog, and get the WSDL.  What obvious step am I  
missing?
--
============================================================
Thomas Koschate
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Trouble with Authenticated Web Services

Kogan, Tamara
> I'm trying to access some web services published by SQL Server 2005
> using VWNC 7.6.  Initially, I'd be happy just to get the WSDL so I can
> invoke a few stored procedures that take single dates as parameters.
>
> Here's what I've tried in the workspace (along with several
variations):

>
> myClient := WsdlClient new.
> myClient transportClient
> username: 'mydomain\myid' password: 'mypassword';
> useBasicAuth.
> myClient
> loadFrom: 'http://sqlhost/ws/endpoint?wsdl' asURI.
>
> All I ever get is a Net.HttpUnauthorizedError 401.  I can open the URL
> in any browser, enter the same username and password in the
> authentication dialog, and get the WSDL.  What obvious step am I
> missing?

The transport client you set will be used to make a web service request.
You are getting the Net.HttpUnauthorizedError while loading the WSDL
schema.
You can try to set the http user in Net.Settings.

Net.Settings class>>httpUser: aNetUser

The user will be used in HttpURL>>resource to read the schema.

HTH,
Tamara

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Trouble with Authenticated Web Services

Thomas Koschate-2

On 2008-06-09, at 22:19, Kogan, Tamara wrote:

> The transport client you set will be used to make a web service  
> request.
> You are getting the Net.HttpUnauthorizedError while loading the WSDL
> schema.
> You can try to set the http user in Net.Settings.
>
> Net.Settings class>>httpUser: aNetUser

I'm afraid I'm not getting any further with this.  Here's what I've  
tried:

Net.HttpClient httpUsername: 'mydomain\myid' password: 'mypassword'.
Net.Settings defaultIdentity:  Net.Settings httpUser.

(client := WsdlClient new)
        username: 'mydomain\myid' password: 'mypassword';
        loadFrom: 'http://sqlhost/ws/endpoint?wsdl' asURI.

As before, I get the 401 exception in Net.HttpURL>>resource.  If I  
examine the HttpProtocolInterpreter, its authPolicy has a user with  
the appropriate credentials.  I'm not sure where else to look.
--
============================================================
Thomas Koschate
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Trouble with Authenticated Web Services

Kogan, Tamara
You can open LoggingTool to see the Http client and server messages.
LoggingTool package
LoggingTool open.
Turn on trace and Http client/server messages.

It can help to see if the authentication info was used in the Http
messages.

Tamara Kogan
Smalltalk development,
Cincom Systems

> -----Original Message-----
> From: Thomas Koschate [mailto:[hidden email]]
> Sent: Tuesday, June 10, 2008 12:57 PM
> To: Kogan, Tamara
> Cc: vwnc
> Subject: Re: [vwnc] Trouble with Authenticated Web Services
>
>
> On 2008-06-09, at 22:19, Kogan, Tamara wrote:
>
> > The transport client you set will be used to make a web service
> > request.
> > You are getting the Net.HttpUnauthorizedError while loading the WSDL
> > schema.
> > You can try to set the http user in Net.Settings.
> >
> > Net.Settings class>>httpUser: aNetUser
>
> I'm afraid I'm not getting any further with this.  Here's what I've
> tried:
>
> Net.HttpClient httpUsername: 'mydomain\myid' password: 'mypassword'.
> Net.Settings defaultIdentity:  Net.Settings httpUser.
>
> (client := WsdlClient new)
> username: 'mydomain\myid' password: 'mypassword';
> loadFrom: 'http://sqlhost/ws/endpoint?wsdl' asURI.
>
> As before, I get the 401 exception in Net.HttpURL>>resource.  If I
> examine the HttpProtocolInterpreter, its authPolicy has a user with
> the appropriate credentials.  I'm not sure where else to look.
> --
> ============================================================
> Thomas Koschate
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc