beautypg.com

Echelon i.LON SmartServer 2.0 User Manual

Page 343

background image

i.LON SmartServer 2.0 Programmer’s Reference

20-21

a. Open a Command Prompt window to the following folder on your computer:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin folder.

b. Enter the following command (in one line):

wsdl.exe /language:CS /serverInterface /protocol:SOAP /n:iLon100e4 /u:<SmartServer user
name
> /p:< SmartServer password> “http://<SmartServer IP
address
>/WSDL/V4.0/iLON100.wsdl” /out: “<output directory>\iLON100proxy.cs”

SmartServer user name is the name used to log on to your SmartServer. This is ilon by
default.

SmartServer password is the password used to log on to your SmartServer. This is ilon
by default.

SmartServer IP address is the IP address of your SmartServer.

output directory is the destination folder on your computer where the proxy class is to be
stored.

The following example demonstrates how to enter a command that stores the proxy class
in a C:/LonWorks/SmartServerProxyClass folder:

wsdl.exe /language:CS /serverInterface /protocol:SOAP /n:iLon100e4 /u:ilon /p:ilon
"http://10.2.124.82/WSDL/V4.0/iLON100.wsdl"
/out:"C:\lonworks\SmartServerProxyClass\iLON100proxy.cs"

Note: /serverInterface is used instead of /server because the /server Server switch has been
deprecated. Using the /serverInterface switch generates an abstract class for an XML web
service implementation using ASP.NET based on the contracts. The default is to generate a
client proxy class.

2. A file called iLON100.cs is generated in the specified destination folder. You will use this file

after you create a new Web service project. You can optionally specify other languages such as
Visual Basic .NET. See the MSDN documentation for more information on this command.

3. Create a new Web service project using ASP .NET Web Service. The sample code below is

written in Visual C# .NET, and uses “WebBinder” as the project name.