Reputation: 121
I'm getting an "Unspecified error
" when I try to call a particular web-service method. Using XMLSpy I discover that the parameter object just hasn't been serialized.
In the generated serializer source I note the lines:
if (!needType) {
System.Type t = o.GetType();
if (t == typeof(global::moonraker1.Conference)) {
}
else {
throw CreateUnknownTypeException(o);
}
}
However, the wsdl import had created a unit called moonraker1.BookingService
, so the type of the parameter object is actually moonraker1.BookingService.Conference
. It seems entirely possible that this is why the object isn't serialised, although I don't understand why the message still appears to be passed to the web service.
Please can anyone shed any light on this? Or am I on entirely the wrong track?
Upvotes: 12
Views: 537
Reputation: 1258
Now I'm not sure if this is it, but it looks like some .NET code. Maybe the answer is as simple as you need to have a default constructor in your type.
My own experience from serialization in .NET is that most of the time it's just because I have written a custom constructor and then forgot to write a default constructor afterwards..
Upvotes: 1