Package org.apache.axis.message

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


                    tm = (TypeMapping) reg.createTypeMapping();
                    reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
                }
                tm.register(Data.class, dataQName, new DataSerFactory(), new DataDeserFactory());

                msg.output(context);
               
                String msgString = stringWriter.toString();
                System.out.println("Serialized msg:");
                System.out.println(msgString);
               
View Full Code Here


        SOAPFaultElement fault =
                                new SOAPFaultElement(this);
        envelope.addBodyElement(fault);

        envelope.output(context);
    }

    public String toString() {
        return faultString;
    }
View Full Code Here

        if ( currentForm == FORM_SOAPENVELOPE ) {
            StringWriter writer = new StringWriter();
            SOAPEnvelope env = (SOAPEnvelope)currentMessage;
            try {
                env.output(new SerializationContext(writer, getMessage().getMessageContext()));
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
            setCurrentMessage(writer.getBuffer().toString(), FORM_STRING);
View Full Code Here

               
                TypeMappingRegistry reg = context.getTypeMappingRegistry();
               
                reg.addSerializer(Data.class, dataQName, new DataSer());

                msg.output(context);
               
                String msgString = stringWriter.toString();
                System.out.println("Serialized msg:");
                System.out.println(msgString);
               
View Full Code Here

        reg.register(Constants.URI_SOAP12_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);
        } catch (Exception e) {
            fail(e.getMessage());
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

                    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

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.