Solved

SoapFault C# web reference

Posted on 2011-03-03
2
463 Views
Last Modified: 2012-05-11
I'm using a C# web reference for a java web service. Java coder says that he knows a way in java how to look for that particular exception...
if (soapException.getMessage().contains("NoIncomeException:"))....

is there a similar way in C# to trap this?
0
Comment
Question by:vivekj2004
  • 2
2 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35030193
Man, I run into the NoIncomeException at my job all the time  ; )


See if this is what you're after:
try
{
    // Call service
}
catch (SoapException ex)
{
    if (ex.Message.Contains("NoIncomeException")
    {

    }
}

Open in new window

0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 35030196
Add another closing paren at line 7  = )
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now