619
Views
16
Comments
Input Parameter for OnBeforeReqeustAdvanced - SOAP
Question

Hi, 

We need to execute a SOAP API call in OutSystems 11. 

Previously, we made use of the EnhancedWebReferences extension to change the effective URL as well as appending the required headers before making the request.  

The new protocol now requires us to make use of the SOAP Extensibility API. 

We downloaded the SOAP Extensibility Samples from the Forge in order to dynamically change the URL and append headers, but I am not sure how to pass the URL to the OnBeforeRequest action? 

There is no option for an input variables, only local? 



Please can someone assist me in passing through my URL and header values to the OnBeforeRequest? 

Thanks, 

Nicholas

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Nicholas,

The OnBeforeRequest is called by the Platform, so there's no way to pass it any Parameters. Unfortunately, I'm not sure though how your scenario should be solved, as I've not used it myself.

2019-01-16 07-23-24
Nicholas van Wyngaard

Kilian Hekhuis wrote:

Hi Nicholas,

The OnBeforeRequest is called by the Platform, so there's no way to pass it any Parameters. Unfortunately, I'm not sure though how your scenario should be solved, as I've not used it myself.

Thanks for the response Killian. 

I guess the only other option would be to create a custom web service in C# with input parameters for all attributes which need to be changed before executing the web service call.

I will keep the thread updated.

2025-11-19 06-14-01
Miguel Verdasca
Champion

Nicholas,


please check this link: Use Advanced Extensibility

Cheers,

Nuno Verdasca

2025-11-19 06-14-01
Miguel Verdasca
Champion

And I don't know if the solution below can solve your problem, but it doesn't hurt to share to try and help solve your question:






This way you can choose to add even more headers.


Regards,
Nuno Verdasca

2019-01-16 07-23-24
Nicholas van Wyngaard

Nuno Miguel Verdasca wrote:

And I don't know if the solution below can solve your problem, but it doesn't hurt to share to try and help solve your question:






This way you can choose to add even more headers.


Regards,
Nuno Verdasca

Hi Nuno, 

Thanks for the information. 

Was this done using the deprecated SOAP service in OutSystems? Or are these for REST? How did you manage to create input parameters? 

Thanks, 

Nicholas


2025-11-19 06-14-01
Miguel Verdasca
Champion

Hi Nicholas,

did you see this document: Input Parameter (Consumed SOAP Method) and SOAP Web Service (Consumed) ?

2015-07-28 10-59-28
Francisco Silva

Hi!


My goal is the same. I need to change the SOAP endpoint in runtime depending, for example, on the user who is making the request.


How to use this Platform API with input parameters?

2024-03-04 12-06-32
Flávio Monteiro

Hey I have the same exact problem i would like to change the soap endpoint at runtime. Is there any way to this by getting the request body in the OnBeforeRequest of the soap action?

2019-01-16 07-23-24
Nicholas van Wyngaard

Flávio Monteiro wrote:

Hey I have the same exact problem i would like to change the soap endpoint at runtime. Is there any way to this by getting the request body in the OnBeforeRequest of the soap action?

Hi Flavio, 

This is still not possible when using the OnBeforeRequest as you cannot pass any input parameters at runtime. 

We ended up creating a custom Extension using Integration Studios which allowed us to dynamically change the endpoint.  

UserImage.jpg
Diogo Soares

Hi, I'm having the same problem, can you please give more details on how you solved it?

2020-03-11 09-18-27
Jorick van Rijs

Trying to achieve the same. Has anyone come up with a solution yet?

UserImage.jpg
Sami Niemelä

Just wondering if "Runtime Property" can be used to hold/pass state on session level in Service type eSpaces. The documentation is quite "light" on this one, though: 

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Data/Handling_Data/Runtime_Property

UserImage.jpg
Matthias Sandmann

Did you find any solution based on "Runtime Properties" Sami? I did not even find the runtime properties ;-)


I need to change the URL of a consuming service based on a business value (a country code decides which server should be addressed) so I need some option to insert data into the OnBeforeRequestAdvanced.

The only solution I have found so far is the use of a database and write an entry before the call and read it within the  OnBeforeRequestAdvanced. But this is a huge risk in a multi-user environment as it is not session-dependent.

UserImage.jpg
Dimitrios Bessas

Hi Matthias,

I had a similar scenario in which the user Id decides which server should be called. I managed to pass the user Id as input parameter by augmenting the  http request structure and using the JSON Deserialise widget inside the On Before Request to extract the User Id. The augmented structure does not get sent to the endpoint because at the bottom of the On Before Action the CustomizedRequest output parameter does not include my additional structure attribute containing the User Id.

It`s a bit of a hack but I prefer it than having to store this parameter in a database entity and retrieving it later for the reason you mentioned.

Please see the attached document for details


Input parameters in On Before Request.docx
2024-03-06 08-19-06
Rean Lubbe

Hey Dimitros.


Thanks for that, unfortunately your solution work for a REST request, the original poster (and I) are looking for a way to do this with a SOAP request. A SOAP request has no "Request" and "CustomizedRequest" input or output parameters that can be used

2024-03-06 08-19-06
Rean Lubbe

If anyone else finds this thread - you can get most of the info you need from the request headers and payload, then change the URI using "ChangeEndPoint", all provided by the "SoapExtensibility" forge component:



This OS documentation shows how to write the "ChangeEndPoint" method yourself, but SOAPExtensibility allready has it, so you can just use it instead, and the header and payload should provide you with the context you need to decide what you want to change the URI to-https://success.outsystems.com/documentation/11/integration_with_external_systems/soap/consuming_soap_web_services/use_advanced_extensibility/change_service_endpoint_at_runtime/


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.