Package javax.xml.bind

Examples of javax.xml.bind.Unmarshaller.unmarshal()


        try {
            Unmarshaller u = getContext().createUnmarshaller();
       
            Object o = null;
            if (namespace == null) {
                o = u.unmarshal(element);
            } else {
                reader = StaxUtils.createXMLStreamReader(element);
                reader = new MappingReaderDelegate(reader);
                o = u.unmarshal(reader);
            }
View Full Code Here


            if (namespace == null) {
                o = u.unmarshal(element);
            } else {
                reader = StaxUtils.createXMLStreamReader(element);
                reader = new MappingReaderDelegate(reader);
                o = u.unmarshal(reader);
            }
            if (o instanceof JAXBElement<?>) {
                JAXBElement<?> el = (JAXBElement<?>)o;
                o = el.getValue();
            }
View Full Code Here

        StringReader reader = new StringReader(s);
        XMLStreamReader data = StaxUtils.createXMLStreamReader(reader);
        Unmarshaller u;
        try {
            u = getContext().createUnmarshaller();
            JAXBElement<TLSClientParametersType> type = u.unmarshal(data, TLSClientParametersType.class);
            TLSClientParametersType cpt = type.getValue();
            return createTLSClientParametersFromType(cpt);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

           
            MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
            XMLStreamReader xsw = factory.createXMLStreamReader(is);
            Object response = null;
            if (JAXBElement.class.isAssignableFrom(type)) {
                response = unmarshaller.unmarshal(xsw, theType);
            } else {
                response = unmarshaller.unmarshal(xsw);
            }
            return response;
           
View Full Code Here

            XMLStreamReader xsw = factory.createXMLStreamReader(is);
            Object response = null;
            if (JAXBElement.class.isAssignableFrom(type)) {
                response = unmarshaller.unmarshal(xsw, theType);
            } else {
                response = unmarshaller.unmarshal(xsw);
            }
            return response;
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);        
View Full Code Here

                bean.addPropertyValue(propertyName, jaxbbean.getBeanDefinition());
            } catch (Exception ex) {
                Unmarshaller u = context.createUnmarshaller();
                Object obj;
                if (c != null) {
                    obj = u.unmarshal(data, c);
                } else {
                    obj = u.unmarshal(data);
                }
                if (obj instanceof JAXBElement<?>) {
                    JAXBElement<?> el = (JAXBElement<?>)obj;
View Full Code Here

                Unmarshaller u = context.createUnmarshaller();
                Object obj;
                if (c != null) {
                    obj = u.unmarshal(data, c);
                } else {
                    obj = u.unmarshal(data);
                }
                if (obj instanceof JAXBElement<?>) {
                    JAXBElement<?> el = (JAXBElement<?>)obj;
                    obj = el.getValue();
                }
View Full Code Here

        try {
            Class<?> theType = getActualType(type, genericType);
            Unmarshaller unmarshaller = createUnmarshaller(theType, genericType);
           
            if (JAXBElement.class.isAssignableFrom(type)) {
                return unmarshaller.unmarshal(new StreamSource(is), theType);
            } else {
                return unmarshaller.unmarshal(is);
            }
           
        } catch (JAXBException e) {
View Full Code Here

            Unmarshaller unmarshaller = createUnmarshaller(theType, genericType);
           
            if (JAXBElement.class.isAssignableFrom(type)) {
                return unmarshaller.unmarshal(new StreamSource(is), theType);
            } else {
                return unmarshaller.unmarshal(is);
            }
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);       
        }
View Full Code Here

                    .newInstance("org.apache.axis2.jaxws.description.xml.handler",
                                 EndpointDescriptionImpl.class.getClassLoader());

            Unmarshaller u = jc.createUnmarshaller();

            JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(is);
            return (HandlerChainsType)o.getValue();

        } catch (Exception e) {
            throw ExceptionFactory
                    .makeWebServiceException(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.