• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

AXIS2 : Inclusion of Headers into SOAP fault message and changing the namespaces

Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have a query on AXIS2 and this is regarding the inclusion of customized headers into the fault message sent from the service to the client. Please find my queries described below

1. I have a INOUT message receiver in axis2 server side and now am able to send in requests with headers and after processing the same, the service is able to respond back with the same header and with the Success/Failure as response back to the client.
But when there is a SOAP fault being sent on from the service due to the results of some computations,I am not able to send the FAULT response to the client with the same headers included. Kindly let me know how to do this . One way is through a Outflow handler but it cannot add headers with dynamic values every time(picking from the request that came in),I had to look for a different approach. Below is the request response model happening

Request :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<value1> val1 </value1>
<value2> val1</value2>
<arg1>this is a value </arg1>
<arg2>this is second value </arg2>

Success response :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<value1> val1 </value1>
<value2> val1</value2>
<result> success </result>

Inevent of faults instead of the usual fault response,it should include the headers which should look like the following

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<value1> val1 </value1>
<value2> val1</value2>

<axis2ns2:SDFException xmlns:axis2ns2="http://telstra.com/sdfcore/bsc/baseSchema/v1_0">
<description>Sorry service denied</description>


2. As you can see axis2 adds its own namespaces ( xmlns:axis2ns2) and I want to customize like xmlns:response.

Thanks in advance.. I kindly request any of you to help me with this problem.


money grubbing section goes here:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic