tag:blogger.com,1999:blog-3336649126826495716.post182196943762176206..comments2014-03-09T11:26:51.009-07:00Comments on Android + iPhone: Android Chapter 4 : Web Services in Android (WCF) Part 1Mihiran Rupasinghehttp://www.blogger.com/profile/17630180079645078435noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-3336649126826495716.post-6333770907917349702014-03-09T11:26:51.009-07:002014-03-09T11:26:51.009-07:00Hi Mihiran.
I created in Visual studio 2012 WCF w...Hi Mihiran.<br /><br />I created in Visual studio 2012 WCF web service. but I can't connect to Android. I got error about "XMLpullparserException" . my service localhost adress is "http//..../service.svc" not asmx? What should I do? I used ksoap also.ahmetmelihbasbughttps://www.blogger.com/profile/05209244380707998852noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-12195897797740178532013-08-06T22:35:27.569-07:002013-08-06T22:35:27.569-07:00Hi Mihiran
I want to create the same thing but u...Hi Mihiran <br /><br />I want to create the same thing but using the wcf to connect to android <br />basically a client and server relationship <br />could you post a tutorial for this or how would I go about accomplishing this connection? <br />I have tried other tutorials but they are always hallways<br />I am able to create the wcf in visual studios 2010 ultimate but when I try to link it to Android I always get errors<br /><br /><br />Thanks<br /> Joseh672https://www.blogger.com/profile/16365558736131519835noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-82287424778881397132013-07-11T02:28:18.299-07:002013-07-11T02:28:18.299-07:00thanks, but i didn't find the solution to open...thanks, but i didn't find the solution to open it i find only web.config service.asmx app_Code and app_Data.<br />please can you send me the web service that you used in this tutorial Anonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-56477028428001666662013-07-11T02:21:16.826-07:002013-07-11T02:21:16.826-07:00I think you created a wrong project. It should be ...I think you created a wrong project. It should be ASP.NET Web Service. In VS 2010 we cannot find this option. Are you using VS 2010 or 2008? Anyway use and modify this. http://www.mediafire.com/download/42ugx24bhclgydu/WebSite1.rar<br /><br />please check and tell me whether it works or not. thanks.Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-54537106260116736492013-07-11T02:01:53.485-07:002013-07-11T02:01:53.485-07:00http://www.4shared.com/zip/dLknETpG/WebSite2.html
...http://www.4shared.com/zip/dLknETpG/WebSite2.html<br />i export the webserviceAnonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-81653888480288542172013-07-11T01:55:29.638-07:002013-07-11T01:55:29.638-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-86896090839274026062013-07-11T01:51:19.484-07:002013-07-11T01:51:19.484-07:00You sent me only the solution file. please send me...You sent me only the solution file. please send me the whole project (webservice only)Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-15847376253421468062013-07-11T01:44:30.821-07:002013-07-11T01:44:30.821-07:00Ok I'll check and let you know..Ok I'll check and let you know..Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-79783224225053853962013-07-11T01:37:11.361-07:002013-07-11T01:37:11.361-07:00this the web service maybe i do a mistake :
http:...this the web service maybe i do a mistake :<br />http://www.4shared.com/rar/FZ_Tw8ho/WebSite2.html<br /><br />and my problem is in testing the web services hi didn't give me the id when i put a correct name and password. <br />Anonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-85210663423309782013-07-11T00:50:35.031-07:002013-07-11T00:50:35.031-07:00Another thing.. Did you add your activity to manif...Another thing.. Did you add your activity to manifest file? If not see chapter one >> http://androidplusiphone.blogspot.com/2012/03/android-chapter-1-creating-layouts.html Thanks.Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-21161817042270547162013-07-11T00:47:36.646-07:002013-07-11T00:47:36.646-07:00ok. Change "Source=OUSSAMA-PC" to "...ok. Change "Source=OUSSAMA-PC" to "Source=OUSSAMA-PC\SQLEXPRESS". If you use sql express edition you have to use like this.Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-65182380811588589842013-07-10T08:52:34.988-07:002013-07-10T08:52:34.988-07:00i try to do the same example like you i create my ...i try to do the same example like you i create my database name is SolustionDude located in OUSSAMA-PC\SQLEXPRESS but how can i know my server name.<br />my problem is when i press "invoke" after i put name and password, i didn't have the same result like you in the photo number 9.<br />sorry for my bad English.<br />i thanks a lot for your help.<br />Anonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-23040584613292535802013-07-10T07:00:31.455-07:002013-07-10T07:00:31.455-07:00what is your database name and server name? and pl...what is your database name and server name? and please tell me what you are trying to do? what is invoke button?Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-37068110813960338732013-07-10T06:57:33.206-07:002013-07-10T06:57:33.206-07:00yes it should work..yes it should work..Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-75833774848087399972013-07-10T06:50:06.686-07:002013-07-10T06:50:06.686-07:00when i press invoke i find this
This XML file does...when i press invoke i find this<br />This XML file does not appear to have any style information associated with it. The document tree is shown below.<br /><br /><br /><br />i think that my problem in the connection to the data base<br />maybe in this <br />connectionString="Data Source=OUSSAMA-PC; Initial Catalog=SolutionDude; Trusted_Connecion=true; User ID=;Password=" providerName="System.Data.SqlClientAnonymoushttps://www.blogger.com/profile/07251654621902061727noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-6834722356865685172013-03-21T02:22:35.203-07:002013-03-21T02:22:35.203-07:00Hi Mihirian! Thanks a lot for this tutorial, it wo...Hi Mihirian! Thanks a lot for this tutorial, it works for me.<br />Can I call a SQL procedure or a function with a service like this?<br /><br />Thanks!Unknownhttps://www.blogger.com/profile/15895261946876453638noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-26541161495768281042013-02-11T18:15:28.578-08:002013-02-11T18:15:28.578-08:00Great !Great !Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-44803036773010086202013-02-11T11:50:30.859-08:002013-02-11T11:50:30.859-08:00yeah it worked :D
thanks alot ;)yeah it worked :D <br />thanks alot ;)My Profilehttps://www.blogger.com/profile/08212121351598351922noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-82984784277643910902013-02-11T11:49:31.685-08:002013-02-11T11:49:31.685-08:00This comment has been removed by the author.My Profilehttps://www.blogger.com/profile/08212121351598351922noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-36985184156298420812013-02-05T08:21:33.829-08:002013-02-05T08:21:33.829-08:00I never done it before dude. I think you have to c...I never done it before dude. I think you have to change the "private static final String URL" string..<br />:)Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-50677441408808966312013-02-05T07:20:00.385-08:002013-02-05T07:20:00.385-08:00really a great tutorial bro :) thanks alot
just o...really a great tutorial bro :) thanks alot <br />just one thing i need to know <br />what if i want to use real website to host that webservice instead of local host<br />what should i change in the code ?<br />Thx in advance My Profilehttps://www.blogger.com/profile/08212121351598351922noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-79711278618049577282013-01-15T20:07:24.669-08:002013-01-15T20:07:24.669-08:00according to this line "private static final ...according to this line "private static final String URL="http://10.0.2.2:1147/Websevice/Service.asmx" your port number of the web service should be "1147". please check the port number of your web service. if it is not 1147 please change it to 1147 and run again. set "Use dynamic ports = false" then set the port number. otherwise port number will be changed time to time..<br /><br />for more info refer part 2. (http://androidplusiphone.blogspot.com/2012/03/android-chapter-4-web-services-in_27.html)Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-26120406347544648792013-01-15T07:46:03.771-08:002013-01-15T07:46:03.771-08:00MY jar name is ksoap2.jar
MY jar name is ksoap2.jar<br /> DEEPAK KUMARhttps://www.blogger.com/profile/15901602549346366279noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-34632955181414934092013-01-15T07:03:49.399-08:002013-01-15T07:03:49.399-08:00i made web services and also succesfully run web s...i made web services and also succesfully run web services after i have also made the Android Program but that is not working .<br />so plz help me <br />thanks in advance <br />my code is this in which implemented ksoap jar<br />//<br />package com.example.webservicetest;<br /><br /><br /><br />import org.ksoap2.SoapEnvelope;<br />import org.ksoap2.serialization.SoapObject;<br />import org.ksoap2.serialization.SoapPrimitive;<br />import org.ksoap2.serialization.SoapSerializationEnvelope;<br />import org.ksoap2.transport.HttpTransportSE;<br /><br />import android.os.Bundle;<br />import android.app.Activity;<br />import android.view.Menu;<br />import android.view.View;<br />import android.widget.Button;<br />import android.widget.EditText;<br />import android.widget.TextView;<br /><br />public class MainActivity extends Activity {<br /> EditText name,pass;<br /> TextView tv;<br /> private static final String SOAP_ACTION="http://tempuri.org/memberValidation" ;<br /> private static final String METHOD_NAME="memberValidation";<br /> private static final String NAMESPACE="http://tempuri.org/";<br /> private static final String URL="http://10.0.2.2:1147/Websevice/Service.asmx";<br /> <br /> <br /> @Override<br /> protected void onCreate(Bundle savedInstanceState) {<br /> super.onCreate(savedInstanceState);<br /> setContentView(R.layout.activity_main);<br /> name=(EditText)findViewById(R.id.editText1);<br /> pass=(EditText)findViewById(R.id.editText2);<br /> tv=(TextView) findViewById(R.id.textView1);<br /> }<br />public void onClick(View view)<br />{<br /> SoapObject Request=new SoapObject(NAMESPACE,METHOD_NAME);<br /> Request.addProperty("name",name.getText().toString());<br /> Request.addProperty("password",pass.getText().toString());<br /> SoapSerializationEnvelope sse;<br /> sse=new SoapSerializationEnvelope(SoapEnvelope.VER11); <br /> sse.dotNet=true;<br /> sse.setOutputSoapObject(Request);<br /> HttpTransportSE htp=new HttpTransportSE(URL);<br /> try<br /> {<br /> htp.call(SOAP_ACTION,sse);<br /> SoapPrimitive rs=(SoapPrimitive)sse.getResponse();<br /> tv.setText("Login Successful");<br /> }<br /> catch(Exception e)<br /> {<br /> tv.setText("Login UnSuccessful"); <br /> }<br />}<br /> <br /> <br /> <br />}<br /><br />DEEPAK KUMARhttps://www.blogger.com/profile/15901602549346366279noreply@blogger.comtag:blogger.com,1999:blog-3336649126826495716.post-10189011174301832352012-11-24T19:35:04.914-08:002012-11-24T19:35:04.914-08:00In here, I'm checking the username and passwd ...In here, I'm checking the username and passwd by giving them. Those are not empty. According to my code if the username and passwd are correct then it returns id. (inside "member(username,passwd)" method) <br />Mihiran Rupasinghehttps://www.blogger.com/profile/17630180079645078435noreply@blogger.com