Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:47:29+00:00 2026-06-08T00:47:29+00:00

@RequestMapping(method=RequestMethod.POST, value=/employeeXML) public ModelAndView addEmployeePostXMl(@RequestBody String body) { Source source = new StreamSource(new StringReader(body));

  • 0
@RequestMapping(method=RequestMethod.POST, value="/employeeXML")
public ModelAndView addEmployeePostXMl(@RequestBody String body) {
    Source source = new StreamSource(new StringReader(body));
    Employee e = (Employee) jaxb2Mashaller.unmarshal(source);
    employeeDS.add(e);
    List<Employee> employees = employeeDS.getAll();
    EmployeeList list = new EmployeeList(employees);
    return new ModelAndView(XML_VIEW_NAME, "employees", list);
}

I am able to test it for single POST body ie

<employee>
   <id>3</id>
   <name>guest3</name>
   <email>guest3@ibm.com</email>
</employee>. 

But how to check it for multiple DYNAMIC values like CSV files.If i am using csv file with data :

3   aFFaFD       xfchghcxh
4   dsfgsdF      cxhchcxht
5   asFDdsF      chcxhcg
6   sdFsF        cxhxhcgh
7   SDFsF        cghcxhcg
8   gfzsgzd      cxghchc
9   hgfxhfx      cghchgc
10  fghxf        ghcxhxc
11  fhgfxh       cghchcc
12  ghcxxh       cxhcghch
13  chgxgcvx     cghchcxgch
14  hgxfhxch     cxhgxchcg
15  ghcxhcx      vmcvmnvbm
16  cghch        bnmvmbh
17  cxghcxhcx    mvbhgn
18  cxghcxh      mnmcghmh
19  cxghcxhxch   mnvmvmcv
20  xcghchcx     mvcmvmv

it gives unmarshalling exception because the post body should be in XML format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:47:32+00:00Added an answer on June 8, 2026 at 12:47 am

    Try to use JMeterRestSampler – custom jmeter sampler for testing REST services:

    • RestSampler project
    • JMeter to test robustness of system exposing REST APIs

    You can use it along with the following schema:

    Thread Group
        . . .
        While Controller
        Condition: ${__javaScript("${email}"!="<EOF>",)} // until the EOF
            CSV Data Set Config
            Filename: [path to your file with test-data]
            Variable Names: id,name,email
            REST Sampler
    
                <employee>
                    <id>${id}</id>
                    <name>${name}</name>
                    <email>${email}</email>
                </employee>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, in this controller: @RequestMapping(value = /save, method = RequestMethod.POST) public @ResponseBody String
I have application wide single controller. @RequestMapping(method = RequestMethod.POST,value=services) @ResponseBody mwpWebServices(@RequestBody String data, HttpServletRequest
@ModelAttribute(user) @RequestMapping(value = /, method = RequestMethod.POST) public User saveUser( @RequestBody User user )
Here's how my method looks like: @RequestMapping(value = /form, method = RequestMethod.POST) public String
In my controller: @RequestMapping(value = /, method = RequestMethod.GET) public String index() { return
@RequestMapping(value = {/userDetails, /userDetails/edit/{id}}, method = RequestMethod.GET) public String userDetails(Map Model,****) { //what goes
My controller is like this @RequestMapping(value =/getTaggedProducts, method = RequestMethod.GET) @ResponseBody public String getProductsTagged(@RequestParam(questionnaireId)Long
controller: @Controller @SessionAttributes public class ContactController { @RequestMapping(value = /addContact, method = RequestMethod.POST) public
this is from my controller.. @RequestMapping(value = /add, method = RequestMethod.GET) public String add(Model
I typically retrieve POST parameters like the following: @RequestMapping(method = RequestMethod.POST) public ModelAndView create(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.