Hi,
My question is about WCF service I wrote in C#, and android client which consume it using “REST” protocol.
I am using example from this link:
http://fszlin.blogspot.com/2010/05/comsuming-wcf-services-with-android.html
I am working with visual studio 2010 .net framework 4.
I wrote a simple WCF service and deployed it to IIS on windows 7.
I succeed to access the service from android (10.0.2.2 is localhost when using android emulator):
http://10.0.2.2/WcfAndroid3/VehicleService.svc
It returns HTML test page with “200 OK”.
But when I try to access the function “GetPlates” in the service (or any other function) I get “HTTP/1.1 400 Bad Request”:
http://10.0.2.2/WcfAndroid3/VehicleService.svc/GetPlates
This is my function declaration in my interface:
[OperationContract]
[WebGet(
UriTemplate = "/GetPlates",
BodyStyle = WebMessageBodyStyle.WrappedRequest,
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json)]
IList<string> GetPlates();
How can I know if my functions are accessible from "outside" users using “REST” protocol?
I tried a lot, adding and removing function attributes but I still get the error.
I will appreciate any help with this.
Thanks in advance!