• 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

unexpected result when throwing SOAPFaultException

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

I find that when I throw a SOAPFaultException from a handler's handleRequest method the request is returned to the client as is, whereas I was expecting the SOAPFaultException to be used to automatically generate a fault repsonse.

If I throw a runtime exception then a fault repsonse is returned.

I've had a search for this and looked at sites like
IBM's Exception Handling with JAX-RPC , but still am none the wiser as to whether what I'm expecting is wrong.

Any ideas ?



I'm using Sun's Application Server 8.2 i.e. SAAJ 1.2 and I think JAX-RPC 1.1
 
michael warren
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to update, I have found this :
https://jax-rpc.dev.java.net/servlets/ReadMsg?listName=users&msgNo=1522

It
is then the responsibility of the current handler (or other handlers in
the chain) to create the SOAP fault



Which suggests that what I assumed was wrong and that when throwing SOAPFaultException from a handler your code also needs to change the body of the response to be a fault, which seems a bit convoluted - whats the point of populating the SOAPFaultException ?
I'm not using latest version of JAX-RPC (or JAX-WS which I think replaces it) as I'm studying for SCDJWS, so perhaps this isn't an issue anymore.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic