Examples of marshall()


Examples of com.betfair.cougar.marshalling.api.databinding.Marshaller.marshall()


    public String marshallEventBody(Event event) throws CougarException {
        Marshaller marshaller = dataBindingFactory.getMarshaller();
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        marshaller.marshall(outputStream, event, characterEncoding);
        return outputStream.toString();
    }

    public String getHostString(Event event) throws UnknownHostException {
        StringBuilder sb = new StringBuilder();
View Full Code Here

Examples of com.notnoop.apns.EnhancedApnsNotification.marshall()

        server.stopAt(apnsNotification.length());

        template.sendBody("direct:test", message);

        server.messages.acquire();
        assertArrayEquals(apnsNotification.marshall(), server.received.toByteArray());
    }

    protected CamelContext createCamelContext() throws Exception {
        CamelContext camelContext = super.createCamelContext();
View Full Code Here

Examples of com.notnoop.apns.SimpleApnsNotification.marshall()

    };

    @Theory
    public void lengthConsistency(String deviceToken, PayloadBuilder payload) {
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payload.build());
        assertEquals(msg.marshall().length, msg.length());
    }

    @Theory
    public void commandIsZero(String deviceToken, PayloadBuilder payload) {
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payload.build());
View Full Code Here

Examples of com.notnoop.apns.SimpleApnsNotification.marshall()

    }

    @Theory
    public void commandIsZero(String deviceToken, PayloadBuilder payload) {
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payload.build());
        byte[] bytes = msg.marshall();
        assertEquals(0, /*command part*/ bytes[0]);
    }

    @Theory
    public void deviceTokenPart(String deviceToken, PayloadBuilder payload) {
View Full Code Here

Examples of com.notnoop.apns.SimpleApnsNotification.marshall()

    }

    @Theory
    public void deviceTokenPart(String deviceToken, PayloadBuilder payload) {
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payload.build());
        byte[] bytes = msg.marshall();

        byte[] dt = decodeHex(deviceToken);
        assertEquals(dt.length, /* found length */ (bytes[1] << 8) + bytes[2]);

        // verify the device token part
View Full Code Here

Examples of com.notnoop.apns.SimpleApnsNotification.marshall()

    @Theory
    public void payloadPart(String deviceToken, PayloadBuilder payload) {
        String payloadString = payload.build();
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payloadString);
        byte[] bytes = msg.marshall();

        byte[] pl = toUTF8Bytes(payloadString);

        // in reverse
        int plBegin = bytes.length - pl.length;
View Full Code Here

Examples of com.notnoop.apns.SimpleApnsNotification.marshall()

    @Theory
    public void allPartsLength(String deviceToken, PayloadBuilder payload) {
        String payloadString = payload.build();
        SimpleApnsNotification msg = new SimpleApnsNotification(deviceToken, payloadString);
        byte[] bytes = msg.marshall();

        int expectedLength = 1
            + 2 + decodeHex(deviceToken).length
            + 2 + toUTF8Bytes(payloadString).length;
        assertEquals(expectedLength, bytes.length);
View Full Code Here

Examples of com.sdicons.json.serializer.marshall.JSONMarshall.marshall()

     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        Marshall marshaller = new JSONMarshall();
        JSONObject jObj = marshaller.marshall( obj );
        super.write( jObj.render( false ), out );
    }
   
    /*
     * (non-Javadoc)
 
View Full Code Here

Examples of com.sdicons.json.serializer.marshall.Marshall.marshall()

     * @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
     */
    public void write( Object obj, OutputStream out ) throws Exception
    {
        Marshall marshaller = new JSONMarshall();
        JSONObject jObj = marshaller.marshall( obj );
        super.write( jObj.render( false ), out );
    }
   
    /*
     * (non-Javadoc)
 
View Full Code Here

Examples of javax.wsdl.extensions.ExtensionSerializer.marshall()

        else if (behavior.equals(COPY))
        {
          ExtensionSerializer extSer = extReg.querySerializer(parentClass,
                                                              elementType);

          extSer.marshall(parentClass,
                          elementType,
                          extEl,
                          pw,
                          def,
                          extReg);
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.