Echelon i.LON SmartServer Technical Information Page 345

  • Download
  • Add to my manuals
  • Print
  • Page
    / 443
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 344
i.LON SmartServer 2.0 Programmer’s Reference
20-23
7. Write the code for web service. You can simply copy and paste the following code snippet into
the public class Service1 : System.Web.Services.WebService.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using iLon100e4;
using Microsoft.Web.Services2;
namespace WebBinder
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the
//following line:
// [System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService, IILON100soap11Binding
{
private messageProperties _messagePropertiesValue = null;
public messageProperties messagePropertiesValue {
get;
set;
}
/// <remarks/>
public Item_Coll List(E_xSelect iLonItem) {
return null;
}
/// <remarks/>
public Item_CfgColl Get(Item_Coll iLonItem) {
return null;
}
/// <remarks/>
public Item_Coll Set(Item_CfgColl iLonItem) {
return null;
}
/// <remarks/>
public void Delete(ref Item_Coll iLonItem) {
}
/// <remarks/>
public Item_DataColl Read(Item_Coll iLonItem) {
return null;
}
/// <remarks/>
public Item_Coll Write(Item_DataColl iLonItem) {
System.Diagnostics.Trace.WriteLine("Got message from : " +
messagePropertiesValue.UCPTipAddress);
#region just for debugging, not needed as system throws exceptions anyway
// are the expected object existing ?
if ((null == iLonItem) || (null == iLonItem.Item[0])) {
System.Diagnostics.Trace.WriteLine("ERROR, Null object");
throw new System.NullReferenceException();
}
#endregion
Page view 344
1 2 ... 340 341 342 343 344 345 346 347 348 349 350 ... 442 443

Comments to this Manuals

No comments