// Path: gsm-modem-jaxb-api/src/main/java/fr/romainmoreau/gsmmodem/jaxb/api/Commands.java
// @XmlRootElement
// public class Commands {
// 	private List<Command> commands;
// 
// 	@XmlElements({ @XmlElement(name = "sendSms", type = SendSms.class),
// 			@XmlElement(name = "sendCommand", type = SendCommand.class),
// 			@XmlElement(name = "setSMSTextMode", type = SetSMSTextMode.class) })
// 	public List<Command> getCommands() {
// 		return commands;
// 	}
// 
// 	public void setCommands(List<Command> commands) {
// 		this.commands = commands;
// 	}
// }


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import fr.romainmoreau.gsmmodem.jaxb.api.Commands;
package fr.romainmoreau.gsmmodem.web;



@Controller
@RequestMapping("/commands")
public class CommandsController {
	@Autowired
	private GsmModemWorker gsmModemWorker;

	@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE)
// Path: gsm-modem-jaxb-api/src/main/java/fr/romainmoreau/gsmmodem/jaxb/api/Commands.java
// @XmlRootElement
// public class Commands {
// 	private List<Command> commands;
// 
// 	@XmlElements({ @XmlElement(name = "sendSms", type = SendSms.class),
// 			@XmlElement(name = "sendCommand", type = SendCommand.class),
// 			@XmlElement(name = "setSMSTextMode", type = SetSMSTextMode.class) })
// 	public List<Command> getCommands() {
// 		return commands;
// 	}
// 
// 	public void setCommands(List<Command> commands) {
// 		this.commands = commands;
// 	}
// }


// Path: gsm-modem-web/src/main/java/fr/romainmoreau/gsmmodem/web/CommandsController.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import fr.romainmoreau.gsmmodem.jaxb.api.Commands;

package fr.romainmoreau.gsmmodem.web;



@Controller
@RequestMapping("/commands")
public class CommandsController {
	@Autowired
	private GsmModemWorker gsmModemWorker;

	@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_XML_VALUE)
	public @ResponseBody boolean post(@RequestBody Commands commands) {