Examples of createUnmarshaller()


Examples of org.exolab.castor.xml.XMLContext.createUnmarshaller()

    context.addMapping(mapping);
   
    InputStream stream = getClass().getResourceAsStream("/com/jada/xml/query/Query.xml");
      BufferedReader reader = new BufferedReader(new InputStreamReader(stream));

      Unmarshaller unmarshaller = context.createUnmarshaller();
      unmarshaller.setClass(NamedQueries.class);
     
      namedQueries = (NamedQueries) unmarshaller.unmarshal(reader);
  }
 
View Full Code Here

Examples of org.jboss.marshalling.MarshallerFactory.createUnmarshaller()

        final ByteInput byteInput;
        try {
            final MarshallingConfiguration configuration = new MarshallingConfiguration();
            configuration.setVersion(2);
            configuration.setClassTable(ModularClassTable.getInstance());
            unmarshaller = factory.createUnmarshaller(configuration);
            byteInput = Marshalling.createByteInput(initialInput);
            unmarshaller.start(byteInput);
            final ServerTask task = unmarshaller.readObject(ServerTask.class);
            unmarshaller.finish();
            task.run(Arrays.<ServiceActivator>asList(new ServiceActivator() {
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextWrapper.createUnmarshaller()

   @Test
   public void testSeeAlso() throws Exception
   {
      JAXBContext ctx = new JAXBContextWrapper(null, Kunde.class);
      Kunde kunde = (Kunde) ctx.createUnmarshaller().unmarshal(
              new ByteArrayInputStream(kundeXml.getBytes()));
      System.out.println("HERE KUNDE!!!!" + kunde.getNachname());

   }
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.json.BadgerContext.createUnmarshaller()

         StringWriter writer = new StringWriter();
         context.createMarshaller().marshal(library, writer);
         System.out.println("Badger: ");
         String s = writer.toString();
         System.out.println(s);
         Library lib = (Library) context.createUnmarshaller().unmarshal(new StringReader(s));
         Assert.assertEquals(lib.getName(), "BPL");
         Assert.assertEquals(lib.getBooks().size(), 2);
      }
      {
         JettisonMappedContext context = new JettisonMappedContext(Library.class);
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.json.BadgerContext.createUnmarshaller()

         StringWriter writer = new StringWriter();
         context.createMarshaller().marshal(library, writer);
         System.out.println("Mapped: ");
         String s = writer.toString();
         System.out.println(s);
         Library lib = (Library) context.createUnmarshaller().unmarshal(new StringReader(s));
         Assert.assertEquals(lib.getName(), "BPL");
         Assert.assertEquals(lib.getBooks().size(), 2);
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.json.JettisonMappedContext.createUnmarshaller()

         StringWriter writer = new StringWriter();
         context.createMarshaller().marshal(library, writer);
         System.out.println("Badger: ");
         String s = writer.toString();
         System.out.println(s);
         Library lib = (Library) context.createUnmarshaller().unmarshal(new StringReader(s));
         Assert.assertEquals(lib.getName(), "BPL");
         Assert.assertEquals(lib.getBooks().size(), 2);
      }
      {
         JettisonMappedContext context = new JettisonMappedContext(Library.class);
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.json.JettisonMappedContext.createUnmarshaller()

         StringWriter writer = new StringWriter();
         context.createMarshaller().marshal(library, writer);
         System.out.println("Mapped: ");
         String s = writer.toString();
         System.out.println(s);
         Library lib = (Library) context.createUnmarshaller().unmarshal(new StringReader(s));
         Assert.assertEquals(lib.getName(), "BPL");
         Assert.assertEquals(lib.getBooks().size(), 2);
      }
   }
View Full Code Here

Examples of org.jbpm.designer.web.profile.IDiagramProfile.createUnmarshaller()

          String retValue = "false";
          IDiagramProfile profile = _profileService.findProfile(req, req.getParameter("profile"));
            String json = req.getParameter("data");
            try {
        String xmlOut = profile.createMarshaller().parseModel(json, preProcessingParam);
        String jsonIn = profile.createUnmarshaller().parseModel(xmlOut, profile, preProcessingParam);
        if(jsonIn == null || jsonIn.length() < 1) {
          retValue = "true";
        }
      } catch (Throwable t) {
        retValue = "true";
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.