I have WebService1. Class "MapObject" declared in WebService1's solution.
[WebMethod]
public void GetRoute(MapObject from, MapObject to)
{
// Something here
return;
}
WebService2 is using methods of WebService1. Also, WebService2 has method
[WebMethod]
public void TestMethod(MapObject obj)
{
/// something here
}
But when I try to call TestMethod I recieve
System.IndexOutOfRangeException: Индекс находился вне границ массива. в System.Web.Services.Protocols.HttpServerType..ctor(Type type) в System.Web.Services.Protocols.HttpServerProtocol.Initialize() в System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
This is because MapObject can not be serialized, but I can not understand why. I would like to know how I can solve this problem, if I need to use types of WebService1 in methods of WebService2.