• 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

Basic SOAP fault question

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My web service will be returning a generic SOAP fault (soap:Fault) when there is an XML validation error.

Do I need to define this fault in the WSDL for my service?

Or is it just understood that a generic SOAP fault could be a response to a SOAP web service request?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
The WS-I Basic Profile does not mandate (using SHOULD, not MUST) that all faults are declared:
http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Enumeration_of_Faults

Warning: Here follows unsolicited advice on faults:
However, since you already know under what circumstances you want to return a fault, returning a custom fault, which also is declared in the WSDL, would be a courtesy to clients having only a WSDL to refer to. I would want to compare it to throwing a Throwable exception when a method receives an illegal parameter, when a IllegalArgumentException would be more informative to clients.
Best wishes!
reply
    Bookmark Topic Watch Topic
  • New Topic