cancel
Showing results for 
Search instead for 
Did you mean: 

How to decode coded image content from HTTP Response

Highlighted
Contributor

How to decode coded image content from HTTP Response

I am working on SOAP UI Project, where in after running HTTP request with endpoint, I got xml response which has image and is in coded format. Can you please assist me how i can decode this xml image data and then save this image file. Please find snippet attached;

Example:

<data contentType="image/JPEG" contentLength="1875">/9j/4AAQSkZJRgABAQEASABIAAD...............</data>

4 REPLIES 4
Highlighted
Community Hero

Re: How to decode coded image content from HTTP Response

This may help:

https://www.codeproject.com/Articles/80289/Saving-Image-Data-in-an-XML-File




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Highlighted
Super Contributor

Re: How to decode coded image content from HTTP Response

Highlighted
Contributor

Re: How to decode coded image content from HTTP Response

@PaulMS

Thanks for suggestions!

I tried groovy script posted from link suggested by you. But my data content from HTTP Response is of type image/jpeg and when i ran script, i was able to save data but image is broken and not clearly visible. Is there any other possible solution, if so i will be looking forward and interested to explore on same.

 

Thanks,
Ashish

Highlighted
Super Contributor

Re: How to decode coded image content from HTTP Response

If you can use dump file to save the response message then you don't need groovy script. Does the image open correctly if you enter a file path and name in dump file property?

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors