Examples of unmarshal()


Examples of org.objectweb.celtix.configuration.impl.TypeSchema.unmarshal()

        element.getLocalName();
        EasyMock.expectLastCall().andReturn(typename);
        TypeSchema ts = org.easymock.classextension.EasyMock.createMock(TypeSchema.class);
        TypeSchemaHelper tsh = new TypeSchemaHelper(true);
        tsh.put(testURI, ts);
        ts.unmarshal(new QName(testURI, typename), element);
        EasyMock.expectLastCall().andReturn(value);
        EasyMock.replay(element);
        org.easymock.classextension.EasyMock.replay(ts);
      
        pe.setValue(element);
View Full Code Here

Examples of org.objectweb.celtix.configuration.impl.TypeSchema.unmarshal()

       
        element.getNamespaceURI();
        EasyMock.expectLastCall().andReturn(testURI);
        element.getLocalName();
        EasyMock.expectLastCall().andReturn(typename);
        ts.unmarshal(new QName(testURI, typename), element);
        EasyMock.expectLastCall().andThrow(new JAXBException("test"));
        EasyMock.replay(element);
        org.easymock.classextension.EasyMock.replay(ts);
        try {
            pe.getValue();
View Full Code Here

Examples of org.platformlayer.xml.JaxbHelper.unmarshal()

        } else {
          throw new OpsException("Incorrect element type: " + xmlElementName + " vs " + nodeName);
        }
      }

      T object = jaxbHelper.unmarshal(element, itemClass);

      if (!(object.getClass().isAssignableFrom(itemClass))) {
        System.out.println("XML = " + ((UntypedItemXml) untypedItem).serialize());
      }
View Full Code Here

Examples of org.sonatype.nexus.proxy.attributes.JacksonJSONMarshaller.unmarshal()

          // modify the file corresponding attribute
          final File attributeFile = new File(new File(new File(storageWorkDir, repoId), ".nexus/attributes"), filePart);
          Attributes attributes;
          try (FileInputStream in = new FileInputStream(attributeFile)) {
            attributes = marshaller.unmarshal(in);
          }

          // set new value
          attributes.setLastRequested(now + offset);
View Full Code Here

Examples of org.sonatype.nexus.proxy.attributes.Marshaller.unmarshal()

          // modify the file corresponding attribute
          final File attributeFile = new File(new File(new File(storageWorkDir, repoId), ".nexus/attributes"), filePart);
          Attributes attributes;
          try (FileInputStream in = new FileInputStream(attributeFile)) {
            attributes = marshaller.unmarshal(in);
          }

          // set new value
          attributes.setLastRequested(now + offset);
View Full Code Here

Examples of org.springframework.oxm.Unmarshaller.unmarshal()

        marshallerMock.marshal(isA(Object.class), isA(Result.class));

        Unmarshaller unmarshallerMock = createMock(Unmarshaller.class);
        template.setUnmarshaller(unmarshallerMock);
        Object unmarshalled = new Object();
        expect(unmarshallerMock.unmarshal(isA(Source.class))).andReturn(unmarshalled);

        connectionMock.send(isA(WebServiceMessage.class));
        expect(connectionMock.hasError()).andReturn(false);
        expect(connectionMock.receive(messageFactory)).andReturn(new MockWebServiceMessage("<response/>"));
        expect(connectionMock.hasFault()).andReturn(false);
View Full Code Here

Examples of org.springframework.oxm.mime.MimeUnmarshaller.unmarshal()

        MimeMessage request = createMock("request", MimeMessage.class);
        MimeMessage response = createMock("response", MimeMessage.class);
        Source requestSource = new StringSource("<request/>");
        expect(request.getPayloadSource()).andReturn(requestSource);
        expect(factoryMock.createWebServiceMessage()).andReturn(response);
        expect(unmarshaller.unmarshal(eq(requestSource), isA(MimeContainer.class))).andReturn(42L);
        Result responseResult = new StringResult();
        expect(response.getPayloadResult()).andReturn(responseResult);
        marshaller.marshal(eq("result"), eq(responseResult), isA(MimeContainer.class));

        replay(factoryMock, unmarshaller, marshaller, request, response);
View Full Code Here

Examples of rocks.xmpp.extensions.time.model.TimeZoneAdapter.unmarshal()

        TimeZoneAdapter adapter = new TimeZoneAdapter();
        TimeZone timeZone = TimeZone.getTimeZone("GMT-08:00");
        String str = adapter.marshal(timeZone);
        Assert.assertEquals(str, "-08:00");

        TimeZone timeZoneUtc = adapter.unmarshal("Z");
        Assert.assertEquals(timeZoneUtc, TimeZone.getTimeZone("GMT"));
    }
}
View Full Code Here

Examples of ru.aristar.jnuget.StringListTypeAdapter.unmarshal()

        this.packageSize = getLongContent(hashMap.get("PackageSize"));
        this.externalPackageUri = getStringContent(hashMap.get("ExternalPackageUri"));
        this.categories = getStringContent(hashMap.get("Categories"));
        this.copyright = getStringContent(hashMap.get("Copyright"));
        this.packageType = getStringContent(hashMap.get("PackageType"));
        this.tags = adapter.unmarshal(hashMap.get("Tags").getTextContent());
        this.isLatestVersion = getBooleanContent(hashMap.get("IsLatestVersion"));
        this.summary = getStringContent(hashMap.get("Summary"));
    }
    /**
     * Версия пакета
View Full Code Here

Examples of toxi.data.feeds.util.Iso8601DateAdapter.unmarshal()

        String[] dates = new String[] { "2009-07-16T15:45:07Z",
                "2009-07-22T21:13:45-07:00" };
        for (String dateString : dates) {
            XMLGregorianCalendar date = null;
            try {
                date = format.unmarshal(dateString);
            } catch (Exception e) {
            }
            System.out.println(dateString + ": " + date);
            assertNotNull(date);
        }
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.