First try to declare StringBuffer:
StringBuffer stringBufferReq = new StringBuffer();
StringBuffer stringBufferRes = new StringBuffer();

Second, use st.getRequestCopy().toString() and st.getResponseCopy().toString()
to get outgoing and incoming SOAP messages after invoke() call.


It should work.

Regards,

-Daniel


francesco emmi wrote:


Hi all,

I 've just read some mails about the usage of setRequstCopy and
setResponseCopy for displaying SOAP incoming and outgoing.

I've downloaded the last nightly version of SOAP_2.3.1 from
http://cvs.apache.org/dist/soap/nightly/


and this is the peace of code i'm using:


SOAPHTTPConnection st = new SOAPHTTPConnection();
             StringBuffer stringBufferReq = null;
             StringBuffer stringBufferRes = null;
             st.setRequestCopy(stringBufferReq);
             st.setResponseCopy(stringBufferRes);

call.setSOAPTransport(st);

response = call.invoke(url, "");

System.out.println(stringBufferReq );


But buffers seem like to be empty!


Maybe are there some bugs in the two methods?
Or I'm do something wrong in my code?


Thanks in advance


Francesco Emmi














Reply via email to