Link to home
Start Free TrialLog in
Avatar of JonyTolengo
JonyTolengoFlag for Argentina

asked on

How to write a Web Service (REST Web Service) ?

Hi,

As you can see in the attached code this is a WSDL SOAP service.

In "IOS 5", and others mobile environments, the best option is to use a "REST" style service, where the queries are made directly to a URL, and not by a WSDL descriptor.

In this case, the Web Service is returning the contents in JSON format but are wrapped in an XML structure, which IOS and other mobile devices is more difficult to interpret.

What changes I must to do in this web service in order to become a  "REST" web service?

Someone could made the changes for me, please?

I have not idea about how is a REST web service.

Thanks in advance,

Jonny.

This is my WSDL SOAP web service.

Imports My
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
Imports System.Xml
Imports System.Data
Imports System.IO
Imports System.Windows.Forms
Imports Microsoft.AnalysisServices
Imports Utilities.Utilities
Imports System.Diagnostics

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<System.Web.Script.Services.ScriptService()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class DPNetServices
Inherits System.Web.Services.WebService

' Web Services para mobiles

 <WebMethod(EnableSession:=True)> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
Public Function ManageMobileUsers(ByVal UsrNmb As String, ByVal UsrPwd As String, ByVal Release As String) As String

' This function return a JSON text

Return appm.DBProc.ManageMobileUsers(UsrNmb, UsrPwd)

End Function

End Class
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JonyTolengo

ASKER

Thanks so much