Solved

SoapFault C# web reference

Posted on 2011-03-03
2
491 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 75

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 75

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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