!--a11y-->
Creating a Web Service from a Portal
Service 
Portal services can be provided as Web services.
You have:
· Created a Portal service
· Read the Restrictions for WS Endpoints section
· Created a Development Component (DC) project for the Web service. For more information, see The Development Process.
1. In the Portal perspective, select File ® New ® Other… ® Portal Application ® Create a New Portal Application Object.
2. In the DC project, open portalapp.xml and select the Services tab
3. Choose Create and from the dialog box that appears select Portal Web Service from Portal Service, then choose Next

4. In the first step of the wizard, enter the path to the Portal service interface and choose Next.
5. Select the methods, which you want to expose and choose Next.
At least one method has to be selected to continue on the wizard.

6. In the next dialog box, you can set the properties for creating the WSDL file of the Portal Web service.
a. Target Name Space – allows you to alter the value of the targetNamespace attribute in the generated WSDL file.
b. Service Name – this field is automatically filled depending on the service interface you selected before.
c. Alias Name – it is used in the wsdl:port specification as location attribute.
d. Output – specifies destination and name of the WSDL file.
e. Location Import – used by the import statement in the WSDL as location parameter.
f. Location URL – specifies location of the Portal service. This is automatically filled depending on the Portal service you selected before.
g. Enable the getter/setter limitation – if checked, the wizard only accepts "pair" methods which occur as a "get"- as well as a corresponding "set"-method. (for example, getAttributeX and setAttributeX)

7. In the next dialog box, choose Skip.
8. If you have a method containing complex parameters (for example, a method that has an interface as return type), you will need to map this complex type to its implementation. When you are ready, choose Finish to create the WSDL files and the Web Service configuration. The portalapp.xml is updated.
9. Open the Web Services Perspective and switch to the Portal Explorer view. Find your Portal service interface and choose New ® Web Service… from the context menu

10. Enter the required data for the Web service and choose Next.
a. Source Folder – specifies the folder of the DC project
b. Endpoint – specifies the endpoint of the Web service
c. Portal Service – specify the Portal service
d. Web Service Name – specify the name of the Web service
e. Default Configuration Type

11. Select the methods to be contained in the Web service virtual interface and choose Next.

12. In the next dialog box the Virtual Interface, Web Service Definition, and Endpoint are automatically filled. Choose Finish to complete the wizard.
All Web service related entities are generated and places into the src.ws source folder. This folder is created on the first invocation of the Web service wizard.
13. Build the DC project.
Switch to Enterprise Portal Perspective, select the name of the DC project and choose Development Component ® Build from the context menu. The Portal archive file (PAR) is generated and added to the DC project.
14. Deploy the PAR file.
For more information see
Managing PAR and JAR
Files in the Project.
The
PAR file with the Portal Web service is deployed on the J2EE Engine. To check
the Web service, see
Portal Web Service
Checker.