Package org.apache.axis.message

Examples of org.apache.axis.message.SOAPEnvelope.output()


                    beanQName,
                    new SimpleSerializerFactory(SimpleBean.class, beanQName),
                    new SimpleDeserializerFactory(SimpleBean.class, beanQName));

        // Serialize the bean in to XML
        msg.output(context);
        // Get the XML as a string
        String msgString = writer.toString();

        Message message = new Message(msgString);
        message.setMessageContext(msgContext);
View Full Code Here


                    beanQName,
                    new BeanSerializerFactory(AttributeBean.class, beanQName),
                    new BeanDeserializerFactory(AttributeBean.class, beanQName));

        // Serialize the bean in to XML
        msg.output(context);
        // Get the XML as a string
        String msgString = stringWriter.toString();

        log.debug("---");
        log.debug(msgString);
View Full Code Here

        if (log.isDebugEnabled()) {
            StringWriter writer = new StringWriter();
            try {
                SerializationContext ctx = new SerializationContextImpl(writer,
                                                                   msgContext);
                reqEnv.output(ctx);
                writer.close();
            } catch (Exception e) {
                log.debug(Messages.getMessage("exceptionPrinting"), e);
            } finally {
                log.debug(writer.getBuffer().toString());
View Full Code Here

        Writer stringWriter = new StringWriter();
        SerializationContext context = new SerializationContextImpl(stringWriter,
                                                                    msgContext);

        msg.output(context);

        String msgString = stringWriter.toString();
        assertTrue("Found unexpected xsi:type!",
                   msgString.indexOf("xsi:type") == -1);
    }
View Full Code Here

        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

        QName dataQName = new QName("typeNS", "Data");
        tm.register(Data.class, dataQName, new DataSerFactory(), new DataDeserFactory());

        msg.output(context);

        String msgString = stringWriter.toString();

        log.debug("---");
        log.debug(msgString);
View Full Code Here

        RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[] { arg1 });
        msg.addBodyElement(body);
        body.setEncodingStyle(Constants.URI_LITERAL_ENC);
       
        SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
        msg.output(context);
       
        msgString = stringWriter.toString();
        assertTrue(msgString.indexOf("xmlns=\"\"")==-1);
    }   
   
View Full Code Here

        RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[] { arg1 });
        msg.addBodyElement(body);
        body.setEncodingStyle(Constants.URI_LITERAL_ENC);
       
        SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
        msg.output(context);
       
        msgString = stringWriter.toString();
       
        // Now reparse into DOM so we can check namespaces.
        StringReader resReader = new StringReader(msgString);
View Full Code Here

        Writer stringWriter = new StringWriter();
        SerializationContext context = new SerializationContext(stringWriter,
                                                                msgContext);

        msg.output(context);

        String msgString = stringWriter.toString();
        assertTrue("Found unexpected xsi:type!",
                   msgString.indexOf("xsi:type") == -1);
    }
View Full Code Here

        if (log.isDebugEnabled()) {
            StringWriter writer = new StringWriter();
            try {
                SerializationContext ctx = new SerializationContextImpl(writer,
                                                                   msgContext);
                reqEnv.output(ctx);
                writer.close();
            } catch (Exception e) {
                log.debug(Messages.getMessage("exceptionPrinting"), e);
            } finally {
                log.debug(writer.getBuffer().toString());
View Full Code Here

                SOAPHeaderElement header = (SOAPHeaderElement) i.next();
                envelope.addHeader(header);
            }
        }

        envelope.output(context);
    }

    public String toString() {
        return faultString;
    }
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.