I want to add soap header in response of a soap request. I have googled a lot. What I found is to add handler and define it in module.xml but I have embedded AXIS2 web service in a java web application so I don't have module.xml or axis2.xml. In my project only services.xml is there that is autogenerated by axis2 lib while generating axis2 server side code.
In WSDL, the operation is defined as below:
<operation name="XYZ">
<soap:operation soapAction="SOAP_HTTP#XYZ" />
<input>
<soap:body use="literal" parts="XYZ"
namespace="http://www.ecma-international.org/standards...." />
<soap:header message="wss:header" part="header" use="literal"></soap:header>
</input>
<output>
<soap:body use="literal" parts="XYZResponse"
namespace="http://www.ecma-international.org/standards..." />
<soap:header message="wss:header" part="header" use="literal"></soap:header>
</output>
<fault name="FaultName">
<soap:fault use="literal" name="FaultName"
namespace="http://www.ecma-international.org/standards..." />
</fault>
</operation>
I am able to successfully add SOAPHeader in request and also read headers from Request and response both. But I am not able to add SOAPHeader "header" in SOAP response.
Please provide your suggestions on how can I add soap header in SOAP response?
Thanks.