• 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

Problem with Custom Exceptions in my Axis webservice

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been trying to get a custom exception from my web service but haven't been able to do so in the client.
I am using IBM RAD to generate the webservice wsdl and using this WSDL to generate the test client.

On the server side I have the following
1. My Custom exception class

2. And am throwing this exception as follows


On the client Side
I am unable to retrieve this BSPCustomException class. It comes as an AxisFault.


The result of the above in the console is as follows


How can i get the custom exception in the test client. The BSPCustomException is coming in the faultString and also the getCause is null.
It should have been straight forward, Is there something i am missing ?

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Madhu,

I have not worked on Axis, but just curious to know, if you do not have the Custom exception class generated when you created the artifacts from WSDL. Have you tried using that exception on client side, instead of AxisFault.
 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Madhup,

If you have your web service operation throwing business exception, then it would come as checked exception on the client. From you code, it seems like your business exception is not being thrown from web service interface's method. Can you post your WSDL to see how the interface is defined?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic