August 4, 2002 - Creating a dll for IsPrime | WebReference

August 4, 2002 - Creating a dll for IsPrime

Yehuda Shiran August 4, 2002
Creating a dll for IsPrime
Tips: August 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

The second step in creating a proxy for a Web service (see yesterday's tip for the first one) is compiling it into a binary library, a .dll file. The executable you need to use is jsc.exe. When you installed the .NET framework, the path to jsc.exe should have been added in your path. Type jsc at the Command Prompt window and see that you get the help file for this command. Now, type the command with its proper parameters:

  jsc /t:library /out:bin\sampleProxy.dll sampleProxy.js
where the argument of the command is the JScript .NET code which is created by the wsdl command. The other switches are:

/t:library specifies that a library should be created, as opposed to an executable.
  • /out: specifies where the .dll file should be saved. You must put it in a directory named bin, under the current directory you are working in now. Our example creates bin\sampleProxy.dll.

    Here is the Command Prompt window showing the echo of the wsdl and jsc commands, one after the other:

    To learn more about JScript .NET and ASP.NET, go to Column 114, JScript .NET, Part VIII: Consuming IsPrime from ASP.NET.