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 478263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:40:27+00:00 2026-05-13T00:40:27+00:00

I throw a few soap exceptions in my web service successfully. I would like

  • 0

I throw a few soap exceptions in my web service successfully. I would like to catch the exceptions and access the string and ClientFaultCode that are called with the exception. Here is an example of one of my exceptions in the web service:

throw new SoapException("You lose the game.", SoapException.ClientFaultCode);

In my client, I try to run the method from the web service that may throw an exception, and I catch it. The problem is that my catch blocks don’t do anything. See this example:

try
{
     service.StartGame();
}
catch
{
     // missing code goes here
}

How can I access the string and ClientFaultCode that are called with the thrown exception?

  • 1 1 Answer
  • 1 View
  • 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-05-13T00:40:27+00:00Added an answer on May 13, 2026 at 12:40 am

    Catch the SoapException instance. That way you can access its information:

    try {
         service.StartGame();
    } catch (SoapException e)  {
        // The variable 'e' can access the exception's information.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to catch an exception an tell if it was me that
A few of my methods in Java throw exceptions such as NoSuchElementException, IllegalArgumentException, etc.
std::exception requires that its constructor be throw() . Yet std::runtime_error accepts a std::string as
In Java, I have a class with a few methods that throw the same
If I would like to support the retrieval of few types from a database
I want to throw an exception in my constructor so that I don't have
I havea few questions regarding exceptions in java: What is java exception? Is an
I have a few classes that read from very delicate tables, which is why
I've read a few other posts like this one about avoiding repetition in Java
Well I have a few questions and I like to make sure I am

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.