Requirements  Typical output from \Sybase\EAServer\bin\Jaguar.log

Chapter 4: Web Services Templates

Running the sample

StepsUsing the SOAP service bridge sample

This sample uses e-Biz Impact 5.4.5 and EAServer 5.0 or later with Sybase Web Services Toolkit and Eclipse.

NoteEclipse is installed as part of the standard EAServer installation when you install Web Services. To run Eclipse, you must have a complete JDK installation (jdk1.4 or later), which is not installed as part of the standard EAServer installation.

  1. Start and set up EAServer.

    1. Install EAServer 5.0 or later. See the EAServer installation guide for your platform .

    2. In a text editor, modify \Sybase\EAServer\bin\setenv.bat to point to JRE 1.4.2_05 or later; for example:

      REM set JAGUAR_JDK14=D:\Sybase\Shared\jdk1.4.1_03
      
    3. Set the variable JAGUAR_JDK14=D:\Java\j2sdk1.4.2_05.

    4. In a text editor, modify Sybase\eclipse\starteclipse.bat to point to JRE 1.4.2_05 or later; for example:

      rem eclipse -vm "D:\Sybase\Shared\jdk1.4.1_03\jre\bin\java"
      
      eclipse -vm "D:\Java\j2sdk1.4.2_05\jre\bin\java"
      
    5. Start EAServer.

  2. Deploy ImpactHello.java as a Web service using the SOAP engine:

    1. Start Eclipse and connect to EAServer.

      UNIX From the command line in the Shared/eclipse subdirectory, enter:

      ./starteclipse.sh
      

      Windows From the command line in the Shared\eclipse subdirectory, enter:

      starteclipse.bat
      

      or select Start | Run | Programs | Sybase | EAServer 5.0.0 | Eclipse.

    2. In Eclipse, select File | New | Project.

    3. Select Sybase Web Services and click Next.

    4. Enter the project name ImpactHello and click Next.

    5. Click the Libraries tab, then click Add External JARs.

    6. Use Browse to navigate to the \ImpactServer-5_4\classes directory, select ims54rt.jar, then click Open.

    7. Click Finish.

    8. Right-click the new ImpactHello icon in the Package Explorer pane and select Import.

    9. Select File System and click Next.

    10. Use Browse to navigate to the \ImpactServer-5_4\samples\Java\ directory, highlight soapServiceBridge, and click OK.

    11. Select ImpactHello.java and click Finish.

    12. Expand the new default package icon beneath the ImpactHello package icon.

    13. Right-click ImpactHello.java and select Quickly Deploy As A Web Service.

  3. Generate, compile, and test client stubs and artifacts for the SOAP client using the SOAP engine.

    1. Generate client stub artifacts.

      1. In Eclipse, select File | New | Project to create a new project to hold artifacts and the e-Biz Impact DFC/SOAP bridge code.

      2. Select Sybase Web Services and click Next.

      3. Enter the project name ImpactHelloClient and click Finish.

    2. Generate client artifacts.

      1. Click the Sybase Web Services tab at bottom of the Eclipse upper-left pane.

      2. Expand the Web Services icon.

      3. Expand the WS icon.

      4. Right-click ImpactHello and select Create Web Services Client.

      5. Select ImpactHelloClient and click Next.

      6. Leave the package name blank and click Next twice.

      7. Click Finish.

        The ImpactHelloClient project now contains all required SOAP client stubs and artifacts for the ImpactHello service.

    3. Adjust and test the client.

      1. Expand the ImpactHelloClient icon in the Package Explorer pane.

      2. Expand the default package icon.

      3. Open (double-click) the ImpactHello_ServiceTestClient.java test client.

      4. Replace the line “client.main(null);” with:

        System.out.println("Result: " + client.odlHello("Hello from soap client"));
        
      5. Select File | Save.

      6. Select Run | Run As | Java Application. The console should display “Result: Hello from ODL.”

  4. Inspect the logs.





Copyright © 2005. Sybase Inc. All rights reserved. Typical output from \Sybase\EAServer\bin\Jaguar.log

View this book as PDF