When you have created a Web service in the SAP NetWeaver Developer Studio, you can add classifications to the Web service in compliance with the SAP classification systems. Classifications provide for an easier discovery of Web services in the Services Registry (SR). For example, when you import a WSDL document from the SR in the SAP NetWeaver Developer Studio, classifications enable you to narrow down your search criteria.
More information about the classification systems: Structuring of Services in the Registry.
More information about publishing Web services to the SR: Publishing Web Services to the Services Registry.
When you add classification information to a Web service, the system:
● Creates the following file in the project: <implementation bean name>.classifications.
Contains the classifications you added to the implementation bean.
● Creates or updates a sr-publication.metadata file in the META-INF folder of the project.
● Inserts the following annotation in the implementation bean: @SrPublication(location="<path>")
Contains a reference from the implementation bean to its classifications file.
● The Web service implementation bean is available in the SAP NetWeaver Developer Studio.
● The SAP NetWeaver Developer Studio is configured to connect to the Services Registry. More information: Connecting the SAP NetWeaver Developer Studio to the Services Registry.
1. In the Project Explorer of the J2EE perspective, choose the Web service implementation bean, and then from the context menu, choose Web Services ® Create Publication Information.
2. In the Output Package field, enter the package in which you want the system to generate the classifications file, or leave the default value.
3. In the Classification File field, enter a name for the classification file, or leave the default value.
4. Choose Finish.
The system opens the classification systems on the Services Registry.
5. From the Classification Systems window, expand the relevant node, and then select the necessary classifications.
You can add more than one classification to the Web service. However, when you choose classifications from particular classification systems, such as SoftwareComponent, SoftwareComponentVersion, you can add only one classification from the classification system.
6. Save your changes.
● The system creates a classifications file in the project.
If you want to view the file in XML format, choose the .classifications file, and then from the context menu choose Open With ® Text Editor.
● The system inserted a @SrPublication annotation which contains a reference from the implementation bean to the classifications file.