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.
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
Hey! Wanna see my flashlight? It looks like this tiny ad: