Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7977025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:04:28+00:00 2026-06-04T09:04:28+00:00

Suppose I have such exceptions hierarchy: public class A extends RuntimeException { … }

  • 0

Suppose I have such exceptions hierarchy:

public class A extends RuntimeException {
...
}

public class B extends A {
...
}

In the web service interface there is a method:

public void aa() throws A;

Implementation of this method can throw either exception A or exception B, but while deploying to tomcat cxf publishes wsdl only with A exception declaration.

I have tried to use @XmlRootElement on both classes, @XmlType on both classes, @XmlRootElement on parent class, @XmlRootElement with @XmlSeeAlso on parent class, but published wsdl doesn’t have B exception declaration. Also I have written a test that uses that wsdl and test gets only A exception however I’ve emulated both types of exceptions. How can I get child exception in wsdl declaration?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:04:30+00:00Added an answer on June 4, 2026 at 9:04 am

    I think you need to list both A and B as possible exceptions thrown from aa, otherwise jaxb has no means to know that you might throw exceptions of derived classes. Try:

    public void aa() throws A, B;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have such a template class: template <class T> class Queue { public:
Suppose I'm implementing an MVP pattern and I have a view interface as such:
Suppose I have: public class foobar { public int lorem; public int ipsum; }
I have this code that's supposed to unzipp a file. public class dec extends
Suppose I have a system where I have metadata such as: table: ====== key
Suppose I have an IEnumerable such as a List(TValue) and I want to keep
Suppose I have a recarray such as the following: import numpy as np #
Suppose I have code that maintains a parent/children structure. In such a structure I
Suppose I have a structure in C or C++, such as: struct ConfigurableElement {
I have a requirement such that my program is suppose to run for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.