Adding Exposed Methods to Modeled Web Services

There are two ways in which you can add an exposed method to a modeled web service:

To add an exposed method to a modeled web service:

  1. Click on the modeled web service to select it, and then click in the Exposed Methods Compartment (below the Name Compartment).
  2. Create a new method by typing in the method, for example, getDate () : java.lang.String.
    The web service implementation files are automatically updated, and the WSDL document is overwritten with a new version. If you have created the Java class associated with this modeled web service, it is also updated, and the method in the Java class is preceded by the @webmethod Javadoc comment.

To add a method to a Java class and regenerate the modeled web service:

  1. In the code editor, edit the Java class on which the web service is based and add a new public method. You can use the @webmethod Javadoc comment before the method to ensure that it is selected for implementation as a web service
    OR
    when you open the wizard, you can go the Exposed Methods page and select the method for generation to a web service.

    Note: If you add a new public method that cannot be published as a web service (for example, if it is not serializable) and use the @webmethod comment, the modelled web service ignores the new method without displaying any warnings or errors.
  2. Double-click the modeled web service on the diagram, or right-click the modeled web service and choose P roperties. This opens the reentrant Create Web Service wizard.
  3. Click OK to regenerate the WSDL document. The new method is now included in the WSDL document, and the modeled web service is updated with the new exposed method.

@webmethod Javadoc Comment

 

Copyright © 1997, 2004, Oracle. All rights reserved.