I’ve got ServiceStack working nicely on the server and with a Windows test client, and now need to get it working in my Mono For Android application.
I’ve downloaded the following:
-
ServiceStack.Common.dll
-
ServiceStack.Interfaces.dll
-
ServiceStack.Text.dll
from the github tip, and added references to these in my Mono for Android project.
However, we need to use authentication, so need the ServiceStack.ServiceInterface.Web namespace to be available for the client, so I can do the following:
var c = new JsonServiceClient("http://localhost:53434");
var authResponse = c.Get(new Auth { UserName = "myusername", Password = "password", RememberMe = true });
Looking at my working test client, Auth is defined in ServiceStack.ServiceInterface.dll, so presumably I need to get hold of this DLL, or its source and compile it in my project.
Am I on the right lines here, or is there a simpler way to set things up? I’ve searched around but can’t find a good resource on how to use ServiceStack with Mono For Android – if there is one, please feel free to point me to it!
I note this StackOverflow indicates I’m on the right lines – all I might need is ServiceStack.ServiceInterface.dll compiled for Mono For Android.
James
You shouldn’t have to compile the server
ServiceStack.ServiceInterface.dllfor use in any client library as there is a copy of the Auth DTOs is also available in theServiceStack.Common.dllclient library at ServiceStack.Common.ServiceClient.Web.AuthDtos.cs.This is possible since both server and client DTOs generate the same wireformat.