I'm calling some webservices that require an authentication token. After retrieving the token it must be included in the SOAP Header of every next request. About almost two years ago I was able to do this by using the EnhancedWebReferences plugin. 

After the upgrade to Platform 11 a new version of the webservice was published. I imported the new service in OutSystems using Consume SOAP Web Service. To my surprise I was not able to enter the WebReferenceName from EnhancedWebReferences.

I looked deeper into the old service and saw that it has been deprecated:

The new one looks different:

Then I read that EnhancedWebReferences has been deprecated and that the SOAP Extensibility API should be used. I tried to use this API using Integration Studio, but I didn't manage to inject my header into the SOAP request through OnBeforeRequestAdvanced. The piece I want to inject is this:

"<web:AuthenticationSoapHeader xmlns:web=""https://webservices.xxxxxx.nl/"">
<web:Token>" + GetTokenExport.Token  + "</web:Token>
<web:MasterDataVersion>2</web:MasterDataVersion>
</web:AuthenticationSoapHeader>"

Somebody can help me with this?

Thanks in advance,

Best Regards,

Peter Nijhuis aka CasaSpider.

Hello Peter,

I had the same problem. You need to create your own extention, there is an OutSystems page with some examples: 

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Use_Advanced_Extensibility/Example%3A_Add_SOAP_header

And then use that extention in the OnBeforeRequestAdvanced.


first you go to intergation studio and define you extention, it could look something like this: 



using C# you need to implement the logic. As described on the OutSystem page. 

Hope there pointers help

Erik Brzozowski wrote:

Hello Peter,

I had the same problem. You need to create your own extention, there is an OutSystems page with some examples: 

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Use_Advanced_Extensibility/Example%3A_Add_SOAP_header

And then use that extention in the OnBeforeRequestAdvanced.


first you go to intergation studio and define you extention, it could look something like this: 



using C# you need to implement the logic. As described on the OutSystem page. 

Hope there pointers help

Hi Erik, thanks for your quick reply.

I have read the link about Integration Studio and the part with the parameter is ok. I'm having trouble passing the parameter to the C# function. Can you show me this piece of code? That would be very helpful!

Thanks for your effort,

Best Regards,

Peter.


Hi Peter,

Please check this forge component where you have a sample to add SOAP headers

https://www.outsystems.com/forge/component-overview/5322/soap-extensibility-samples


Best regards

Hugo Gonçalves

Hugo Gonçalves wrote:

Hi Peter,

Please check this forge component where you have a sample to add SOAP headers

https://www.outsystems.com/forge/component-overview/5322/soap-extensibility-samples


Best regards

Hugo Gonçalves

Hi Hugo,

Thanks for the link. I tried to make it work, but ran into several types of compilation errors.

There must be a simpler way to achieve this? I really don't understand why OutSystems didn't update the EnhancedWebReferences plugin.

I ended up writing a dotNet wrapper around the Soap services and publish them as WebAPI Rest services.

It was a good lesson learned though, it's risky to depend on plugins. Better stay in control yourself...

Thanks and regards,

Peter Nijhuis.