Error consuming Webservice with authentication

Error consuming Webservice with authentication

  
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.


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
 

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.

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?

Hi Nelson,

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

Another useful too I often use is Fiddler (http://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.