views:

31

answers:

0

I am trying to develop a method in my RESTful web service in Java to insert multiple entries into a MySQL DB using POST request. The generated RESTful Web Service has a method to insert a single entity, but not multiple ones. For example, it accepts:

<creature>
  <sort>Mouse</sort> 
  <name>Pinky</name>
</creature>

But not (what I would like):

<creature>
  <sort>Mouse</sort> 
  <name>Pinky</name>
</creature>
<creature>
  <sort>Elephant</sort> 
  <name>Dumbo</name>
</creature>

I'm guessing that you have to loop through the entities, but not sure how to implement it, being a shameful novice.