• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

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

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/">
<soapenv:Header>
<value1> val1 </value1>
<value2> val1</value2>
</soapenv:Header>
<soapBody>
<arg1>this is a value </arg1>
<arg2>this is second value </arg2>
</soapBody>
</soaEnvelope>

Success response :

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

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/">
<soapenv:Header>
<value1> val1 </value1>
<value2> val1</value2>
</soapenv:Header>

<soapenv:Body>
<soapenv:Fault>
<faultcode/>
<faultstring/>
<detail>
<axis2ns2:SDFException xmlns:axis2ns2="http://telstra.com/sdfcore/bsc/baseSchema/v1_0">
<code>2080100</code>
<description>Sorry service denied</description>

</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>


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.


Cheers,
Raghav.

 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic