Oracle WebLogic Server (WLS) Web Services Support Patterns: Issues with Using Custom Faults or User-defined Exceptions
(Doc ID 761142.1)
Last updated on MAY 09, 2024
Applies to:
Oracle WebLogic Server - Version 6.1 to 8.1 Information in this document applies to any platform.
Purpose
NOTE: The WebLogic Server names and port numbers; WebService application/package/schema names; other attributes used in this article represent a fictitious sample names that made up as example. Any similarity to actual code, is purely coincidental and not intended in any other manner.
Problem Description
When a WSDL contains wsdl:fault which refers to a complexType such as:
you would see the following behavior while generating web services from this WSDL using WLS:
The method(s) in the generated service do not throw the associated exception
Upon throwing the above exception from the server-side, the soap message on the wire will be referring to this exception has having a primitive type instead of being the MyException type
Generating the client stubs/proxies via clientgen doesn't generate the proper implementation of the exception
Conversely, similar issues are encountered when generating a web service from a java application which throws user-defined exceptions.
Problem Troubleshooting
Please note that not all of the following items would need to be done. Some issues can be solved by only following a few of the items.
Troubleshooting Steps
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!