Nur Atiqah
unread,Dec 20, 2022, 6:12:15 AM12/20/22You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi All,
I'm using HTTP Client Connector to make an HTTP GET call. I configured the connection with HTTP Parser with Client Mode activated.
So i've added few headers and seems they are read. However, i received an error on http.body when i add below codes to its Output Map
metricsObj = java.lang.System.getProperties().get("metricsObj");
errorsObj = java.lang.System.getProperties().get("errorsObj");
returnPayload = {
status: (metrics==null)?"Not Runnning":"OK",
metrics: metricsObj,
errors: errorsObj}
work["http.body"]=toJson(returnPayload
This is what i received i run a debugger:
19:11:13,618 ERROR - CTGDIS266E Error in NextConnectorOperation. Exception occurred: java.lang.Exception: [HTTPClientConnector] CTGDIS183E Error while mapping attribute 'http.body' in the Output Attribute Map of Component 'HTTPClientConnector' (HTTPClientConnector.Output.http.body).
java.lang.Exception: [HTTPClientConnector] CTGDIS183E Error while mapping attribute 'http.body' in the Output Attribute Map of Component 'HTTPClientConnector' (HTTPClientConnector.Output.http.body).
at com.ibm.di.server.AttributeMapping.mapAttribute(AttributeMapping.java:287)
at com.ibm.di.server.AttributeMapping.mapEntry(AttributeMapping.java:510)
at com.ibm.di.server.AttributeMapping.mapEntry(AttributeMapping.java:361)
at com.ibm.di.server.AssemblyLineComponent.callreply(AssemblyLineComponent.java:2115)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(AssemblyLine.java:3827)
at com.ibm.di.server.AssemblyLine.executeMainStep(AssemblyLine.java:3418)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:3026)
at com.ibm.di.server.AssemblyLine.executeMainLoop(AssemblyLine.java:3009)
at com.ibm.di.server.AssemblyLine.executeAL(AssemblyLine.java:2975)
at com.ibm.di.server.AssemblyLine.run(AssemblyLine.java:1338)
Caused by: java.lang.Exception: 'metrics' not found
at com.ibm.di.script.ScriptEngine.unWrap(ScriptEngine.java:977)
at com.ibm.di.script.ScriptEngine.interpret(ScriptEngine.java:942)
at com.ibm.di.script.ScriptEngine.interpret(ScriptEngine.java:925)
at com.ibm.di.server.AttributeMapping$SingleAttributeMap.eval(AttributeMapping.java:729)
at com.ibm.di.server.AttributeMapping.mapAttribute(AttributeMapping.java:281)
... 9 more
Idk whether this is the correct way to add http.body into the Output Map or there is another way to do so. Can anyone help me on this?
Thanks!