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
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.
Kilian Hekhuis wrote:
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.
Nicholas,
please check this link: Use Advanced ExtensibilityCheers,
Nuno Verdasca
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
Nuno Miguel Verdasca wrote:
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?
did you see this document: Input Parameter (Consumed SOAP Method) and SOAP Web Service (Consumed) ?
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?
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?
Flávio Monteiro wrote:
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.
Hi, I'm having the same problem, can you please give more details on how you solved it?
Trying to achieve the same. Has anyone come up with a solution yet?
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
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.
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
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
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/