Package javax.xml.bind

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


                context = JAXBContext.newInstance(clazz);
            }
            Unmarshaller u = context.createUnmarshaller();
            u.setSchema(schema);

            obj = (clazz != null) ? u.unmarshal(srcNode, clazz) : u.unmarshal(srcNode);
           
            if (obj instanceof JAXBElement<?>) {
                JAXBElement<?> el = (JAXBElement<?>)obj;
                if (isSame(el.getName(), elName)) {
                    obj = el.getValue();
View Full Code Here


                context = JAXBContext.newInstance(clazz);
            }
            Unmarshaller u = context.createUnmarshaller();
            u.setSchema(schema);

            obj = (clazz != null) ? u.unmarshal(srcNode, clazz) : u.unmarshal(srcNode);
           
            if (obj instanceof JAXBElement<?>) {
                JAXBElement<?> el = (JAXBElement<?>)obj;
                if (isSame(el.getName(), elName)) {
                    obj = el.getValue();
View Full Code Here

        Object obj = null;
        try {
            Unmarshaller u = context.createUnmarshaller();
            u.setSchema(schema);

            obj = u.unmarshal(srcNode);
           
            if (obj instanceof JAXBElement<?>) {
                JAXBElement<?> el = (JAXBElement<?>)obj;
                if (el.getName().equals(elName)) {
                    obj = el.getValue();
View Full Code Here

            JAXBContext context = null;
            String packageName = RMUtils.getWSRMPolicyFactory().getClass().getPackage().getName();
            try {
                context = JAXBContext.newInstance(packageName, getClass().getClassLoader());
                Unmarshaller u = context.createUnmarshaller();
                Object obj = u.unmarshal(nl.item(0));
                if (obj instanceof JAXBElement<?>) {
                    JAXBElement<?> el = (JAXBElement<?>)obj;
                    obj = el.getValue();
                }
                rma = (RMAssertionType)obj;
View Full Code Here

        context = JAXBContext.newInstance(packageName, getClass().getClassLoader());
        Unmarshaller u = context.createUnmarshaller();
        if (doValidate) {
            u.setSchema(schema);
        }
        obj = u.unmarshal(data);
        if (obj instanceof JAXBElement<?>) {
            JAXBElement<?> el = (JAXBElement<?>)obj;
            obj = el.getValue();
            /*
             * if (el.getName().equals(type)) { obj = el.getValue(); }
View Full Code Here

            if (in == null) {
                throw new DeploymentException("unable to read descriptor " + wsDDUrl);
            }
           
            Unmarshaller unmarshaller = getJAXBContext().createUnmarshaller();
            Object obj = unmarshaller.unmarshal(in);
           
            WebservicesType wst = null;
            if (obj instanceof JAXBElement) {
                wst = (WebservicesType)((JAXBElement)obj).getValue();
            }
View Full Code Here

    public ExtensibilityElement unmarshall(Class parent, QName qname, Element element, Definition wsdl,
                                           ExtensionRegistry registry) throws WSDLException {
        try {
            Unmarshaller u = context.createUnmarshaller();
       
            Object o = u.unmarshal(element);
            if (o instanceof JAXBElement<?>) {
                JAXBElement<?> el = (JAXBElement<?>)o;
                o = el.getValue();
            }
           
View Full Code Here

        };
        JAXBContext context = JAXBContext.newInstance(cls);
        Unmarshaller u = context.createUnmarshaller();

        EndpointReferenceType ref = (EndpointReferenceType)
                                    ((JAXBElement<?>)u.unmarshal(
                                        getClass().getResource("resources/reference2.xml"))).getValue();

        Definition def = EndpointReferenceUtils.getWSDLDefinition(manager,
                                                                  ref);
        assertNotNull("Could not load wsdl", def);
View Full Code Here

      JAXBContext ctx = JAXBContext.newInstance(CTX_CLASS);
      Unmarshaller um = ctx.createUnmarshaller();
      StringReader r = new StringReader(content);
      InputSource is = new InputSource(r);
      Source s = new SAXSource(is);
      JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(s, ManagedConnectionFactoryDeploymentGroup.class);
      ManagedConnectionFactoryDeploymentGroup group = elem.getValue();
      return group;
   }
   public static ManagedConnectionFactoryDeploymentGroup unmarshalResource(String resourceName) throws Exception
   {
View Full Code Here

   public static ManagedConnectionFactoryDeploymentGroup unmarshalResource(String resourceName) throws Exception
   {
      JAXBContext ctx = JAXBContext.newInstance(CTX_CLASS);
      Unmarshaller um = ctx.createUnmarshaller();
      Document d = getDocumentForResource(resourceName);
      JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(d, ManagedConnectionFactoryDeploymentGroup.class);
      ManagedConnectionFactoryDeploymentGroup group = elem.getValue();
      //      ManagedConnectionFactoryDeploymentGroup group = elem.getValue();
      return group;     
   }
  
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.