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 Andrew Martin <am...@regenstrief.org> on 2007/08/13 13:56:42 UTC

[Axis2]Add SOAP header elements in synchronous response

I have a service with this in the services.xml:
<service name="Service" scope="application">
  <parameter name="ServiceClass">org.regenstrief.service.Service</parameter>
  <operation name="handle">
    <messageReceiver
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
  </operation>
</service>

It invokes this in my Java:
public OMElement handle(OMElement element)

How can I add elements to the response message's SOAP header?
-- 
Andrew Martin
Computer Programmer
Regenstrief Institute, Inc.
410 West 10th Street, Suite 2000
Indianapolis, IN 46202-3012
Phone: (317) 423-5542
Fax: (317) 423-5695
amartin@regenstrief.org


Confidentiality Notice: The contents of this message and any files
transmitted with it may contain confidential and/or privileged
information and are intended solely for the use of the named
addressee(s). Additionally, the information contained herein may have
been disclosed to you from medical records with confidentiality
protected by federal and state laws. Federal regulations and State laws
prohibit you from making further disclosure of such information without
the specific written consent of the person to whom the information
pertains or as otherwise permitted by such regulations. A general
authorization for the release of medical or other information is not
sufficient for this purpose.

If you have received this message in error, please notify the sender by
return e-mail and delete the original message. Any retention,
disclosure, copying, distribution or use of this information by anyone
other than the intended recipient is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2]Add SOAP header elements in synchronous response

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi Andrew ,
Even in Axis2 1.3 you do not have a way to add SOAP headers at the
Message receiver level. To solve the issue you have two options
 - Write your own Message receiver , which is very simple (at the header
by your MR).
 - Write a handler to add the required SOAP headers
> I have a service with this in the services.xml:
> <service name="Service" scope="application">
>   <parameter name="ServiceClass">org.regenstrief.service.Service</parameter>
>   <operation name="handle">
>     <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>   </operation>
> </service>
>
> It invokes this in my Java:
> public OMElement handle(OMElement element)
>
> How can I add elements to the response message's SOAP header?
>   
Thanks
Deepal


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org