Examples of createUnmarshaller()


Examples of com.caucho.jaxb.JAXBContextImpl.createUnmarshaller()

    properties.put(JAXBContextImpl.TARGET_NAMESPACE, namespace);

    JAXBContextImpl jaxbContext =
      new JAXBContextImpl(jaxbClassArray, properties);
    Marshaller marshaller = jaxbContext.createMarshaller();
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();

    DirectSkeleton skel =
      new DirectSkeleton(type, api, jaxbContext, wsdlLocation, namespace, wsdl);

    Method[] methods = type.getMethods();
View Full Code Here

Examples of com.sun.jersey.api.json.JSONJAXBContext.createUnmarshaller()

        System.out.println("\nMarshalled JSON:");
        System.out.println(writer.toString());

        // Unmarshal
        final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        final JAXBElement<ComplexXmlEventBean> unmarshal = unmarshaller.unmarshal(
                Stax2JsonFactory.createReader(new StringReader(writer.toString()), configuration, null,
                        ComplexXmlEventBean.class, jaxbContext, false),
                ComplexXmlEventBean.class);
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

   }
  
   @Override
   protected TranslatorMetaDataGroup parse(VFSDeploymentUnit unit, VirtualFile file, TranslatorMetaDataGroup root) throws Exception {
    JAXBContext context = JAXBContext.newInstance(new Class[] {TranslatorMetaDataGroup.class});
      Unmarshaller um = context.createUnmarshaller();     
      InputStream is = file.openStream();

      try{
         InputSource input = new InputSource(is);
         input.setSystemId(file.toURI().toString());
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

  static Unmarshaller getUnMarsheller() throws JAXBException, SAXException {
    JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {VDBMetaData.class});
    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = schemaFactory.newSchema(VDBMetaData.class.getResource("/vdb-deployer.xsd")); //$NON-NLS-1$
    Unmarshaller un = jc.createUnmarshaller();
    un.setSchema(schema);
    return un;
  }
 
  @Override
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

        this.rangeName = rangeName;
    }

    public <T> T getData(Class<T> clazz, String str) throws Exception {
        JAXBContext context = JAXBContext.newInstance(clazz);
        Unmarshaller u = context.createUnmarshaller();
        return (T) u.unmarshal(new FileReader(new File(folder, str)));
    }

    private void setFire(boolean b) {
        for (Dao dao : dataPool.getDaos()) {
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

    StringWriter sw = new StringWriter();
    marshell.marshal(group, sw);
       
    System.out.println(sw.toString());   
   
    Unmarshaller un = jc.createUnmarshaller();
    group = (TranslatorMetaDataGroup)un.unmarshal(new StringReader(sw.toString()));
   
    tm = group.getTranslators().get(0);
   
    assertEquals("Oracle", tm.getName());
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

    marshell.marshal(vdb, sw);
       
    //System.out.println(sw.toString());

    // UnMarshell
    Unmarshaller un = jc.createUnmarshaller();
    un.setSchema(schema);
    vdb = (VDBMetaData)un.unmarshal(new StringReader(sw.toString()));
   
    assertEquals("myVDB", vdb.getName()); //$NON-NLS-1$
    assertEquals("vdb description", vdb.getDescription()); //$NON-NLS-1$
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

  @XmlElement(namespace="http://www.metamatrix.com/metamodels/MetaMatrixFunction", name="ScalarFunction")
  List<FunctionMethod> functionMethods = new ArrayList<FunctionMethod>();
 
  public static List<FunctionMethod> loadFunctionMethods(InputStream source) throws JAXBException {
    JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {FunctionMetadataReader.class});
    Unmarshaller marshaller = jc.createUnmarshaller();
    FunctionMetadataReader md = (FunctionMetadataReader) marshaller.unmarshal(source);
    return md.functionMethods;
  }
 
}
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

                    String headerURI = headerName.getURI();
                    if (unmarshaller == null) {
                        JAXBContext jaxbContext =
                            VersionTransformer.getExposedJAXBContext(headerURI);
                        unmarshaller =
                            jaxbContext.createUnmarshaller();
                    }
                    if (transformer.isSupported(headerURI)) {
                        if (maps == null) {
                            maps = new AddressingPropertiesImpl();
                            maps.exposeAs(headerURI);
View Full Code Here

Examples of javax.xml.bind.JAXBContext.createUnmarshaller()

                obj = new SAXSource(inputSource);
            } else if (StreamSource.class.isAssignableFrom(callback.getSupportedFormats()[0])) {    
                obj = new StreamSource(getSOAPBodyStream(doc));
            } else if (Object.class.isAssignableFrom(callback.getSupportedFormats()[0])) {          
                JAXBContext context = callback.getJAXBContext();
                Unmarshaller u = context.createUnmarshaller();
                return u.unmarshal(doc);                   
            }
        } catch (Exception se) {
            se.printStackTrace();
        }
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.