Lor

Lor

  • NA
  • 85
  • 0

Instance of a class without the namespace

Jun 4 2008 11:38 AM

Hi!! I have what appears to be a simple problem, but it's actually messing up my web service :(

Here's the thing:

My Web Service is a validator, that calls other web services depending on what the client wants to validate. I have a common class (inside a dll) called clsResult, and it's namespace is nResult. That class has attributes such as code of error if there is one, description, result value and so on.
The web services call returns an object that contains this class (because I found no other way).

The thing is, I don't know if it is a VS2005 thing or if I'm doing something wrong, but the object the validator returns is a clsResult and in the web service, an instance of that class is considered a nResult.clsResult and not a clsResult. So when I try to cast the object as a clsResult, the web service is trying to cast it to a nResult.clsResult, and because the object was sent as clsResult, it won't cast it and throw an error.

I've tried changing EVERY instance to nResult.clsResult but the object is still passing as just clsResult, and I can't cast it in the web service.

Is there anyway i can instance a class without the namespace? i mean, just taken as a clsResult and not a nResult.clsResult inside de web service...

Any ideas?

Thanks