Examples of unmarshal()


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

            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

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

    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

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

        };
        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

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

      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

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

   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

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

      JAXBContext ctx = JAXBContext.newInstance(expected);
      Unmarshaller unmarshaller = ctx.createUnmarshaller();
      InputStream is = new FileInputStream(attachmentsStore);
      try
      {
         return (T) unmarshaller.unmarshal(is);
      }
      finally
      {
         is.close();
      }
View Full Code Here

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

         InputSource input = new InputSource(is);
         input.setSystemId(file.toURI().toString());
         XMLReader reader = XMLReaderFactory.createXMLReader();
         reader.setEntityResolver(new JBossEntityResolver());
         SAXSource source = new SAXSource(reader, input);
         JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(source, ManagedConnectionFactoryDeploymentGroup.class);
         ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
         repository.addManagedConnectionFactoryDeploymentGroup(deployment);
         return deployment;
      }     
      finally
View Full Code Here

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

      InputStream is = openStreamAndValidate(file);
      try
      {
         InputSource source = new InputSource(is);
         source.setSystemId(file.toURI().toString());
         Object o = unmarshaller.unmarshal(source);
         return getOutput().cast(o);
      }
      finally
      {
         try
View Full Code Here

Examples of javax.xml.bind.annotation.adapters.XmlAdapter.unmarshal()

            try {
                XmlAdapter xmlAdapter = typeAdapter.value().newInstance();
                if (marshal) {
                    return xmlAdapter.marshal(obj);
                } else {
                    return xmlAdapter.unmarshal(obj);
                }
            } catch (Exception ex) {
                LOG.warning("Problem using the XmlJavaTypeAdapter");
                ex.printStackTrace();
            }
View Full Code Here

Examples of net.buffalo.protocal.converters.Converter.unmarshal()

  }
 
  public Object convertAnother() {
    streamReader.moveDown();
    Converter converter = converterLookup.lookupConverterForTagName(streamReader.getNodeName());
    Object object = converter.unmarshal(streamReader, this);
    streamReader.moveUp();
    return object;
  }

  public void addObject(Object object) {
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.