You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Quintas, Peter" <Pe...@divine.com> on 2001/09/01 05:20:53 UTC

Confused Envelope State

i am getting the envelope into a wierd state when using the
setNamespaceURI() method on the body... 1) the change to the namespace
is not reflected when serializing out (so I set the dirty flags) and 2)
if the dirty flags are set the parameters are not serialized out
(because they have not deserialized yet)...  has anyone experienced
similar behavior???
 
the following code is my work-around...
 
 public static Message changeNS(Message message, String nsString) throws
Exception{
   SOAPEnvelope env = message.getAsSOAPEnvelope();
   SOAPBodyElement body = env.getFirstBody();
   body.setNamespaceURI(nsString);
   ((RPCElement) body).getParams(); //tickle so that it deserializes
first
   body.setDirty(true); //setDirty so that it serializes correctly
   env.setDirty(true); //setDirty
   return new Message(env);
 }
 
look familiar???
(im trying to recreate a stand-alone test case to replicate the bug)
 
thanks,
q