Skip to main content
OutSystems

How to send an authentication token in a web service

Question

We managed to connect to web service server  (Layer B) and consumed web service so far. But now the problem is, all our web services require "Authentication Token".

Where should we pass this token from? Could you please help us in this?

Answer

In order for you to send your Token to your web service method call you will need to use the SetWebReferenceSoapHeaders action available on the EnhancedWebReferences extension.

You just need to have a local SoapHeader record and a List, then you just set the attribute Element on your SoapHeader record to match the configuration that your webservice needs to receive, in your case, you will need to send your token through the header, and then Append that record to your local SoapHeader List so you can then use that on the SetWebReferenceSoapHeaders action, similar to what's showed on the image below.

unnamed (2).png
  • Was this article helpful?