Forum Discussion

Brin_Harini's avatar
Brin_Harini
New Member
6 years ago

SOAPUI REST Media Type Application/xml format

Hi Everyone,

i'm new to SOAPUI S/W . i was created asp.net webservice for REST and i executed successfully via media type

application/json.

application/json Format

{

"Name" : "test"

}

Working Fine.

i want to know format for application/xml ? i tried

<Name>test</Name>

or

<Student>

<Name>test</Name>

</Student>

 

Not Working.please anyone tell me the format for application/xml .

 

  • Lucian's avatar
    Lucian
    Community Hero

    What does it mean "not working"? What is happening? What error do you get?

    • ranjit96's avatar
      ranjit96
      Contributor

      If response is shown in Json format, then you can not get this response in XML format. 

       

      If you want this response in XML format, then you need to use groovy script to get XML format reponse.

       

      Script:--

       

      testRunner.testCase.getTestStepAt(0).testRequest.getResponseContentAsXml()