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

JonyTolengo
JonyTolengo used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:

Author

Commented:
Thanks so much

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial