i am working on github project https://github.com/anil614sagar/advanceddevjam/blob/master/lab1.md

8615-hb-employees-rev1-2019-05-16.zip I am working on it.But when i give url https://hsbhattacharjee25-eval-test.apigee.net/v1/HB_EMPLOYEES/41be3def-8922-11e8-86ee-021e63aadcc4

i am getting response. <?xml version="1.0" encoding="UTF-8"?><Root/>.

I am attaching the proxy.

Solved Solved
0 4 135
1 ACCEPTED SOLUTION

Hi @HIMADRI BHATTACHARJEE,

I have checked the proxy code you have shared. Found that the target server return {} (null) when you pass the employee id in the path. To fix that you need to disable target.copy.pathsuffix in target default preflow.

<AssignVariable>
        <Name>target.copy.pathsuffix</Name>
        <Value>false</Value>
</AssignVariable>

You will get all employees after putting this policy in place. If you want to get data for 1 employee id with current target endpoint. you need to use Extract Variable and JS policy.

8886-screen-shot-2019-07-23-at-21252-pm.png

Let me know if you need the sample code as well.

View solution in original post

4 REPLIES 4

Hi @HIMADRI BHATTACHARJEE,

I have checked the proxy code you have shared. Found that the target server return {} (null) when you pass the employee id in the path. To fix that you need to disable target.copy.pathsuffix in target default preflow.

<AssignVariable>
        <Name>target.copy.pathsuffix</Name>
        <Value>false</Value>
</AssignVariable>

You will get all employees after putting this policy in place. If you want to get data for 1 employee id with current target endpoint. you need to use Extract Variable and JS policy.

8886-screen-shot-2019-07-23-at-21252-pm.png

Let me know if you need the sample code as well.

Thank you it works.Can you explain to me a little bit?

what are your questions?

@HIMADRI BHATTACHARJEE, if Ravindra's answer solved your problem you could go ahead and "Accept" the answer.