import java.util.HashMap;
import java.util.Map;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

public class JI9037016{
	
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public static class Customer {
	private MyField myField;

	MyField getMyField() {
		return myField;
	}

	void setMyField(MyField myField) {
		this.myField = myField;
	}
}

	@XmlAccessorType(XmlAccessType.FIELD)
	public static class MyField{

		Map<String, String> getSomeMap() {
			return someMap;
		}

		void setSomeMap(Map<String, String> someMap) {
			this.someMap = someMap;
		}

		@XmlElement
		private Map<String, String> someMap = new HashMap<String, String>();
	}

	public static void main(String[] args) throws JAXBException {
		JAXBContext jc = JAXBContext.newInstance(Customer.class);

		Customer customer = new Customer();
		MyField myField1 = new MyField();
		myField1.someMap.put("foo", "bar");
		myField1.someMap.put("baz", "qux");
		customer.myField =  myField1;

		Marshaller marshaller = jc.createMarshaller();
		marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
		marshaller.marshal(customer, System.out);
	}

}

