API GATEWAY with Mashup
The version is cloud and API GATEWAY number version is 10.15.0.0.96.
I’m trying to send into an API Mashup an array json:
{
“crPlace”: “10MON”,
“crStore”: “50AAH”,
“sku”:[“7501055320660”,“7501011121980”]
}
And I’m trying to send this value with payload transformation:
{
“crPlace”: “${request.payload.jsonPath[$.crPlace]}”,
“crStore”: “${request.payload.jsonPath[$.crStore]}”,
“sku”: “[${request.payload.jsonPath[$.sku[0]}]”
}
or
{
“crPlace”: “${request.payload.jsonPath[$.crPlace]}”,
“crStore”: “${request.payload.jsonPath[$.crStore]}”,
“sku”: [“${request.payload.jsonPath[$.sku]}”]
}
or
{
“crPlace”: “${request.payload.jsonPath[$.crPlace]}”,
“crStore”: “${request.payload.jsonPath[$.crStore]}”,
“sku”: “${request.payload.jsonPath[$.sku]}”
}
However, when send the information the error is the following:
API Gateway encountered an error. Error Message: Native service provider error. Code : 500
In this case I don’t have access to native service o native server, so I can’t see how the value was sent/received.
I tried different manners for example with an fixed value:
{
“crPlace”: “${request.payload.jsonPath[$.crPlace]}”,
“crStore”: “${request.payload.jsonPath[$.crStore]}”,
“sku”: [“7501055320660”]
}
In that case it works perfectly. I’m thinking the problem is the manner how to I’m setting the array sku, maybe there some error with jsonpath.
With another case:
{
“crPlace”: “${request.payload.jsonPath[$.crPlace]}”,
“crStore”: “${request.payload.jsonPath[$.crStore]}”,
“sku”: [“${request.payload.jsonPath[$.sku[0]}”]
}
I get a code 204 No content.
The API GATEWAY Cloud has the last updates.
Any idea how to fix that?
Thanks for your help.
Regards.