Summary: Your First Web Service
This tutorial introduced you to the basics of building web services. Along the way, you became acquainted not just with how to use WebLogic Workshop, but with considerations in the design of web services.
This topic lists ideas this tutorial introduced, along with links to topics for more information. You may also find it useful to look at the following:
For an overview of WebLogic Workshop, see Building Web Services with WebLogic Workshop.
For a links to information on tasks you can accomplish in WebLogic Workshop, see the How Do I? topics.
For a list of the samples provided, see Samples.
You interact with web service source files through a WebLogic Workshop project. You use projects to group files associated with a web service or related web services.
For more information about projects, see WebLogic Workshop Projects.
As you develop web services, you test and debug code on a running instance of WebLogic Server.
For information on WebLogic Server, see BEA WebLogic Server 7.0 Release Documentation. To learn how to start WebLogic Server from within WebLogic Workshop, see How Do I: Start or Stop WebLogic Server?
You design a web service as you might make a drawing of it and its relationships with clients and other resources. WebLogic Workshop provides a Design View you can use to generate code to start with as you create your design.
For reference information on Design View, see Design View.
The source file for a web service is a JWS file, which is automatically recognized as a web service when deployed with WebLogic Server.
For an introduction to JWS files, see JWS Files.
You expose the functionality of a web service by creating methods within a JWS file. You can add the method in Design View, setting properties to specify its characteristics, including powerful server features.
To test a service, you use the Test View, a dynamically generated HTML page through which you can invoke service methods with specific parameter values.
For reference information on Test View, see Test View.
You can easily access databases from your web service with the DatabaseControl.
For an introduction and detailed information about the DatabaseControl, see Database Control: Using a Database from Your Web Service.
You can use asynchronous communications to handle latency issues inherent on the Internet, and sometimes with web services in general. Through asynchrony, you avoid situations in which client software is blocked from proceeding until it receives the results of its requests.
For an introduction to asynchrony and the WebLogic Workshop tools that support it, see Using Asynchrony to Enable Long-Running Operations.
Callbacks provide a useful way to return results to clients where asynchronous communication is needed. Callbacks require an agreement that the client will implement a means to handle the callback a service makes.
For more details, see Using Callbacks to Notify Clients of Events.
You can use conversations to maintain consistent state even between disparate asynchronous exchanges. Conversations make it possible to correlate these exchanges with the original request and the client that made it.
For more information, see Maintaining State with Conversations and Using Asynchrony to Enable Long-Running Operations.
You can access other web services using the ServiceControl. By generating a ServiceControl from the WSDL of another web service. When you do, you have a single component to represent the other service in your service's design.
For an introduction and details about the ServiceControl, see Service Control: Using Another Web Service.
You can access components that are available via the Java Message Service (JMS) by using the JMSControl. Through this control, you can send and receive messages of various types, including XML.
For more on the JMSControl, see JMS Control: Using Java Message Service Queues and Topics from Your Web Service.
You can access Enterprise Java Beans (EJBs) through the EJBControl. The EJBControl simplifies your use of an EJB by providing a single component representing the EJB's interface in your web service design.
For more detail on the EJBControl, see EJB Control: Using Enterprise Java Beans from a Web Service.
When you need to handle or control the specific shape of XML messages your service exchanges with other components, you can use XML maps. XML maps customize WebLogic Server's translation of XML to Java and vice versa.
For more on XML maps, see Handling and Shaping XML Messages with XML Maps.
For calculations outside your Java code, and for more powerful control over the shape of XML messages, you can incorporate ECMAScript into mapping. To use ECMAScript, you write a script function in a JSX file, then refer to the function in your XML map. At run time, WebLogic Server calls the script function when translating between XML and Java.
For an introduction and details about using ECMAScript for mapping, see Using Script Functions From XML Maps.
With the TimerControl, you can add timer functionality to your service. In this way, you can limit the time specific operations are allowed to execute, cause something to happen and regular intervals, and so on.
For more about the TimerControl, see Timer Control: Using Timers in Your Web Service.
You can use the onException callback exposed by the JwsContext interface to handle exceptions thrown from your web service's operations. When prompted by this callback, your code can perform any necessary clean-up and send a message to the client.
For reference information about the onException callback, see JwsContext.onException Callback.
By supporting polling, your web service can offer an alternative to clients that aren't capable of receiving callbacks. With polling, a client can periodically ask your web service if the response to its request is ready yet.
For information about polling, see Using Polling as an Alternative to Callbacks.
As you build your web service, WebLogic Workshop generates classes that can be used by client software. Through these proxy classes, a client can invoke your service's methods. You can download the proxy classes from Test View.
For more information, see How Do I: Use the Java Proxy for a Web Service?
You can make your web service secure by ensuring that it is exposed via the https protocol rather than http. To do this, you edit the configuration file associated with your web service's project.
For more detail, see Using HTTPS to Secure a Workshop Web Service.
Using the JwsCompile command, you can package your web service for deployment to a production server.
For a topic on web service deployment, see Deploying Web Services. For reference information on JwsCompile, see JwsCompile Command.