on 09-14-2020 12:19 PM
Hi,
I am creating a scenario using B1if (version 1.22.28) in which I want to create a Sales Order in SAP Business One (version 10.0, PL 02) by fetching the data from a third party system. The handover of information from third party system is in the form of JSON.
In order to access the correct resource, I first need to get a token generated from the other system. There is no problem with this step and I am able to get the required token using an HTTP Call atom. Now, in the next step I need to use this token in order to access the required resource and here is where I am stuck.
I have created a variable ($Token) which stores the value of token generated from previous HTTPCall atom. Now, I want to pass this value to httpheader.Authorization parameter so that I get the access. However, from what I've seen so far I cannot pass the variable in the value of the parameter as it only accepts a fixed value. i.e. something like below.
<par id="httpheader.Authorization" value="Bearer Enbh4CIs1AROOmIBJyTzKH8YxIwW0m3ix3OnJp79ecGwD1L3663m_GHBz2PysBPUTx-iBUkgJfGNJrrLPXnriFsZgO1U93OeQPwra4eqeFFKfPbenz43oV5WgGTtn-8oHwxWCpbrP7tI7D7JssRCsRxE7vIM9omaAeKP2X9yYHGoiv27CZTSTCb0uWP_VCofMcC-XrKKBe_orTk-OKStb0Z7YPLYjTZznUxcPZONB_Uzh8plTYKPiJJZv71sNPke1LpESADp7EGr7eVCKxWWAA"></par>
But what I want is to do something like this (I know below code is wrong but it is only for understanding)
<par id="httpheader.Authorization" value="$Token"></par>
A quick help will be highly appreciated.
Let me know if any more information is required.
Best Regards,
Ninad Vaidya
Hi Ninad,
Prior to the http atom, please add an Xform atom, where you can prepare and have token set in the xml message, which could be retrieved in the following atoms.
for example, in xform atom, transform the output as:
<Token>xxfkejafkjd</Token>
In the http atom, now you can define a variable in xsl to retrieve the token from xform atom above, then used in the http call.
Kind Regards, Yatsea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.