i.LON SmartServer 2.0 Programmer’s Reference
20-13
20.2.2
Instantiating the Web Service Client in Visual C# .NET 2.0
using System;
using System.Collections.Generic;
using System.Text;
namespace CodeExample
{
class iLON_SoapCalls
{
// your SmartServer's Web service reference
static public iLON_WebService _iLON = null;
/// <summary>
/// Instantiates the SmartServer Web service for .NET 2.0
/// </summary>
static public void BindClientToSmartServer(string _iLonEndpointIpAddress)
{
_iLON = new iLON_WebService();
String strOrigUrl = _iLON.Url;
_iLON.Url = strOrigUrl.Replace("localhost", _iLonEndpointIpAddress);
_iLON.messagePropertiesValue = new iLON_SmartServer.messageProperties();
// uncomment the 2 lines below to enable authentication
// _iLON.Credentials = new System.Net.NetworkCredential("ilon", "ilon");
// _iLON.PreAuthenticate = true;
}
}
}
Comments to this Manuals