Testing Web Service Error 401

168 views
Skip to first unread message

mike duncan

unread,
Apr 27, 2012, 11:14:41 AM4/27/12
to InterSystems: Ensemble in Healthcare
I have used the web service client wizard to setup an
EnsLib.SOAP.OutboundAdapter.

I have a web service URL https://xxx.com/ws_DEV/webService.asmx?WSDL.
If i put in theURL in IE, I get a windows logon asking for user name
and password. When i put that in, i get access to the web service
page.

The username is in format xxxx\yyyyy

I have also defined a SSL/TL configuration and put that in SSL Config

If I set up a Credential for username and password and use that for
the Credential in my adapter and use the URL in the adapter "Web
Service URL", then run "test" I get the an error 401 in the event log
of Ensemble.
HTTP request to SOAP WebService returned unexpected status: 401.
Any Suggestions?

Thanks

Mike

Ted Peck

unread,
Apr 27, 2012, 11:38:54 AM4/27/12
to ensemble-in...@googlegroups.com, mike duncan
The WSDL page is not the Service. You should use the URL of the actual
service (probably the same URL without ?WSDL on the end.)

mike duncan

unread,
Apr 30, 2012, 6:54:19 AM4/30/12
to InterSystems: Ensemble in Healthcare
I've tried using https://xxx.com/ws_DEV/webService.asmx and still get
the 401 error. If i put the url in Internet Explorer I get a window
"Connecting to xxxx.Com" popping up and asks for a username and
password. As i said using my xxx\yyy username and the password i get
access but through ensemble i seem to get this 401 message. How does
ensemble know about authentication. The web address is an "Https"

Thanks

Mike


On Apr 27, 4:38 pm, Ted Peck <tedp...@intersystems.com> wrote:
> The WSDL page is not the Service. You should use the URL of the actual
> service (probably the same URL without ?WSDL on the end.)
>
> On 4/27/2012 11:14 AM, mike duncan wrote:
>
>
>
> > I have used the web service client wizard to setup an
> > EnsLib.SOAP.OutboundAdapter.
>
> > I have a web service URLhttps://xxx.com/ws_DEV/webService.asmx?WSDL.
> > If i put in theURL in IE, I get a windows logon asking for user name
> > and password.  When i put that in, i get access to the web service
> > page.
>
> > The username is in format xxxx\yyyyy
>
> > I have also defined a SSL/TL configuration and put that in SSL Config
>
> > If I set up a Credential for username and password and use that for
> > the Credential in my adapter and use the URL in the adapter "Web
> > Service URL", then run "test" I get the an error401in the event log
> > of Ensemble.
> > HTTP request to SOAP WebService returned unexpected status:401.
> > Any Suggestions?
>
> > Thanks
>
> > Mike- Hide quoted text -
>
> - Show quoted text -

Ted Peck

unread,
Apr 30, 2012, 10:29:10 AM4/30/12
to ensemble-in...@googlegroups.com, mike duncan
Hi Mike,

Here's another thing to look into. The SOAP Adapter has 2 different kinds of configurable Credentials it can employ:

SOAPCredentials - " The name of the Username and Password used for WSSecurityLogin basic SOAP authentication Names the credentials entry containing the WSSecurityLogin Username and Password values to be used if needed to access the SOAP service"

Credentials - " The name of the Username and Password credentials values used to make the HTTP connection to the SOAP server"

I believe that properly configuring one of these ought to enable the Business Operation and Adapter to invoke the Web Service as an authenticated user.  The Adapter does not have a way of popping up a login page at runtime (nor do I think anyone would want such a thing).  Rather, the proper credentials need to be configured on the Operation so that it can do its work uninterrupted.

I'm not sure which of these items is the right one to avoid the 401 error on the service you're connecting to (assuming you have the correct service address already configured). I think it's probably the second one, based on the login behavior you describe when connecting with the browser.

To troubleshoot it might be helpful to look at the logs on the Service side if you have access to that. If not then it's possible a TCP trace would show information that's not making it into the Ensemble log, although we try to make it capture and log everything possible from every response.  If you continue to have trouble getting it to work I suggest you ask the InterSystems WRC to help you look into it.

Ted
Reply all
Reply to author
Forward
0 new messages