You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending binary data (e.g., files with .lzma extension) via POST requests to SoapUI, the handling of the request in AbstractMockRequest (specifically at this line)) ) converts the incoming binary data into a String.
This approach is problematic for binary data, as the conversion process corrupts the data. This issue is evident when trying to save the received data to a file. The problem persists even when using getRawRequestData(), which, instead of returning the original byte array of the request, returns the byte array of the string representation, leading to further corruption.
A potential solution could be to modify the handling in AbstractMockRequest to avoid converting binary data into a String. Instead, it could directly work with the byte array. One approach might be to introduce a new field from around line 151 and utilize this field in getRawRequestData() to return the original binary data.
The text was updated successfully, but these errors were encountered:
To rewrite the code to return a byte array method, you will have to rewrite most of the SoapUI core and test its functionality. I may not have studied the code well, but the method definitely expects an xml file, so I added the encoding detection and subsequent conversion to UTF-8 to the code, since there may be files with a different encoding.
When sending binary data (e.g., files with .lzma extension) via POST requests to SoapUI, the handling of the request in AbstractMockRequest (specifically at this line)) ) converts the incoming binary data into a String.
This approach is problematic for binary data, as the conversion process corrupts the data. This issue is evident when trying to save the received data to a file. The problem persists even when using getRawRequestData(), which, instead of returning the original byte array of the request, returns the byte array of the string representation, leading to further corruption.
A potential solution could be to modify the handling in AbstractMockRequest to avoid converting binary data into a String. Instead, it could directly work with the byte array. One approach might be to introduce a new field from around line 151 and utilize this field in getRawRequestData() to return the original binary data.
The text was updated successfully, but these errors were encountered: