In most HANA Cloud Platform, Integration Services adapters it is possible to use dynamic parameters. For example, the name of the file in the SFTP adapter can be set by using the parameter CamelFileName and the URL in the HTTP adapter can be set by using CamelHTTPUri. However, with the SOAP adapter, for which we needed it in one of our iFlows, this was not possible.

Please consider the following example. We have an interface querying data on SalesForce. To be able to connect to SalesForce a session id and a URL have to be retrieved first by using a SOAP call to a login server with a fixed URL (e.g. https://login.salesforce.com/services/Soap/u/36.0).

The SOAP call returns a server URL and a session id. The server URL contains the actual system on which the user is allowed to log on and on which the query can be executed.
The returned session id is used for authentication:

Both the session id and the URL are dynamic values. For the session id this was no problem since it is set in the envelope using a groovy script, but the URL could not be set dynamically in the SOAP adapter.

We tried putting the URL in a header parameter using a content modifier and placing the parameter in the address of the SOAP adapter but that resulted in the following error:

The only other entry that worked, without using an address in the form of https://example, was an external parameter. This did not solve our problem, since external parameters can also not be set dynamically.

We have discussed this with SAP and they have given us a solution:

The SOAP adapter address can be overwritten by using the header parameter CamelDestinationOverrideUrl.

In the iFlow we now fill this parameter with the server URL that was received from the SalesForce login server (please note that in this case it is filled from a globale variable since we have a separate iFlow that calls the login server to get the server URL and the session id):

It is still necessary to put an address in the SOAP adapter, but that can be anything (e.g. https://salesforce) since it is overwritten by the value of CamelDestinationOverrideUrl.

We hope this will help you as much as it did us.

Frank Bakermans, YourIntegration

Martin Jaspers, Q for IT BV

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

    1. Bhavesh Kantilal

      I just re-checked the documentation and I dont find this in the help documentation.Hope SAP can update the document and if you have a link to them still open you can ask them to 🙂

      Dynamic Parameters

      Regards,
      Bhavesh
       

      (0) 
    2. M. Jaspers Post author

      Thank you!

      As far as I know it is not documented indeed.
      That’s why we asked SAP if we could write a blog about it and they agreed.

      Let’s hope the documentation gets updated soon.

      (0) 
  1. K Ramesh

    Great Jaspers …

    i’ve been waiting for an answer for my thread https://answers.sap.com/questions/87103/index.html

    and finally i found a blog where we can achieve dynamic url passing in receiver adapter. and i achieved the same for IDOC receiver adappeter.

    an final question is, do we have global  parameter for overwriting ‘credential name’ as i mentioned below?

    any how we are going to call credential name which is available as user credentials artifact, hopefully we can overwrite credential name as well.

    Regards
    Remash

     

    (0) 
    1. M. Jaspers Post author

      Hi Remash,

      Sorry for my late reply, I did not see your question.

      It should be possible to make the Credential Name variable using ${header.username}

      Kind regards,

      Martin

      (0) 
      1. K Ramesh

        Hi Jaspers.

        Thank you for your reply.

        I tried the same but it’s not working, and i raised OSS to SAP for the same, and SAP also confirmed this feature is not available.

         

        Regards

        ramesh

         

        (0) 

Leave a Reply