SoapException



I am having difficulty consuming a Web Service from a C# Pocket PC
application. I receive the message:

***
An unhandled exception of type
'System.Web.Services.Protocols.SoapException' occurred in
System.Web.Services.dll

Additional information: Server was unable to process request. --> Object
reference not set to an instance of an object.
***

This is an excerpt from my Web Service (which runs on an ISP and I cannot
remotely debug):

[WebMethod]
public String PutStaticData(DataSet staticDataSet)
{
try
{
// do some SQL Server Stuff

return null;
}
catch (SqlException e)
{
return e.Message.ToString();
}
}
[WebMethod]
public String PutUserData(DataSet userDataSet)
{
try
{
// do some SQL Server Stuff

return null;
}
catch (SqlException e)
{
return e.Message.ToString();
}
catch (SoapException f)
{
return f.Message.ToString();
}
}
*****
C# Pocket PC App -- Code Snippet
function
{
String returnValue=null;
DataSet txnDataSet = new DataSet();

try
{
// Load txnDataSet using SqlDataAdapter
SyncServices.Service1 ss = new SyncServices.Service1();
returnValue = ss.PutUserData(txnDataSet);
***** This call fails with above message *****
}
catch
......
}

function
{
String returnValue=null;
DataSet staticDataSet = new DataSet();

try
{
// Load staticDataSet using SqlDataAdapter
SyncServices.Service1 ss = new SyncServices.Service1();
returnValue = ss.PutStaticData(staticDataSet);
***** This call succeeds *****
}
catch
.....
}

Since the exception is unhandled, and I have a catch statement for this
exception, I am assuming that it never actually gets far enough to execute
my Web Service code.

Any ideas?

--
Message posted via http://www.dotnetmonster.com
.



Relevant Pages

  • Re: Write to IIS/Event Log File ?
    ... >with an exception that might arise, ... >either in the web service, ... >Writting to the event log threw me Security Exceptions, ... NET Framework Class Library: ApplicationActivationAttribute ...
    (microsoft.public.dotnet.general)
  • Re: Soap Faults
    ... The Web Service encodes full server-side exception traces in the ... > I have had absolutely no luck working out how I can deserialize the custom ... > public string serverStackTraceId; ... > public class FdkExceptionEntry ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: Outlook 2007 Mobile Service - GetUserInfo and SendXms input pa
    ... with xmsUser parameter still being null ... Outlook displays the following error message: ... response from the Web service because of a problem connecting to the server. ... public string GetServiceInfo() ...
    (microsoft.public.office.developer.outlook.vba)
  • Re: Problem with Exception Handling using Web Services
    ... private void checkPassword ... The Exception is definitely thrown, but when I run it in a web browser it ... >> Microsoft Visual C#.NET to interact with the web service. ... >> Adrian Burka ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Smart Device App fails calling simple Web Service...
    ... the device or emulator thinks localhost is itself, ... and not the machine where you are running the web service. ... > I am getting the following exception... ... > that succeeded in the web form app]. ...
    (microsoft.public.dotnet.framework.compactframework)