
Originally Posted by
jayinthe813
What technology is used to build the web services? Is it available in VS2010?
They run in IIS - so basically it is an ASP.Net project
Look like this
Code:
Option Strict On
Option Explicit On
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
Imports System.Web.Script.Serialization
Imports System.Data
.
.
.
Imports DocumentFormat.OpenXml
Imports DocumentFormat.OpenXml.Packaging
Imports DocumentFormat.OpenXml.Spreadsheet
<WebService(Namespace:="AWCService")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<System.Web.Script.Services.ScriptService()> _
Public Class WebService
Inherits System.Web.Services.WebService
Dim g_prmSP As New Dictionary(Of String, SqlParameter())
Dim fileWrtr As System.IO.StreamWriter
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)> _
Public Function AddService(ByVal toddtype As String, ByVal fromddtype As String, ByVal fromwho As String _
, ByVal choice As Integer _
, ByVal objReturn As Dictionary(Of String, String) _
, ByVal addkey As String _
, ByVal username As String) As String
'Return "<b>This is the content of resource <tt>someResource</tt></b>"
Dim credDB As String = ""
If username.Contains(":") Then
credDB = username.Split(":"c)(0)
username = username.Split(":"c)(1)
End If
Called like this from JS in my case
Code:
$.ajax({
type: "POST",
url: "WebService.asmx/" + strService,
dataType: "json",
data: strWebParam,
contentType: "application/json; charset=utf-8",
success: function(msg) {
fncFinished(msg, sender, objWebParam);
},
failure: function(msg) {
fncFinished(msg, "failure", objWebParam);
},
error: function(msg) {
fncFinished(msg, "error", objWebParam);
}
});