Examples of marshal()


Examples of org.platformlayer.xml.JsonHelper.marshal()

            if (debug != null) {
              debug.println("Data: [JSON Content]");
            }

            JsonHelper jsonHelper = JsonHelper.build(sendData.getClass());
            String json = jsonHelper.marshal(sendData, false);
            httpRequest.setRequestContent(new Utf8StringByteSource(json));
            // jsonHelper.marshal(sendData, false, getOutputStream());
            break;
          default:
            throw new IllegalStateException();
View Full Code Here

Examples of org.salamandra.web.core.transformer.node.binder.AbstractXmlBinding.marshal()

            sessionElement.appendChild(country);
          } else {
            XmlBindingFactory xf = getBindingFactory();
            if (xf != null) {
              AbstractXmlBinding xs = xf.create(Protocol.XSLT, thisValueObject );
              xs.marshal(sessionElement);     

            }
          }
      } else {
        attrText = document.createTextNode("");
View Full Code Here

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

          // set new value
          attributes.setLastRequested(now + offset);

          // write it out
          try (FileOutputStream out = new FileOutputStream(attributeFile)) {
            marshaller.marshal(attributes, out);
          }
        }

        line = reader.readLine();
      }
View Full Code Here

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

          // set new value
          attributes.setLastRequested(now + offset);

          // write it out
          try (FileOutputStream out = new FileOutputStream(attributeFile)) {
            marshaller.marshal(attributes, out);
          }
        }

        line = reader.readLine();
      }
View Full Code Here

Examples of org.springframework.oxm.Marshaller.marshal()

    @Test
    public void testSendAndReceiveMarshalResponse() throws Exception {
        Marshaller marshallerMock = createMock(Marshaller.class);
        template.setMarshaller(marshallerMock);
        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);
View Full Code Here

Examples of org.springframework.oxm.jaxb.Jaxb2Marshaller.marshal()

    Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
    marshaller.setClassesToBeBound(new Class<?>[] { QualifiedTrade.class });
    marshaller.afterPropertiesSet();
   
    StringWriter string = new StringWriter();
    marshaller.marshal(new QualifiedTrade("FOO", 100, BigDecimal.valueOf(10.), "bar"), new StreamResult(string));
    String content = string.toString();
    assertTrue("Wrong content: "+content, content.contains("<customer>bar</customer>"));
    return marshaller;
  }
View Full Code Here

Examples of org.springframework.oxm.mime.MimeMarshaller.marshal()

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

        AbstractMarshallingPayloadEndpoint endpoint = new AbstractMarshallingPayloadEndpoint() {
            @Override
View Full Code Here

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

    @Test
    public void testTimezoneAdapter() throws Exception {
        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.marshal()

    private Element createMicrosoftElement(String name, boolean nullable, List<String> value) throws ParserConfigurationException {
        String stringValue = null;
        if (value != null) {
            try {
                StringListTypeAdapter adapter = new StringListTypeAdapter();
                stringValue = adapter.marshal(value);
            } catch (Exception e) {
                throw new ParserConfigurationException("Ошибка преобразования списка строк");
            }
        }
        Element element = createMicrosoftElement(name, nullable, MicrosoftTypes.DateTime, stringValue);
View Full Code Here

Examples of test.MyInvoice.marshal()

            System.out.println("   Date :" + day.toString());
            System.out.println("   Time :" + time.toString());
            System.out.println();

            System.out.println("----End of Invoice----");
            invoice.marshal(new FileWriter("invoice2.xml"));

        } catch (Exception e) {
            e.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.