1

I have to make communication between asp.net application & android application to send and recieve data between desktop application & mobile application. My asp.net webservices data is:

    Service1

The following operations are supported. For a formal definition, please review the Service Description.

AddNewResource
AddNewTask
Delete
DeleteTask
DeletedResources
DeletedTasks
GetResourceForEdit
GetResources
GetTaskForEdit
GetTaskList
GetTaskListByResource
RestoreResource
RestoreTask
SetTaskProgress
SetTaskStatus
TaskReport
Update
UpdateTask
This web service is using http://tempuri.org/ as its default namespace.

Recommendation: Change the default namespace before the XML Web service is made public.

and the detail of webservices are:

    **AddNewResource**

Test

The test form is only available for requests from the local machine.
SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /ProjectManagementServices/service1.asmx HTTP/1.1
Host: 184.180.25.240
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/AddNewResource"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AddNewResource xmlns="http://tempuri.org/">
      <resourceName>string</resourceName>
      <resourceEmail>string</resourceEmail>
      <backupResource1>string</backupResource1>
      <backupResource2>string</backupResource2>
    </AddNewResource>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <AddNewResourceResponse xmlns="http://tempuri.org/">
      <AddNewResourceResult>boolean</AddNewResourceResult>
    </AddNewResourceResponse>
  </soap:Body>
</soap:Envelope>
SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /DGSProjectManagementws/service1.asmx HTTP/1.1
Host: 184.180.25.240
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AddNewResource xmlns="http://tempuri.org/">
      <resourceName>string</resourceName>
      <resourceEmail>string</resourceEmail>
      <backupResource1>string</backupResource1>
      <backupResource2>string</backupResource2>
    </AddNewResource>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AddNewResourceResponse xmlns="http://tempuri.org/">
      <AddNewResourceResult>boolean</AddNewResourceResult>
    </AddNewResourceResponse>
  </soap12:Body>
</soap12:Envelope>

How can I write webservice in android to send and recieve data between asp.net & android application.

I have google alot but not get the relevent tutorial and guidance.

Kindly guide

Khusho
  • 25
  • 1
  • 1
  • 5
  • u can write xml script and parse it via ksoap library – KOTIOS Nov 12 '13 at 06:07
  • Can u suggest me any tutorial for parsing and writing xml script bcz I am a new developer. Thanks – Khusho Nov 12 '13 at 06:11
  • http://stackoverflow.com/questions/15600906/creating-web-service-for-android-application – KOTIOS Nov 12 '13 at 06:13
  • http://www.codeproject.com/Articles/45275/Create-a-JSON-WebService-in-ASP-NET-2-0-with-a-jQu – KOTIOS Nov 12 '13 at 06:14
  • Try this tutorial this might be helpful[Restful API for android](http://www.tutecentral.com/restful-api-for-android-part-1/) –  Mar 12 '14 at 14:31
  • Check this tutorial http://programmerguru.com/android-tutorial/android-restful-webservice-tutorial-how-to-call-restful-webservice-in-android-part-3/ – LittleGirl Nov 12 '14 at 18:34

1 Answers1

2

you can check the following link that have an example how can use Soap Webservices in android application:

Android Soap Webservice example

Mohammed Saleem
  • 568
  • 5
  • 20