Calling a Web Service Operation
See Also
A web service operation can be called from a web application, a Java application, or
a MIDP client (MIDlet). For information on calling a web service operation
from a MIDlet, see the Java ME Mobility documentation.
To call a web service operation:
- Create a web service client.
- If the web service client is deployed from a web application, you can call the
web service from a servlet or from a JSP page. If the web service client is deployed from
a Java application, use a Java source file instead. So, do one of the following:
- Create a Java source file, such as a servlet.
- Use the default index.jsp file that is created for you when you create
a web application or a JSP file.
- Open the file in the Source Editor and do one of the following:
- Expand the Web Service References node and continue expanding subnodes until
you get to the node representing the operation. Using your mouse, drag and drop
the node to where you need it to be in the file.
- Right-click in the method (for Java files) or anywhere in the Source Editor (for JSP file)
from where you want to call the web service, and choose Insert Code
> Call Web Service Operation. The Select Operation to Invoke dialog box appears.
Expand the nodes and select a web service operation. Click OK.
The IDE adds the code required for calling the web service to the file.
- See Also
- About Web Services
Legal Notices