Examples of marshal()


Examples of com.caucho.quercus.marshal.Marshal.marshal()

    Marshal elementMarshal = factory.create(elementType);

    int i = 0;

    for (Entry ptr = getHead(); ptr != null; ptr = ptr.getNext()) {
      Array.set(array, i++, elementMarshal.marshal(env,
                                                   ptr.getValue(),
                                                   elementType));
    }

    return array;
View Full Code Here

Examples of com.cuubez.core.transform.Transformer.marshal()

        } else if (MediaType.APPLICATION_XML.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[XML] started");
            Transformer transformer = new DefaultXMLTransformer();
            String output = transformer.marshal(messageContext.getResponseContext().getReturnObject());
            messageContext.getResponseContext().setContent(output);

        } else if (MediaType.APPLICATION_JSON.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[JSON] started");
View Full Code Here

Examples of com.cuubez.core.transform.json.DefaultJSONTransformer.marshal()

        } else if (MediaType.APPLICATION_JSON.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[JSON] started");
            Transformer transformer = new DefaultJSONTransformer();
            String output = transformer.marshal(messageContext.getResponseContext().getReturnObject());
            messageContext.getResponseContext().setContent(output);

        } else if (MediaType.TEXT_PLAIN.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[Text] started");
View Full Code Here

Examples of com.cuubez.core.transform.text.DefaultTextTransformer.marshal()

        } else if (MediaType.TEXT_PLAIN.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[Text] started");
            Transformer transformer = new DefaultTextTransformer();
            String output = transformer.marshal(messageContext.getResponseContext().getReturnObject());
            messageContext.getResponseContext().setContent(output);

        }

    }
View Full Code Here

Examples of com.cuubez.core.transform.xml.DefaultXMLTransformer.marshal()

        } else if (MediaType.APPLICATION_XML.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[XML] started");
            Transformer transformer = new DefaultXMLTransformer();
            String output = transformer.marshal(messageContext.getResponseContext().getReturnObject());
            messageContext.getResponseContext().setContent(output);

        } else if (MediaType.APPLICATION_JSON.equals(messageContext.getResponseContext().getMediaType()) && messageContext.getResponseContext().isNeedToTransform()) {

            log.trace("response transformation[JSON] started");
View Full Code Here

Examples of com.dotcms.repackage.com.thoughtworks.xstream.XStream.marshal()

              f.createNewFile();
           
           
            OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream( f ), "UTF-8");
            HierarchicalStreamWriter xmlWriter = new DotPrettyPrintWriter(writer);
            xstream.marshal(obj, xmlWriter);
            writer.close();

        } catch ( FileNotFoundException e ) {
            Logger.error( PublisherUtil.class, e.getMessage(), e );
        } catch ( IOException e ) {
View Full Code Here

Examples of com.elevenware.ladybird.entities.ContentHandler.marshal()

        return client.doPost(this, body);
    }

    public HttpResponse post(String path, Object payload) {
        ContentHandler handler = ContentHandlers.getInstance().forType(getContentType(), null);
        String entity = handler.marshal(payload);
        return post(path, entity);
    }

    public HttpResponse put(String path, String body) {
        setPath(path);
View Full Code Here

Examples of com.google.checkout.MerchantCalculationResults.marshal()

      // Authorization matches, grab the request
      MerchantCalculationCallback callback = (MerchantCalculationCallback) Unmarshaller.unmarshal(MerchantCalculationCallback.class, _request.getReader());
      MerchantCalculationResults results = HandlerFactory.getCalculationHandler().performCalculation(callback);
      _response.addHeader("Content-Type", "application/xml");
      _response.addHeader("Accepts", "application/xml");
      results.marshal(_response.getWriter());
      _response.setStatus(HttpStatus.SC_OK);
    } catch (IOException e) {
      if (LOG.isErrorEnabled()) {
        LOG.error("IOException processing Google Callback: " + e.getLocalizedMessage(), e);
      }
View Full Code Here

Examples of com.sun.jersey.json.impl.JSONMarshaller.marshal()

            Marshaller m, OutputStream entityStream)
            throws JAXBException, IOException {
        if (m instanceof JSONMarshaller) {
            JSONMarshaller jm = (JSONMarshaller)m;
            jm.setJsonEnabled(true);
            jm.marshal(t,
                    new OutputStreamWriter(entityStream, c));
        } else {
            m.marshal(t, JsonXmlStreamWriter.createWriter(
                    new OutputStreamWriter(entityStream, c), true));
        }
View Full Code Here

Examples of com.sun.xml.bind.api.Bridge.marshal()

            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);

            if (source instanceof XMLStreamWriter) {
                bridge.marshal(elValue, (XMLStreamWriter)source);
            } else if (source instanceof OutputStream) {
                //the namespace is missing when marshal the xsd:QName type
                //to the OutputStream directly
                java.io.StringWriter sw = new java.io.StringWriter();
                StreamResult s1 = new StreamResult(sw);
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.