// Create the JAXBContext
JAXBBlockContext context = new JAXBBlockContext(StockPrice.class.getPackage().getName());
// Create the JAX-B object
ObjectFactory of = new ObjectFactory();
StockPrice obj = of.createStockPrice();
obj.setPrice("100");
// Create the JAX-B Element
QName paramQName = new QName("urn://sample", "param", "m");
JAXBElement e = new JAXBElement(paramQName, StockPrice.class, obj);