• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache Axis Exception response question

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When throwing an exception in one of my Axis service methods I notice that there is a detail section in the soap response. This is Axis 1.1 btw and the code looks like this:

which produces output like this:

I don't mind the detail section and I believe it is used for custom object properties, but is there any way to remove the hostname node or control the exception output? In this case I don't want to reveal my server host name.
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I haven't used Axis1, but here are a couple of thoughts in case this is still a problem:

1. Have you considered a custom fault? If not, please check this article.
2. This is the documentation (hopefully applicable to your version, though I am not sure) for the Axis Fault. If you look at the constructors, you can see a couple of them that let you specify the detail element. Construct an Element, and put whatever you like in there, or instead of
you could always wrap your exception in an axis fault:
Please check it out and let us know what works for you! All the best
reply
    Bookmark Topic Watch Topic
  • New Topic