"Sathyaish" <> wrote in message
news: oups.com...
> I've written a Web Service that has main service class. Let's call the
> main class that exposes the service interface as Service1.
>
....
> I insert a breakpoint at the following line
>
> //call the default constructor
> TheAliasOfTheWebReference.Service1.BusinessObject bo = new
> TheAliasOfTheWebReference.Service1.BusinessObject( );
>
>
> in the test project.
>
>
> I expect it to step through the source code in my service. It doesn't.
> And it still throws the object instance set to nothing exception.
>
>
Hi Sathyaish,
The reason that you have object not set to instance exception is that the
object on the client side does not instantiate the same constructor that you
have defined at the service. The definition of your class goes to the client
only by the means of WSDL description. Hence no methods or code are
delivered to the client side. That makes pretty much sense since the goal of
web services is to provide interoperable way for communication. After all
there is no way to execute C# code on JVM. You need to have common
initialization class available to both projects, if you want to reuse the
code.
Regards,
--
Martin Kulov
http://www.codeattest.com/blogs/martin
MCAD Charter Member
MCSD.NET Early Achiever
MCSD