JonyTolengo
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.Protoc ols
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(Conform sTo:=WsiPr ofiles.Bas icProfile1 _1)> _
<System.Web.Script.Service s.ScriptSe rvice()> _
<Global.Microsoft.VisualBa sic.Compil erServices .DesignerG enerated() > _
Public Class DPNetServices
Inherits System.Web.Services.WebSer vice
' Web Services para mobiles
<WebMethod(EnableSession:= True)> _
<ScriptMethod(ResponseForm at:=Respon seFormat.J son)> _
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.ManageMobileUs ers(UsrNmb , UsrPwd)
End Function
End Class
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.Protoc
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(Conform
<System.Web.Script.Service
<Global.Microsoft.VisualBa
Public Class DPNetServices
Inherits System.Web.Services.WebSer
' Web Services para mobiles
<WebMethod(EnableSession:=
<ScriptMethod(ResponseForm
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.ManageMobileUs
End Function
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER