Chapter 9 .NET Client Support


Server setup

The server setup requires EAServer version 4.1.2 or later and WST:

  1. Start EAServer.
  2. Use jagtool to deploy and install the dotNETSample.jar file to EAServer. dotNETSample.jar contains the package and component from which you create a Web service. The following batch file sets the variables and contains the commands to deploy the dotNETSample.jar EJB JAR file and restart the server, which is required for EAServer to recognize the newly deployed JAR file.

    Windows batch file, setenv.bat:

    set JAGUAR=d:\jag41
    set  WST=%JAGUAR%\webservices
    set  JAG_HOST=localhost
    set IIOP_PORT=9000
    set  HTTP_PORT=8080
    %JAGUAR%\bin\jagtool  deploy -type ejbjar dotNetTest.jar
    %JAGUAR%\bin\jagtool  restart
    
    


    UNIX C shell file, setenv.sh:

    setenv JAGUAR /work/jag41
    setenv  WST $JAGUAR/Webservices
    setenv JAG_HOST  localhost
    setenv IIOP_PORT 9000
    setenv  HTTP_PORT 8080
    $JAGUAR/bin/jagtool  deploy -type ejbjar dotNetTest.jar
    $JAGUAR/bin/jagtool  restart
    
    


    where JAGUAR is the location of your EAServer installation, WST is the location of your Web Services Toolkit installation, JAG_HOST identifies the host machine where EAServer resides (verify this setting from Jaguar Manager), IIOP_PORT is the default EAServer IIOP port, and HTTP_PORT is the default EAServer HTTP port.

    You can verify that the JAR file has been successfully deployed from Jaguar Manager by viewing the Packages folder. You should see a dotNETSample package that contains the Greeting component.
  3. Run the following wstool command or batch file from the WST directory to create the WSDL document and Web service that exposes the sayHello method. Use the same variable values as you did when you deployed the dotNETSample.jar file.

    Windows batch file, genWSDL.bat:

    %WST%\wstool  -host %JAG_HOST% -port %IIOP_PORT% gen_wsdl   -tns http://www.com.sybase.webservices -DefName  DotNETSample -soapaddr http://%JAG_HOST%:%HTTP_PORT%/WEBSERVICES/SOAP  Package:dotNETSample Component:dotNETSample/Greeting Method:dotNETSample/Greeting/sayHello
    


    UNIX C shell file, genWSDL.sh:

    $WST\wstool -host $JAG_HOST  -port $IIOP_PORT gen_wsdl  -tns http://www.com.sybase.webservices  -DefName DotNETSample -soapaddr http://$JAG_HOST:$HTTP_PORT/WEBSERVICES/SOAP  Package:dotNETSample Component:dotNETSample/Greeting Method:dotNETSample/Greeting/sayHello
    


    where:

  4. You can verify that the DotNETSample WSDL document, and the sayHello Web service have been successfully created from the WST GUI by viewing the WSDL document folder and its contents.

    This step creates the DotNETSample.wsdl interface file and DotNETSampleImpl.wsdl implementation file in the work/wsdl subdirectory of your WST installation. Copy these files to the .NET client machine, where they are used to create the client proxy and the client executable program.

Note   You can use the WST GUI instead of wstool to create the WSDL document and add a Web service.

 


Copyright © 2002 Sybase, Inc. All rights reserved.