31
Views
4
Comments
Error consuming Webservice with authentication
Question
Hello,

I'm trying to consume a webservice but I get the error : 

Couldn't access resource at <url> . The remote server returned the error : (500) Internal Server Error.
If I try to access in the browser it requests user and password and after inserting it works fine.


2012-03-16 12-21-09
João Rosado
Staff

Hi Nelson,

To consume the web service you have 2 alternatives:

  1. write the username and pass in the url ( https://username:password@url )
  2. Download the wsdl file (and any necessary .xsd files) to a folder in your pc and use that file to consume the webservice.


Then (in any of the alternatives), for it to work in runtime you will have to reference the SetWebReferenceCredentials from the EnhancedWebReferences extension to configure the username and password before the call.

Regards,
João Rosado
 

2019-12-11 17-59-12
Nelson André
I'm trying to use the first option but it's a domain user and I have to put domain\user
Even using in the browser it changes to domain/user and gives error.

2019-12-11 17-59-12
Nelson André
Hello,

I followed path nr 2 and got to have the web service created in SStudio.
I've used the SetWebReferenceURL and SetWebReferenceCredentials actions to set the real WebService Address and the user and password.

Created a simple screen to send some parameters to the WS and retrieve the data but nothing happens, no values returned, no error messages.

How do I know Is something wrong in Outsystems side or is it with the real webservice not working?

2019-09-17 09-11-00
João Pedro Abreu
Staff
Hi Nelson,

You could try to send a few requests "written by hand" using SOAP UI (https://www.soapui.org/) to check how the web service behaves.

Another useful too I often use is Fiddler (https://fiddler2.com/), which you can use as a proxy (using the SetWebReferenceProxy action) to check what you are sending to the Web Service and what is the response's content.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.