Forum Discussion

TDYSmartBear's avatar
TDYSmartBear
Occasional Contributor
7 years ago

Receive error when return data is ArrayList

Hi all,

 

The application front end can retrieve return ArralyList via REST call using Wildfly 10. However when running tests via ReadyAPI calling the same APIs got follow error: 

 

Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: application/octet-stream

 

Application: Java backend 1.8 
Request media-type: application/json 
Response: media-type: application/json or application/octet-stream 

 

Does anybody have any insight on this?  Thanks in advance!

1 Reply

  • Nastya_Khovrina's avatar
    Nastya_Khovrina
    SmartBear Alumni (Retired)

    Hi,

     

    You need to compare the successful raw request with a raw request from ReadyAPI and modify the request in ReadyAPI accordingly.

     

    To get a raw request in ReadyAPI, please switch to the Raw tab on the left side of the Request Editor.

     

    To get a raw request which was sent from your application (or from a browser) you can use Fiddler (http://www.telerik.com/download/fiddler) which is a free tool to capture HTTP(S) traffic.