Hosting a wcf application and accessing it from an Android device, how to do this? -


how host wcf application in iis , access android device json? need host wcf application in iis , access through android device, how can done?

there many tutorials .. putting down list of tutorials ..

1)http://romenlaw.blogspot.in/2008/08/consuming-web-services-from-android.html

2)http://www.kevingao.net/wcf-java-interop

some code snippets stackoverflow answers

[servicecontract(namespace="http://mycompany.com/loginservice")] public interface iloginservice {     [operationcontract]     string login(string username, string password); } implementation of service this:  public class loginservice : iloginservice {     public string login(string username, string password)     {         // username, password get/create sessionid         string sessionid = "12345678";          return sessionid;     } } can host windows service using servicehost, or can host in iis normal asp.net web (service) application. there lot of tutorials out there both of these.  wcf service config might this:  <?xml version="1.0" encoding="utf-8" ?> <configuration>       <system.servicemodel>         <behaviors>             <servicebehaviors>                 <behavior name="loginservicebehavior">                     <servicemetadata />                 </behavior>             </servicebehaviors>         </behaviors>          <services>             <service name="wcftest.loginservice"                      behaviorconfiguration="loginservicebehavior" >                 <host>                     <baseaddresses>                         <add baseaddress="http://somesite.com:55555/loginservice/" />                     </baseaddresses>                 </host>                 <endpoint name="loginservice"                           address=""                           binding="basichttpbinding"                           contract="wcftest.iloginservice" />                  <endpoint name="loginservicemex"                           address="mex"                           binding="mexhttpbinding"                           contract="imetadataexchange" />             </service>         </services>     </system.servicemodel> </configuration>  

courtesy : how consume wcf service android

also on code project there nice tutorial

http://www.codeproject.com/articles/358867/wcf-and-android-part-i

if done wcf part above link not useful you, next part pretty useful

http://www.codeproject.com/articles/361107/wcf-and-android-part-ii


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -