Oracle9i JDeveloper - Hands on Labs (Web Services)

Modeling, Developing, Discovering, and Accessing Web Services

Introduction

This lesson demonstrates how you can visually develop J2EE web services based on Java classes using the UML Class diagrammer. You run the web service in the embedded OC4J application server and generate a client stub to call it, all directly from the UML Class diagram.

The lesson then moves on to show you how you can test your web services at the network packet level. The TCP Packet Monitor tests your web service SOAP requests and responses.

The lesson continues with the publication of a Session Bean as a web service. You then deploy the web service and EJB to a local standalone OC4J application server instance and test it by adding test code to a generated stub.

Web services provide an opportunity for integrating legacy business functionality encapsulated in PL/SQL packages by publishing it as web services. This lesson shows how simple JDeveloper makes it to wrap PL/SQL packages in Java and expose them as web services with no knowledge of PL/SQL and no hand Java coding.

You may want to incorporate web services into a BC4J project. In this lesson you use a web service in a BC4J project. Then you publish a BC4J custom method as a web service.

Tasks

  • Develop and publish a Java class as a web service using a UML Class diagram
  • Run and test the web service in the embedded OC4J
  • Use the TCP Packet Monitor to test the web service at the network packet level
  • Publish an EJB session bean as a web service
  • Deploy the web service (and EJB) to a standalone OC4J instance
  • Publish a PL/SQL package as a web service
  • Use Web Services in a BC4J Application
  • Develop a Web Service from a BC4J Client Method

Prerequisites

Please read the prerequisites and ensure that you have the proper environment to complete this lab.

Develop and Publish a Java Class as a Web Service Using a UML Class Diagram

Create a New Class Diagram

  1. In the System Navigator, open the WebServices workspace node
  2. Select the JavaClassWS project
  3. Context menu: New UML Diagram to open the object gallery
  4. Choose Class Diagram
  5. Name the diagram JavaWS
  6. Accept other defaults
  7. Click OK to create the class diagram

    The Class Diagram modeler window is open and empty

Create a Java Class

  1. Select the Component Palette of the class diagram
  2. Select the Java palette from the drop down list
  3. Select Java Class from the palette
  4. Move to the diagram and click to create a class in the empty diagram
  5. The default name is highlighted. Overtype this with Person to change the name of the new class
  6. In the Navigator, select the JavaClassWS project and ensure that the project is displayed using the Categories view.

    Select the icon at the top of the navigator to toggle the view. To toggle the component palette view to icons (as shown in the Figure 1) select Icon View from the component palette's context menu.

    Figure 1: UML Class Diagram displaying Person Java class

  7. Open the following nodes
    • UML Model
    • mypackage1

      Note that there are two UML elements one for the class diagram and one for the Person class. See Figure 1

  8. Open the following nodes
    • Sources
    • mypackage1

      Note that Person.java has been generated. Figure 1 also shows the Person class with attribute and methods that you will add in the next few steps.

  9. In the diagram, note the symbol in the top left corner of the Person shape. This symbol shows that the Java code has been generated
    Once generated, the modeled class and the generated Java code are synchronized and the modeled class and Java class cannot be unsynchronized. Any change you make in the model will be reflected in the generated code and vice-versa.You can change the generation option for new modeled objects using the context menu of the diagram.

  10. Click in the first empty box in the class to add an attribute using in-place editing
  11. Overtype the highlighted attribute placeholder with:

    + name

  12. Press <enter>

    Note that the type of the attribute has defaulted to String

  13. Click in the next box to add a method. Overtype the placeholder method signature with the method listed below then press <enter>

    + sayHello(String p0):String

    The class shape will expand and present you with a placeholder signature for the second method

  14. Overtype the new method signature with the method below.

    + sayGoodbye():String

  15. Click the edge of the class shape to select the class. Drag it to resize as required
  16. Context menu: Go to source
  17. Add implementation code to the generated methods

    public String sayHello(String p0)
    {
    name = p0;
    return "Hello, " + p0;
    }

    public String sayGoodbye()
    {
    return "That's all Folks, Goodbye " + name;
    }

  18. Context menu: Rebuild Person.java
  19. Close the code editor to return to the class diagram.

    Alternatively select the class diagram from the Document Bar

Add a Complex Type (JavaBean) Parameter to the Class

In JDeveloper 9.0.2 you were only able to automatically consume (call and handle) web services that returned simple types. In 9.0.3 the stub generator automatically generates code to serialize complex types

Create the JavaBean

  1. In the Navigator select JavaClassWS.jpr
  2. Select menu option File -> New to open the Object Gallery
  3. Expand the Client Tier node
  4. Select JavaBeans
  5. With the Bean selected, click OK to open the JavaBean create dialog
  6. Give the bean the name Address
  7. Select java.lang.Object from the Extends list
  8. Click OK to create the bean
  9. Select Address.java in the navigator
  10. Context menu: Class Editor
  11. In the Class Editor, select the Fields tab
  12. Click Add and add the following fields (see Figure 2)
    • town
    • country

      Accept the other default properties of the field

      Figure 2: Class Editor - Add Field Settings Dialog

  13. Close the Class Editor
  14. In the Navigator select JavaClassWS.jpr
  15. Context menu: Rebuild JavaClassWS.jpr

Add JavaBean to the Class Diagram

  1. Click JavaWS in the Document Bar to make the class diagram visible in the IDE
  2. Drag Address.java from the Navigator onto the class diagram

    A new UML shape for the Address class is added to the class diagram

  3. Return to the Person class in the class diagram
  4. Use in-place edit to add the following public methods

    + setAddress(String town, String country):void
    + convertAddress():void
    + getAddress():Address

  5. Use in-place edit to add the private variable m_addr

    - m_address:Address

  6. Select the Person class again
  7. Context menu: Go to source
  8. Amend the class to change the implementation code as follows:

    private Address m_address = new Address();

    public void setAddress (String town, String country)
    {
    m_address.setTown(town);
    m_address.setCountry(country);
    }

    public void convertAddress()
    {
    m_address.setTown("The town is " + m_address.getTown());
    m_address.setCountry("The country is " + m_address.getCountry());
    }

    public Address getAddress()
    {
    return m_address;
    }

  9. Return to the class diagram and select the Dependency arrow from the component tool palette
  10. Click on Person in the diagram
  11. Click on Address in the diagram

    This draws the dependency that the Person class has on the Address class. No code is generated for this dependency. It is for visualization purposes only. See Figure 3

    Figure 3: UML Class diagram showing Dependency between Person and Address classes

Publish the Person Java Class as a Web Service

  1. Select Person in the diagram
  2. Context menu: Generate -> Web Service. This launches the Web Services Publishing Wizard

    You can also invoke this wizard through the Object Gallery (File -> New)

    1. Step 1: Accept the default name and package
    2. Step 2: Click Select All to expose all the public methods in the class in the web service
    3. Step 3: Accept the defaults and Finish the wizard

      The web service myPersonWS has been created and is shown in the Class diagram

  3. In the Navigator, select myPersonWS under the Web Services node

    Note that a WSDL document and an interface IPerson.java have been created. The interface is used by the application server at runtime

  4. Select Person.wsdl
  5. Expand the structure window to browse the generated WSDL document
    • XML Structure
      • definitions
        • portType
          • operation

            The portType defines the collection of functions (the operations) that are accessible via the web service

  6. Double-click name=sayHello to open the WSDL document at this parameter in the code editor
  7. Browse the WSDL document either using the editor or the structure pane
  8. Close the WSDL document (do not make any changes to it!)

Run and Test the Web Service in the Embedded OC4J Server

For testing and debugging web services and other runnable applications (for instance EJB, JSP) written in JDeveloper it is possible to 'Run' in the embedded Oracle Containers for Java (OC4J) application server. This mimics deployng the same code to an OC4J instance without the need for physically deploying applications or installing an OC4J instance

  1. Select myPersonWS in the class diagram
  2. Context menu: Embedded server -> Run
  3. This starts the embedded OC4J and 'deploys' the web service to it. When the deployment is finished you will see the following message in the log window.

Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

Create a Sample Java Client to Test the Web Service in the Embedded OC4J

To use a web service you need to generate a client stub to call it

  1. Select myPersonWS in the class diagram
  2. Context menu: Generate -> Sample Java Client

    This generates a sample Java client called EmbeddedMyPersonWSStub to connect to the web service running in the embedded OC4J server. It contains a main method for testing the call and response from the web service. The other menu option under Generate generates a client stub to call the web service from its deployed application server (taken from the WSDL file). You can also use this stub to test the deployed web service - by adding your own main method to it or instantiating it in your application

  3. In the Class diagram, select EmbeddedMyPersonWSStub
  4. Context menu: Go to source.
    Browse down past the main method and notice that the endpoint has defaulted to the local machine and the port that the embedded OC4J is using
  5. Add the following lines of code in the main method under the commented out line (see Figure 4)

//Add your own code here
System.out.println(stub.sayHello("WS Developer"));
stub.setAddress("Reading","UK");
stub.convertAddress();
System.out.println(stub.getAddress().getTown());
System.out.println(stub.sayGoodbye());

Testing the Web Service Using the Sample Java Client

  1. Context menu: Run EmbeddedMyPersonStub.java
    The return from the web service is displayed in the log window (see Figure 4)

    Figure 4: Log window result of running the EmbeddedPersonStub in the embedded OC4J

Testing the Web Service at the Network Packet Level Using the TCP Packet Monitor

The TCP packet monitor allows you to monitor and test web services at the network packet level. The HTTP requests and responses are captured and output to the monitor. Once activated, the TCP Packet Monitor reroutes calls to a web service via an intermediate port. You can use the TCP Packet Monitor whether you are using a proxy server or not. Whichever is the case, the packet monitor will create appropriate 'dummy' ports.

  1. Menu Tools -> Preferences
  2. Select Web Browser/Proxy
  3. Note the port number of the HTTP Proxy Server
  4. Click Cancel to close Preferences dialog
  5. Menu Tools -> TCP Packet Monitor to invoke the TCP Packet Monitor
  6. Start the TCP Packet Monitor by clicking the green start icon (top left of monitor window)
  7. Menu Tools -> Preferences
  8. Select Web Browser/Proxy

    Note that the port number of the HTTP Proxy Server has changed

  9. Cancel the Preferences dialog
  10. By default the monitor appears in the bottom right of the IDE. Hold down the Control Key and drag the TCP monitor to the middle of the IDE.
  11. Expand it as shown in Figure 5

    Figure 5: The TCP Packet Monitor

  12. Select the EmbeddedMyPersonStub.java code editor
  13. Click the Run icon in the toolbar to run the stub
  14. Note that as well as the expected return from the web service in the log window there are 5 entries in the History tab of the monitor - one for each call to the web service in the stub. The calls to the web service are:

System.out.println(stub.sayHello("WS Developer"));
stub.setAddress("Reading","UK");
stub.convertAddress();
System.out.println(stub.getAddress().getTown());
System.out.println(stub.sayGoodbye());

  1. Highlight the first entry in the History tab of the TCP Packet Monitor and either double-click it or select the data tab
  2. Select the Switch Layout icon (5th from left) to display the request window above the response window
  3. Note that the top of the request window shows the http post to the embedded server (port 8988)
  4. Scroll to the bottom of the request window to show the call sayHello and the parameter being passed (See Figure 6):

    <SOAP-ENV:Body>
    <ns1:sayHello xmlns:ns1="myPersonWS" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <p0 xsi:type="xsd:string">WS Developer</p0>
    </ns1:sayHello>
    </SOAP-ENV:Body>

  5. Move to the response window shows the String returned (See Figure 6)

    <SOAP-ENV:Body>
    <ns1:sayHelloResponse xmlns:ns1="myPersonWS" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:string">Hello, WS Developer</return>
    </ns1:sayHelloResponse>
    </SOAP-ENV:Body>

    Figure 6: TCP Packet Monitor Data tab

  6. In the request window change the p0 parameter value to My Name

    One powerful way to use the TCP Packet Monitor to test your web services is by changing parameter values using the TCP Packet Monitor and resending the request. This can be helpful when the SOAP packet is not returning the response you expected. If you have have a complicated client that would take time to re-write this is another way of quickly testing the expected parameters sent and received

  7. Click the icon Resend Request (left hand icon)
  8. Return to the History Tab. Highlight the new entry (the fifth entry in the window) and return to the Data Tab
  9. See the new parameter that was passed in the request window
  10. Scroll to the bottom of the response window to see the returned greeting
  11. Click the Stop icon to stop the TCP Packet Monitor
  12. Close the TCP Packet Monitor window

Publish a Modeled EJB Session Bean as a Web Service

View EJBs in the Class Diagram

  1. In the Navigator, click System tab to display the System Navigator instead of the Run Navigator
  2. Select the EJBWS project and ensure that the project is displayed using the Categories view.
  3. Expand the following nodes
    • UML Model
    • hrpackage
  4. Select EJB1
  5. Context menu: Class Diagram
  6. Note that it contains the Departments entity bean and the HRListings session bean

Publish the Session Bean Remote Interface as a Web Service

  1. In the Navigator, select EJBWS.jpr
  2. Menu File -> New to open the object gallery
  3. Select Web Service in the left hand pane and Java Web Service in the right hand pane
    1. Step 1: Browse to the remote interface: hrpackage -> HRListings
    2. Step 2: Click Select All to expose all the methods in the remote interface in the web service
    3. Step 3: Ensure the localoc4j Application Endpoint is selected
      In this case you are going to deploy the web service and EJB to a standalone instance of OC4J defined under the application server connections node in JDeveloper
    4. Accept the other defaults and Finish the wizard

Deploy the Web Service to the standalone OC4J Application Server

  1. In the Navigator, select WebServices.deploy
  2. Context menu: Settings
    This is the deployment profile that holds all the information that JDeveloper needs to deploy the web service to the application server
  3. Select WEB-INF Classes
    Note that the WSDL document for the web service is checked for deployment
  4. Select Profile Dependencies
    Note that the dependency of the web service on the EJB is reflected
  5. Click Cancel to close the deployment profile
  6. Context menu: Deploy to localoc4j
    The Deployment log window will show the progress of the deployment with information such as:

    ---- Deployment started. ---- Aug 22, 2002 11:32:07 AM
    Wrote EJB JAR file to D:\903_971\jdev\mywork\WebServices\EJB\HRListingsEjbJar.jar
    Wrote WAR file to D:\903_971\jdev\mywork\WebServices\EJB\WebServices.war
    Wrote EAR file to D:\903_971\jdev\mywork\WebServices\EJB\test-EJB-WS.ear
    Invoking OC4J admin tool...
    D:\903_971\jdk\jre\bin\javaw.exe -jar D:\903_971\j2ee\home\admin.jar ormi://mymachine/ admin **** -deploy -file D:\903_971\jdev\mywork\WebServices\EJB\WebServices-EJB-WS.ear -deploymentName WebServices-EJB-WS
    Auto-unpacking D:\903_971\j2ee\home\applications\WebServices-EJB-WS.ear... done.
    Auto-unpacking D:\903_971\j2ee\home\applications\WebServices-EJB-WS\WebServices.war... done.
    Copying default deployment descriptor from archive at D:\903_971\j2ee\home\applications\WebServices-EJB-WS/META-INF/orion-application.xml to deployment directory D:\903_971\j2ee\home\application-deployments\WebServices-EJB-WS...
    Auto-deploying WebServices-EJB-WS (New server version detected)...
    Copying default deployment descriptor from archive at D:\903_971\j2ee\home\applications\WebServices-EJB-WS/HRListingsEjbJar.jar/META-INF/orion-ejb-jar.xml to deployment directory D:\903_971\j2ee\home\application-deployments\WebServices-EJB-WS\HRListingsEjbJar.jar...

    Exit status of OC4J admin tool (-deploy): 0
    D:\903_971\jdk\jre\bin\javaw.exe -jar D:\903_971\j2ee\home\admin.jar ormi://mymachine/ admin **** -bindWebApp WebServices-EJB-WS WebServices http-web-site /WebServices-EJB-context-root
    Exit status of OC4J admin tool (-bindWebApp): 0
    Use the following context root(s) to test your web application(s):
    http://mymachine:8888/test-EJB-context-root
    Elapsed time for deployment: 1 minute, 42 seconds
    ---- Deployment finished. ---- Aug 22, 2002 11:33:49 AM

Create a Client-side Stub for the Web Service

  1. In the Navigator, select EJBWS.jpr
  2. Menu File -> New to open the new object gallery
  3. Select Web Services in the left hand pane and Web Service Stub/Skeleton in the right hand pane
  4. Complete the Web Service Stub/Skeleton wizard
    1. Step 1: Select HRListings from the drop down list
    2. Under Generate Options, check Generate Main Method into Stub
    3. Accept all other defaults and click Finish to create the stub
      The stub HrpackageHRListingsStub.java is created and opened in a code editor
  5. Scroll down past the main method to the endpoint
    The endpoint is taken from the WSDL document and shows the location of the standalone local OC4J server that you specified
  6. Add the following code to the main method to instantiate the stub for testing

    // Add your own code here.
    System.out.println(stub.listDepartments());

  7. Context menu: Rebuild HrpackageHRListingsStub.java

Call the deployed web service using the generated stub

  1. Context menu: Run HrpackageHRListingsStub.java
  2. Note the return from the web service in the log window, similar to:

    Department Listing ....
    10......Administration...1700....
    20......Marketing...1800....
    30......Purchasing...1700....
    40......Human Resources...2400....

    Process exited with exit code 0.

Publish a PL/SQL Package as a Web Service

Using a database connection defined in JDeveloper you can browse your database packages and automatically create a Java wrapper and a web service to expose existing database functionality as a web service

  1. In the Navigator, select PLSQL.jpr
  2. Go to the Connections node
  3. Expand the following nodes:
    1. Database
    2. hrConnection (database node)
    3. hr (schema node)
    4. packages
    5. GETDATETIME
  4. Double-click the package body and use the code editor to see the function return (see Figure 7)

    return 'Hello ' || name || ', current date and time is ' || bind.value;

    This is a very trivial example, designed to show the principle not a great business logic example

    Figure 7: Database Connections node in the Navigator

  5. In the Navigator, select the GETDATETIME package
  6. Context menu: Publish as Web Service

    The PL/SQL Web Service Publishing Wizard is opened

    1. Step 1: Select the PLSQL project from the list of projects, accept other defaults
    2. Step 2: Select All to select the program units to be exposed as web services
    3. Step 3: Accept all the defaults and Finish the wizard

    The PL/SQL Web Service Publishing Wizard uses JPublisher to create a Java wrapper for the package.

  7. In the Navigator, Browse to the PLSQL project and review the generated WSDL document (Getdatetime.wsdl) and the Getdatetime.java class

The WSDL document gives no indication that the underlying implementation of the web service is a PL/SQL package

The Java wrapper class handles all the complexity of communicating with the package in the database

Run the web service using the embedded OC4J server

  1. If the embedded OC4J is running, terminate it: Run -> Terminate ->...
  2. Ensure that the PLSQL project is displayed using the Category view
  3. Under the Web Services node, select the hrconnection.GetdatetimeWebService web service container
  4. Context menu: Run

Create a sample java client to test the PL/SQL web service using the embedded OC4J

  1. Select the container hrconnection.GetdatetimeWebService web service container
  2. Context menu: Generate Sample Java Client
  3. In the code editor, scroll down the EmbeddedHrconnectionGetdatetimeWebServiceStub. java to the main method and add the following line under the commented out line

    // Add your own code here.
    System.out.println(stub.gettime("User"));

  4. Run the stub and see the output similar to the following in the log window

    Hello User, current time is 28-AUGUST-2002 17:31:19
    Process exited with exit code 0.

Use Web Services in a BC4J Application

In this task you use the CreditServices web service to return the credit history of every customer in a BC4J application module and test it in the BC4J tester. You then go on to create a JSP front end for the BC4J application and add the DateTimeServices web service to the JSP

Incorporate the CreditServices Web Service in a BC4J Application

Review the CreditServices Session Bean

  1. In the Navigator, ensure that the BC4J.jpr project is displayed using the Categories view. expand the following nodes
    • BC4J.jpr
    • Enterprise JavaBeans
    • ejb-jar.xml
    • CreditServices
  2. Open CreditServicesBean.java in the code editor

    Note that the bean contains the method CreditHistoryCheck that returns the credit history of a customer

Review the CreditServices Web Service

  1. In the Navigator, expand the following nodes
    • BC4J.jpr
    • Web Services
    • orderentrypackage.CreditServices
  2. Double-click orderentrypackage.CreditServices to open the re-entrant wizard

    Note that this web service is a publication of the Session Bean CreditServices

  3. Select the Exposed Methods tab

    Note that the method CreditHistoryCheck has been published

  4. Click Cancel to close the wizard and make no changes
  5. Terminate any embedded OC4J session running (Run -> Terminate -> ...)
  6. In the Navigator, select orderentrypackage.CreditServices
  7. Context menu: Run orderentrypackage.CreditServices

    This runs the session bean and the web service in the embedded OC4J application server.

Review the EmbeddedCreditServicesStub

  1. In the Navigator, expand the following nodes
    • BC4J.jpr
    • Sources
    • orderentrypackage
  2. Open EmbeddedCreditServicesStub.java in the code editor

    Note that it is a stub to run against the embedded OC4J application server to call the CreditServices web service

Add a Transient Attribute to the BC4J View Object to Call the Web service

Figure 8: Create a new view object attribute

  1. In the Navigator, expand the following nodes
    • BC4J.jpr
    • Business Components
    • orderentrypackage
  2. Select CustomersView
  3. Context menu: Edit Customers View
  4. Select Attributes in the left hand panel
  5. Select New in the right hand panel to add a new View Object Attribute (see figure 8 above)
    • Name: CreditHistory
    • Updateable: Always
    • Accept other defaults
    • Select OK
  6. Select Java in the left hand panel
  7. Select Generate Java File for View Row Class:CustomersViewRowImpl
  8. Select OK to close wizard
    CustomersViewRowImpl.java is generated
  9. Save All

Add Code to Call The Web Service from the Customers View Object

  1. Select CustomersViewRowImpl.java in the code editor
  2. Edit method getCreditHistory as follows

    public String getCreditHistory()
    {
    String ws = null;
    try
    {
    EmbeddedCreditServicesStub stub = new EmbeddedCreditServicesStub();
    ws = stub.CreditHistoryCheck(getCustomerId().toString());
    } catch (Exception ex)
    {
    ex.printStackTrace();
    ws = "cannot access credit history";
    } finally
    {
    return ws;
    }

    // return (String)getAttributeInternal(CREDITHISTORY);
    }

  3. Rebuild code

Test the Web Service Using the BC4J Tester

  1. In the Navigator, under Business Components, select OrderEntryAppModule
  2. Context menu: Test
  3. Accept defaults and select Connect
  4. Select Customers View
  5. Context menu: Show
    The web service returns a poor CreditHistory for customer 101
  6. Select Specify View Criteria icon
  7. Enter 4% in CustomerId
  8. Select Find
    The web service returns records for customers with a customer_id that begins with 4. Their CreditHistory should be good
  9. Close the tester

Create a Web Service from a BC4J Client Method

In this task you expose a BC4J client method as a web service.

Add a Client Method to the Application Module

  1. In the Navigator, open the following nodes
    • BC4J.jpr
    • Business Components
    • orderentrypackage
    • OrderEntryAppModule
  2. Select OrderEntryAppModuleImpl.java
  3. Context menu: Code Editor
  4. Add the following import statement to the list of import statements at the top of the class

    import oracle.jbo.*;

  5. Add the following method to the class

    public String getOrdDetails(String s)
    {
    ViewObject ordvo = findViewObject("OrdersView");
    String whereclause = "ORDER_ID = " + s;
    ordvo.setWhereClause(whereclause);
    Row r = ordvo.first();
    if (r == null) return "<Not Found>";
    String result = (r.getAttribute("OrderId")).toString() + " "
    + (r.getAttribute("CustomerId")).toString() + " "
    + (r.getAttribute("OrderTotal")).toString();
    return result;
    }

  6. Build the class
  7. Select OrderEntryAppModule in the Navigator
  8. Context menu: Edit OrderEntryAppModule
  9. Select Client Methods tab
  10. select getOrdDetails from the Available list
  11. Move to the Selected list (See Figure 9)
  12. Click OK to close dialog
  13. Select OrderEntryAppModule in the Navigator
  14. Context menu: Generate Web Service Class
    Wrapper class OrderEntryAppModuleWS.java is generated under the Sources node. Note: this menu option is not available if steps 8-10 have not been done
  15. Select BC4J.jpr
  16. Context Menu: New to go to the new object gallery
  17. Select Web Services from the Categories panel and Java Web Service from the Items panel.
  18. This opens a Wizard
  • Step 1: Browse and select OrderEntryAppModuleWS from the orderentrypackage. Accept the other defaults
  • Step 2: Click Select All to include all the exposed methods in the web service
  • Step 3: Ensure that the Application Server Endpoint is WSConnection. Accept the other defaults finish the wizard.
    The web service should have been generated and the OrderEntryAppModuleWS.wsdl file should be open in the code editor.

To run this web service it would be necessary to deploy the BC4J application to the OC4J instance. This is outside the scope of this lesson.

Figure 9: Move the client method to the Selected list

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy