I am trying to call an external SOAP web service with a couple of empty parameters. At the moment Outsystems is sending the request without including the empty parameters
<Body>
<SearchPremiseByPostcodeFlatOrNumber>
<sPostcode>kt1 4bu</sPostcode>
</SearchPremise_ByPostcodeFlatOrNumber>
What I would like is to have the request look like this
<sFlatOrBuildingName/>
<sPremisesNumber/>
Is this possible?
Thanks
Mike
Hello Mike,
Yes, that is possible.
Most likely, those fields are defined as non-mandatory (in OutSystems). If so, when they are empty, they will not be sent on the request to the external API.
Please, try to define those fields as mandatory and they should be sent on the request to the API (even if they are empty).
Hope that this helps you!
Kind regards,
Rui Barradas
Thanks Rui, yes you were mostly correct and your answer put me on the correct track. The option I needed to set was on the input parameters of the service call - I needed to set "Send Default Value" to true on each one.
Hello again Mike,
I had this problem in the past and I solved it by defining my inputs as Mandatory :)
If you see this approach, you will see that both Is Mandatory and Send Default Value properties are connected.
If you define an input parameter as Mandatory, that Send Default Value property will always be set to Yes and you won't be able to change it. That's why I prefer to maintain the input as Mandatory.
I'm glad that you managed to solve it out :)