473,385 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Soap call not protected with a try..catch?

This little bugger of a problem took us most of the day to track down
but I'm glad it happened as I would like to know why the WSDL generated
code that operates inside of a try..catch block throws an exception to
the screen when it craps out instead of being caught by the try..catch
block.

Basically, from inside of VS 2003 I added the reference to the web
service using a shared .dll to pass a class reference between the
client/server. Someone along the way changed the XmlRoot element name
of the clients soap class and this was causing the soap call to fail
with a "instance of an object not recognized..." error.

That I dont mind, fine, someone (we know who) changed the name but what
gets me is I added a set of try...catch blocks not only in my code
segment where I call the soap process but *also* in the WSDL code yet
the app was dumping to the desktop with a .net exception.

How would the soap call jump out of the try..catch block that it's in to
drop to the desktop with an exception error?

eg.

somecode()
{
soap call = new soap();
try { call.mycall(); } catch { whatever(); }
}

wsdl code

Around the web service method's generated call(), begincall() and
endcall() I have try{}..catch{} blocks.

The only thing I can think is the catch{}, in the wsdl code is empty but
still, why drop out of the app because of that?
Nov 16 '05 #1
2 2212
Not sure what is happening with your request. To be sure, I wrote a simple
Web Service that that just throws an exception. In the client app I wrote:
try
{
localhost.Service1 s = new localhost.Service1();
s.HelloWorld();
}
catch
{
Console.WriteLine("Hello from exception");
}

The exception was caught as expected. I then changed the name of the Web
service method. Again the exception was caught.

Emtpy or not, the exception was caught.

--

Chris Rolon

"Greg Merideth" <be*****@forwardtechnology.net> wrote in message
news:uK********************@comcast.com...
This little bugger of a problem took us most of the day to track down
but I'm glad it happened as I would like to know why the WSDL generated
code that operates inside of a try..catch block throws an exception to
the screen when it craps out instead of being caught by the try..catch
block.

Basically, from inside of VS 2003 I added the reference to the web
service using a shared .dll to pass a class reference between the
client/server. Someone along the way changed the XmlRoot element name
of the clients soap class and this was causing the soap call to fail
with a "instance of an object not recognized..." error.

That I dont mind, fine, someone (we know who) changed the name but what
gets me is I added a set of try...catch blocks not only in my code
segment where I call the soap process but *also* in the WSDL code yet
the app was dumping to the desktop with a .net exception.

How would the soap call jump out of the try..catch block that it's in to
drop to the desktop with an exception error?

eg.

somecode()
{
soap call = new soap();
try { call.mycall(); } catch { whatever(); }
}

wsdl code

Around the web service method's generated call(), begincall() and
endcall() I have try{}..catch{} blocks.

The only thing I can think is the catch{}, in the wsdl code is empty but
still, why drop out of the app because of that?

Nov 16 '05 #2
Yeap there's something sinister going on here. I've disected the code a
few ways with the same result. I'll see if I can get an example whipped
up to post.

Chris Rolon wrote:
Not sure what is happening with your request. To be sure, I wrote a simple
Web Service that that just throws an exception. In the client app I wrote:
try
{
localhost.Service1 s = new localhost.Service1();
s.HelloWorld();
}
catch
{
Console.WriteLine("Hello from exception");
}

The exception was caught as expected. I then changed the name of the Web
service method. Again the exception was caught.

Emtpy or not, the exception was caught.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mirek | last post by:
Hello people, my SOAP client in C# generates this SOAP call <?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"...
0
by: AJ | last post by:
I get following error when I make a SOAP call, msxml3.dll error '8000000a' The data necessary to complete this operation is not yet available.
3
by: Steve Alpert | last post by:
I'm trying to see what basic authentication will do in a SOAP call through a class created in C# by the wsdl tool. WSDLTest wt = new WSDLTest(); // my SOAP class wt.Credentials = new...
0
by: DoctorV3774 | last post by:
We are not able to get the WSDL to return Class modules for developing a SOAP Call. We can successfully hit Test WSDL Files, but not this one. How do we troubleshoot? Basically we want to make...
0
by: anupamak | last post by:
Hello everybody, I have gone through lot many articles regarding the SOAP in webServices. I did many applications in the windows service in .net2005. Now my new requirement is to create a new...
1
by: Philluminati | last post by:
I've had a nightmare at work. I have a simple app makes a simple SOAP call to a webservice. It all worked fine but when we tried to deploy it on the live site there appears to be some version...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
6
by: JDeats | last post by:
I'm in a situation where it's difficult to get on-site and troubleshoot, so I'm looking for scenarios from those experienced on what might be causing this problem. I have a .NET 2.0 WinForms...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.