Hi all,
The Axis serialization framework is
not tightly controlled to be part of the SOAP envelope
only.
I have tested it using the codes below
MessageContext msgContext0 = new MessageContext(new AxisServer());
Writer stringWriter = new StringWriter(); SerializationContext context0 = new SerializationContextImpl(stringWriter0, msgContext0); QName qq0=instance of java bean.getClass().getTypeDesc().getXmlType(); BeanSerializer theBeanSe=(BeanSerializer)a Java bean instance.getClass().getSerializer("", instance of java bean.getClass(),qq0); theBeanSe.serialize(qq0,null, instance of java bean ,context0); stringWriter0.close(); String s=stringWriter.toString(); System.out.println(s);
But I can't get the SoapEnvelope
using context0
getCurrentMessage().getSoapEnvelop(). It is
null.
Could you kindly to
tell me how to get the SOAP Envelope before it is being sent out?
Thanks ^_^
/XuLiujuan
|