You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Mohideen, Khaja (Cognizant)" <Mk...@chn.cognizant.com> on 2003/01/16 11:55:29 UTC
Adding Custom Headers to SOAP response
Hi all,
I have a small problem in adding headers to a SOAP response. I
tried out the following code
Message mess = mc.getCurrentMessage();
SOAPEnvelope se = mess.getSOAPEnvelope();
se.addHeader(new
SOAPHeaderElement("MyNS","RETURNCODE","1"));
mc.setResponseMessage(mess);
This code adds a header to the response message, but the integer value i
am returning from the service is printed as null.I checked the SOAP
response using tcpmon. The integer value is there returned correctly,
but the problem is only when i am printing it.
anybody knows a solution for this(or any other way of adding custom
headers to a SOAP response)?
I am using Apache axis(1.1beta) with Tomcat(4.1.18)..
thanx in advance..
regards,
-Khaja