Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 515
  • Last Modified:

SoapFault C# web reference

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
vivekj2004
Asked:
vivekj2004
  • 2
1 Solution
 
käµfm³d 👽Commented:
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
 
käµfm³d 👽Commented:
Add another closing paren at line 7  = )
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now