Is it Possible to Send Data to XMl Web Service hosted on a Local PC from Android App?

StackOverflow https://stackoverflow.com/questions/22869617

  •  27-06-2023
  •  | 
  •  

سؤال

I am sending data from Android java App using ksoap envelope that i wrote, the problem is when executing the code, it hits the web service on my local PC but the data received is nothing.

هل كانت مفيدة؟

المحلول

I am answering this for others to benefit from. Solution Steps: 1. Copy the wsdl service description and save it into a .xml file. 2. Go to this website easy wsdl generator and generate java classes. 3. Go to the .zip folder that you get from step 2. 4. Copy the .jar file from the libs folder and paste it into the libs folder in your Android app. 4. Copy the .java files from src and paste them into Android package in src folder. 5. Go to ServiceSoap.java and ServiceSoap12.java and change the localhost to your PC static IP address. 5. Go to the main activity in your Android Project. 6. Use AsyncTask class and call the method you need. 7. Add internet Permission to your AndroidMainfest file.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top