source2wsdd Tag Reference

The following topics describe the source2wsdd Javadoc tags:

 


Overview of Using source2wsdd Tags

The source2wsdd Ant task generates a web-services.xml deployment descriptor file from the Java source file for a stateless session EJB- or Java class-implemented WebLogic Web Service. The web-services.xml deployment descriptor file contains information that describes one or more WebLogic Web Services. This information includes details about the back-end components that implement the operations of a Web Service, the non-built-in data types used as parameters and return values, the SOAP message handlers that intercept SOAP messages, and so on. As is true for all deployment descriptors, web-services.xml is an XML file.

This chapter describes the optional Javadoc tags you can include in the Java source file that the source2wsdd Ant task uses to automatically generate the web-services.xml file. If your Java source file does not contain any Javadoc tags, the source2wsdd Ant task makes a best guess when adding elements to the file, such as the name of the Web Service, the operations that should be exposed, and so on. If, however, you want more control over the generated web-services.xml file, use the source2wsdd Javadoc tags to specify exactly what your Web Service looks like.

There are three source2wsdd Javadoc tags:

Each tag has a set of attributes which correspond to the appropriate element in the web-services.xml file that it is describing.

 


@wlws:webservice

The source2wsdd Ant task uses the @wlws:webservice tag to populate the <web-service> element of the generated web-services.xml file.

You specify the @wlws:webservice tag in the Javadoc of the class that implements your Web Service.

The following example shows how to use the @wlws:webservice tag in the Javadoc that documents a Java class:

/** 



* PurchaseOrderService - a service to show different features of
* Weblogic Web Services.
*
* @wlws:webservice
* targetNamespace="http://www.bea.com/po-service/"
* name="PurchaseOrderService"
* portName="POPort"
* portTypeName="POPort"
* protocol="https"
*/
public class POService { ...
}

In the example, the POService Java class is the back-end component that implements a Web Service whose name is PurchaseOrderService (specified with the name attribute of the @wls:webservice tag). The <port> and <portType> elements in the generated WSDL for the Web Service are both POPort. Finally, client applications access the Web Service using HTTPS rather than the default HTTP.

The following table lists all the attributes of the @wlws:webservice tag.

Attribute Name

Description

Default Value if Attribute is Not Specified

Name The name of the Web Service, published in the WSDL. The name of the class in the annotated source code.
portName Name of the <port> child element of the <service> element of the dynamically generated WSDL of this Web Service. The name of the Web Service with Port appended. For example, if the name of this Web Service is TraderService, the default port name is TraderServicePort.
portTypeName Name of the default <portType> element in the dynamically generated WSDL of this Web service. The name of this Web Service with Port appended. For example, if the name of this Web service is TraderService, the default portType name is TraderServicePort.
protocol Protocol over which the Web Service is invoked. Valid values are http and https. Default value is http.
Style Specifies whether the Web Service has RPC-oriented or document-oriented Web Service operations. RPC-oriented WebLogic Web Se