public Object unmarshalRootElement ( Reader inStream ) throws UnmarshalException { try { // create a JAXBContext capable of handling classes generated into // the primer.po package String strSOAPPackage = this . getSOAPPackage ( ) ; if ( strSOAPPackage != null ) { // create an Unmarshaller Unmarshaller u = JaxbContexts . getJAXBContexts ( ) . getUnmarshaller ( strSOAPPackage ) ; // unmarshal a po instance document into a tree of Java content // objects composed of classes from the primer.po package. Object obj = null ; synchronized ( u ) { obj = u . unmarshal ( inStream ) ; } return obj ; } //+} catch (XMLStreamException ex) { //+ ex.printStackTrace(); } catch ( JAXBException ex ) { ex . printStackTrace ( ) ; } return null ; }
UnmarshalRootElement Method .