AnsweredAssumed Answered

Rest Service Virtualization using Request/Response Pair requiring XML Response - Media Type Separator is Missing

Question asked by VikramShethF318255 on May 30, 2017
Latest reply on Jun 8, 2017 by VikramShethF318255

Hi, I have virtualized a rest service using request/response pair, where I am expecting an xml response. In the request.txt I have these lines -

GET (url) HTTP/1.1
Accept: application/xml
Content-Type: application/xml
Host: localhost:8001
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.7)
Accept-Encoding: gzip,deflate


In the response.txt -

HTTP/1.1 200





When I test this using soap-ui, in the response I am getting "Content-Type: text". Not sure what I need to do to get content-type as xml in the response. I tried with application/json and it works fine.

When I access the virtualized service through the application - it gives an error

" java.lang.IllegalArgumentException: Media type separator is missing"


Any help is appreciated. Thanks!!