@webmethod Javadoc Comment

When you are writing a Java class that contains methods that you want to expose as web services, you can automatically select for generation as a web service using the @webmethod Javadoc comment:


/**
 * @webmethod
 */    

Methods marked in this way are automatically selected for exposing as a web service in the Exposed Methods page of the Create Web Service wizard.

In the following example, getDate() will be automatically selected for generation in the Create Web Service wizard :


/**
 * @webmethod
 */
public static String getDate()
  {
  return (new java.util.Date()).toString();
  }
  
      

Ways to Create Web Services

 

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