REST-SOAP-REST working only in API Console

Not applicable

I have below URL which works in API console but doesn't work when I just paste in any form or hurl site etc.

http://kumarta-test.apigee.net/test/siebelaccountquerybyid?PrimaryRowId=1-32GF

After comparing I found out that when I don't use API console it adds a response parameter transfer-encoding which might be causing the failure to decompress error in response -

{"Envelope":{"encodingStyle":"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/","Body":{"Fault":{"faultcode":"soap:Server","faultstring":"Failed to Decompress","faultactor":{},"detail":{"source":{"errorcode":"messaging.adaptors.http.DecompressionFailure"}}}}}}

I searched that we can remove that header from response in this link http://kumarta-test.apigee.net/test/siebelaccountquerybyid?PrimaryRowId=1-32GF so i created an assign message policy to remove it and associated to proxy end point response type. But still i keep on getting the same error.

Please help where I am wrong here.

Solved Solved
0 8 709
1 ACCEPTED SOLUTION

Not applicable

Yes it was down for some time but now it is up. BTW I managed to get the resolution for the issue. The issue is hapening becasue of the server sending chunked response back to client. The API Console is probably handling the chunked response or is sending a field to server notifying that don't send chunked.

So I removed a parameter from http request before sending to server and finally i can get the response in such scenario.

Solution: Create an AssignMessage Policy and assign to Preflow in target endpoint with removal of http header field Accept-Encoding. Using this the response will be received by any HTTP client.

Thanks all for your help. Hope it helps to resolve for some of you.

View solution in original post

8 REPLIES 8

Not applicable

Any thoughts as to what could cause this issue?

@Abhishek Tanwar I am getting a classification error while calling this URL. That happens if the proxy is not even deployed of the url is unregistered. Can you please let me know the exact URLs which is working and which is failing ? If you are using the API console then you can click on the "Share" button at top and get a url of the request response which you can share with us. And I can take a look from there.

http://kumarta-test.apigee.net/seibelsecuredws/siebelaccountquerybyid?PrimaryRowId=1-32GF≈ikey=cLI93...

Above URL works from within API Console but doesn't work when I use direct by enter in chrome and go.

Not applicable

http://kumarta-test.apigee.net/seibelsecuredws/siebelaccountquerybyid?PrimaryRowId=1-32GF&apikey=cLI...

Above URL works from within API Console but doesn't work when I use direct by enter in chrome and go.

Not applicable

Any clues now?

Not applicable
@sarthak

http://kumarta-test.apigee.net/seibelsecuredws/siebelaccountquerybyid?PrimaryRowId=1-32GF≈ikey=cLI93...

Above URL works from within API Console but doesn't work when I use direct by enter in chrome and go.

Now I am getting an error HTTP/1.1 503 Service Unavailable

< Content-Type: application/json

< Content-Length: 279

< Connection: keep-alive

<

* Connection #0 to host kumarta-test.apigee.net left intact

{"Envelope":{"encodingStyle":"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/","Body":{"Fault":{"faultcode":"soap:Server","faultstring":"The Service is temporarily unavailable","faultactor":{},"detail":{"source":{"errorcode":"messaging.adaptors.http.flow.ServiceUnavailable"}}}}}}

while making the call curl -X GET -vvv http://kumarta-test.apigee.net/seibelsecuredws/siebelaccountquerybyid?apikey=cLI93I8SuRODcA81VpFpRvH... ..

Can you try to run it via curl with the -vvv switch and while running keep the Trace open to check what exactly is going on .... Might be something to do with character encoding ? Check via Trace please.... It will give you exactly what is going on when calling via console vs. curl ? BTW which console are you using ?

Not applicable

Yes it was down for some time but now it is up. BTW I managed to get the resolution for the issue. The issue is hapening becasue of the server sending chunked response back to client. The API Console is probably handling the chunked response or is sending a field to server notifying that don't send chunked.

So I removed a parameter from http request before sending to server and finally i can get the response in such scenario.

Solution: Create an AssignMessage Policy and assign to Preflow in target endpoint with removal of http header field Accept-Encoding. Using this the response will be received by any HTTP client.

Thanks all for your help. Hope it helps to resolve for some of you.