# Platform Development Studio - Developer’s Guide

# Using the Eclipse Wizard

This section describes using the Eclipse Wizard to generate Communication Services:

- About the Eclipse Wizard
- Configure Eclipse
- Using the Eclipse Wizard

- Generating a Communication Service Project
- Adding a Plug-in to a Communication Service Project
- Removing a Plug-in from a Communication Service Project

## About the Eclipse Wizard

The Eclipse Wizard is a plug-in that enables an Eclipse user to create Oracle Communications Services Gatekeeper Communication Services. The extension projects are created using wizards that customize the project depending on which type of extension is being developed. Two types of extensions can be created:

- Communication Services
- Network protocol plug-ins for existing Service Facades (application-facing interfaces)

The Eclipse Wizard generates classes and Ant build files for both types of extensions. In addition, there is a separate build file with Ant targets for packaging the extension for deployment.

## Configure Eclipse

### Prerequisites

- Eclipse 3.2 or higher version must be installed
- Ant 1.6.5 must be installed

Use the Ant provided with WebLogic Server. It is located in `$BEA_HOME/modules/org.apache.ant_1.6.5`.

### Basic configuration of Eclipse environment

To do the basic configuration of the Eclipse environment:

1. Start Eclipse
2. Open the Preferences window, Window Preferences...

1. In Java Installed JREs, make sure that the JRE used is the JRE installed with the Oracle Communications Services Gatekeeper. This is installed in `$BEA_HOME/<jdk version>/jre`
2. In Ant runtime, make sure Ant Home is set to the directory in which you have installed Ant.

### Configuring of the Eclipse Wizard

To configure the Eclipse Wizard, starting in Eclipse:

1. Open the Preferences window, Window Preferences...
2. In OCSG Platform Development Studio, configure the following:

OCSG Home Directory The directory of the Oracle Communications Services Gatekeeper installation. This provides references to WebLogic Server APIs. In the default installation, this would be `$BEA_HOME/ocsg_4.1`.

OCSG PDS Home Directory The directory of the Oracle Communications Services Gatekeeper Platform Development Studio installation. This provides references to Oracle Communications Services Gatekeeper APIs, extension points and third party APIs. In the default installation, this would be `$BEA_HOME/wlng_pds400`

JDK Installation Directory The JDK installation directory for Oracle Communications Services Gatekeeper, for example`$BEA_HOME/jdk160_05`.

Logging Level The logging level of the Eclipse plug-in and the Ant tasks. Determines what level of detail to log by Eclipse. Select All for detailed logs, Standard for less detailed logs.

## Using the Eclipse Wizard

### Generating a Communication Service Project

A Communication Service project is based on a WSDL file and a set of attributes given when running the Communication Service Project wizard.

The WSDL defining the application-facing interface must adhere to the following:

- Attribute name in `<wsdl:service>` must include the suffix Service.
- Attribute name in <wsdl:port> must be the same as the name attribute in `<wsdl:service>`, excluding the suffix Service.

To generate a Communication Service project:

1. In Eclipse, choose File New Project.

This opens the New Project window.

In this window... | Perform the following action...
--- | ---
Select Wizard | Make sure OCSG Platform Development Studio Communication Service Project is selected. Click Next to proceed. You may cancel the wizard at any time by clicking Exit. You may go back to a previous window by clicking Previous.
Create a Communication Service | Enter a Project Name and choose a location for your project. You can choose: To create an entirely new Communication Service To create a new Service Facade (application-facing interface) and the common parts of the Service Enabler layer for an existing plug-in To create a new network plug-in that uses the Service Facade and common parts of the Service Enabler of a currently existing Communication Service. If you wish to do 3, check the check-box Use predefined communication service and from the drop-down list select the Service Facade for which you want to create a plug-in. If you wish to do 1 or 2, leave the box unchecked. Click Next to continue. If you checked the Use predefined check box, the Define the Plug-in Information window is displayed. Go to Define the Plug-in Information instructions below. If you did not check it, the Define the Communication Service is displayed.
Define the Communication Service Configure Service WSDL Files | For each WSDL file that includes the service definition to be implemented by the new Communication Service: Click , browse to the WSDL file, select it, and click OK.
Define the Communication Service Configure Callback WSDL Files | For each WSDL file that includes the callback service definition to be used by the new Communication Service in sending information to the service provider’s application: Click , browse to the WSDL file, select it, and click OK.
Define the Communication Service Communication Service Properties | Company: Set your company name, to be used in `META-INF/MANIFEST.MF`. Version: Set the version, to be used in `META-INF/MANIFEST.MF`. Identifier: Create an identifier to tie together a collection of Web Services. Will be a part of the names of the generated war and jar files and the service type for the Communication Service: `<Communication Service identifier>.war` and `<Communication Service identifier>_callback.jar` Service Type: Set the service type. Used in EDRs, statistics, etc. For example: SmsServiceType, MultimediaMessagingServiceType. Java Class Package Name: Set the package names to be used. For example: com.mycompany.service Web Services Context path: Set the context path for the Web Service.For example: myService SOAP to SOAP: Check this box to generate a Service Facade that can be a part of a SOAP to SOAP Communication Service. REST: Check this box to generate a RESTful Service Facade for the Communication Service.
Define the Plug-in information | For each plug-in to be created in the Communication Service project: Click This opens a pop-up window with the following fields: Protocol: An identifier for the network protocol the plug-in implements. Used as a part of the names of the generated jar file:`<Communication Service identifier>_<protocol>.jar` and the service name `Plugin_<Communication Service identifier>_<protocol>` Schemes: Address schemes the plug-in can handle. Use a comma separated list if multiple schemes are supported. For example: tel: or sip: Package Name: Package names to be used. Company: Used in `META-INF/MANIFEST.MF`. Version: Used in `META-INF/MANIFEST.MF`. Choose which Type of plug-in to generate: SOAP: Select to this radio-button to generate a generic, protocol-neutral, plug-in. SOAP to SOAP: Select to this radio-button to generate a plug-in for a SOAP to SOAP Communication Service. SIP: select to this radio-button to generate a plug-in that connects to a SIP network using a SIP Servlet. Click OK. The plug-in definitions are added to the list of plug-ins. Click to remove the selected plug-in. Click Finish to start the code generation for the plug-in(s).

### Adding a Plug-in to a Communication Service Project

To add a plug-in to an existing Communication Service project:

1. In the Eclipse package explorer, right-click the project for the Communication Service project, and choose Properties.

This opens the Properties window for the Communication Service project.

In this window... | Perform the following action...
--- | ---
Plugin Configuration | A list of plug-ins defined for the Communication Service project is displayed. For each plug-in to be created in the Communication Service project: Click This opens a pop-up window with the following fields: Protocol: An identifier for the network protocol the plug-in implements. Used as a part of the names of the generated jar file:`<Communication Service identifier>_<protocol>.jar` and the service name `Plugin_<Communication Service identifier>_<protocol>` Schemes: Address schemes the plug-in can handle. Use a comma separated list if multiple schemes are supported. For example: tel: or sip: Package Name: Package names to be used. Company: Used in `META-INF/MANIFEST.MF`. Version: Used in `META-INF/MANIFEST.MF`. Choose which Type of plug-in to generate: SOAP: Select to this radio-button to generate a generic, protocol-neutral, plug-in. SOAP to SOAP: Select to this radio-button to generate a plug-in for a SOAP to SOAP Communication Service. SIP: select to this radio-button to generate a plug-in that connects to a SIP network using a SIP Servlet. Click OK. The plug-in definitions are added to the list of plug-ins. Click Finish to start the code generation for the plug-in(s).

### Removing a Plug-in from a Communication Service Project

To remove a a plug-in from an existing Communication Service project:

1. In the Eclipse package explorer, right-click the project for the Communication Service project, and choose Properties.

This opens the Properties Window for the Communication Service project.

In this window... | Perform the following action...
--- | ---
Plugin Configuration | A list of plug-ins defined for the Communication Service project is displayed. For each plug-in to be removed from the Communication Service project: Select the plug-in to be removed and click The plug-in definitions are removed from the list. Click Apply to remove the plug-in part(s) from the Communication Service project. Warning: This removes all parts of the project, including any manually edited or added files. Click Restore Defaults to restore the plug-in definition list.

2. Click OK or Cancel to close the Properties window.