Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic value in tRest component

Hi everyone,

I have a clarification using tRest component is this possible to pass values dynamically?

 

Example : URL  am giving works for POST method only  

URL : "https://development.avalara.net/1.0/tax/get.xml" 

HTTP Method: POST

HTTP Headers : name: "Authorization" Value : "xyz"

HTTP Body: XML content looks like below

"<Request>
<DocDate>2016-12-08</DocDate>
<CustomerCode>XXX</CustomerCode>
<Addresses>
<Address>
<AddressCode>01</AddressCode>
<City>Texas</City>
<Region>US</Region>
<PostalCode>21234</PostalCode>
</Address>
</Addresses>
<Lines>
<Line>
<LineNo>01</LineNo>
<DestinationCode>01</DestinationCode>
<OriginCode>01</OriginCode>
<ItemCode>M324</ItemCode>
<Qty>1</Qty>
<Amount>100</Amount>
</Line>
</Lines>
</Request>"

 

My question is Instead of giving XML content I would like to pass <DocDate>2016-12-08</DocDate> in the URL ,is this possible?

So based on the date am passing it should retrieve data!

 

Thanks in advance. 

Labels (4)
2 Replies
vapukov
Master II
Master II

If endpoint external - You must follow documentation for this service

 

if it also created by You web-service:

 

You can pass parameter as query or xml as body

 

like 

 

"https://development.avalara.net/1.0/tax/get.xml?DocDate=2016-12-08

 

if You want pass it as XML - use body

Anonymous
Not applicable
Author

Hi @vapukov

 

We can't open the URL "https://development.avalara.net/1.0/tax/get.xml?DocDate=2016-12-08" in any browser.It will say file not found.

 

Using Fiddler web debug proxy tool this URL brings data

 

So what component I should use for my scenario.Please help me out.

 

Please have a look at the job below

0683p000009LucN.png

This is the error I'm facing:

Error:

Starting job gettaxrequest at 10:21 16/06/2017.

[statistics] connecting to socket on port 4073
[statistics] connected
.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------.
| tLogRow_2 |
|=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|Body |ERROR_CODE|
|=---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------=|
|{
"ResultCode": "Error",
"Messages": [
{
"Summary": "The request was unable to be successfully serviced, please try again or contact Customer Service.",
"Severity": "Error",
"Source": "Avalara.Web.REST"}
]
}
|500 |
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------'

[statistics] disconnected
Job gettaxrequest ended at 10:21 16/06/2017. [exit code=0]