Consider using the JSONTemplater to generate the request data and using the output in the HTTPCaller.
Thanks David!
It is still the same problem:
Now I am configuring the json-body with a jsontemplater and some string-operations, targeting the field "_body".
When I copy manually the content of the transformer-output to the body of the httpCaller without connection, the api-call works! When I connect the output of the attributekeeper to the httpcaller and set the Upload body on _body.
I get a reject. Perhaps the logfile helps.
Is there a possibility to see what is sended by the httpcaller?
HTTPPost_BatchTrigger (HTTPFactory): Received HTTP response header: 'HTTP/1.1 403 Forbidden' from 'https://gateway.hub.db.de/web4bpawetter/forecast/batch'
HTTPPost_BatchTrigger (HTTPFactory): An error occurred w
Thanks David!
It is still the same problem:
Now I am configuring the json-body with a jsontemplater and some string-operations, targeting the field "_body".
When I copy manually the content of the transformer-output to the body of the httpCaller without connection, the api-call works! When I connect the output of the attributekeeper to the httpcaller and set the Upload body on _body.
I get a reject. Perhaps the logfile helps.
Is there a possibility to see what is sended by the httpcaller?
HTTPPost_BatchTrigger (HTTPFactory): Received HTTP response header: 'HTTP/1.1 403 Forbidden' from 'https://gateway.hub.db.de/web4bpawetter/forecast/batch'
HTTPPost_BatchTrigger (HTTPFactory): An error occurred w
Difficult to say, I do not have enough information about either the API specification or the complete configuration of the HTTPCaller to pinpoint the issue.
Perhaps try activating the debug messages in the log file.
https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/Workbench/Viewing_the_Log.htm
Thanks David!
It is still the same problem:
Now I am configuring the json-body with a jsontemplater and some string-operations, targeting the field "_body".
When I copy manually the content of the transformer-output to the body of the httpCaller without connection, the api-call works! When I connect the output of the attributekeeper to the httpcaller and set the Upload body on _body.
I get a reject. Perhaps the logfile helps.
Is there a possibility to see what is sended by the httpcaller?
HTTPPost_BatchTrigger (HTTPFactory): Received HTTP response header: 'HTTP/1.1 403 Forbidden' from 'https://gateway.hub.db.de/web4bpawetter/forecast/batch'
HTTPPost_BatchTrigger (HTTPFactory): An error occurred w
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
I can see the content also within the transformer cache:
{ "geodata" : p "HBKB","HFLL","HRIN","HM","HL","HKLG","HVTH","HLH","HBDE","HHMS","HLST","HLBB","HHZH","HRAH","HEKP" ], "from" : "2022-02-15T00:00:00", "to" : "2022-02-15T23:59:59", "fields" : "PREC_6H,PROB_PREC_MAX_6H", "wait" : false, "flatten" : true, "si" : false }
The httpcaller works when I put the content manually in the transformers upload body and disable the connection. When it is streamed by connection it goes wrong.
Thank you for your hints.
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
The problem is that you're sending the text string "_response_body", and not the contents of the attribute named "_response_body". Make sure to select the attribute name from the context menu rather than typing it in.
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
Hm, I don't think so. This is the POST-request i am sending:
And the api-response will be in the "Response Body Attribute" named "_response_body".
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
Ouch, must get better glasses. You're right, of course.
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
According to the screenshot you have posted, a part of the authorization value is the value of feature attribute called "JWT".
In this case, the feature coming from the AttributeKeeper (connection A in the screenshot below) should have both "JWT" and "_body".
Make sure that.
If the feature coming from B contains "JWT" but the A feature doesn't, you will have to merge "JWT" from B to A before inputting to the HTTPCaller.
Insert a Logger before the HTTPCaller then run. You can see the content of "_body" in the log.
Dear takashi. Thanks a lot for your idea and exelent input.
I merged the two connections and it works ... yeah!