Show TOC

Adding Classifications to Web ServicesLocate this document in the navigation structure

Prerequisites

Context

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 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.

Procedure


  1. In the Project Explorer of the Java EE perspective, choose the Web service implementation bean, and then from the context menu, choose Start of the navigation path Web Services Next navigation step Create Publication Information End of the navigation path.

  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.

    Note

    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.

Results

  • The system creates a classifications file in the project.

    Note

    If you want to view the file in XML format, choose the .classifications file, and then from the context menu choose Start of the navigation path Open With Next navigation step Text Editor End of the navigation path.

  • The system inserted a @SrPublication annotation which contains a reference from the implementation bean to the classifications file.