Show TOC

Procedure documentationCreating the XML Schema Locate this document in the navigation structure

Procedure

  1. In the Project Explorer view, expand the src node and in the context menu of the wsdl node, choose   New   Other  .

  2. In the wizard that appears, expand the XML node and choose XML Schema. Choose Next.

  3. In the screen that appears, enter callcharges.xsd in the File Name field. Choose Finish.

    In the Project Explorer view, you should see the callcharges.xsd under the wsdl node.

  4. In the callcharges.xsd window that appears choose the Source tab at the bottom.

  5. In the tab page that appears delete all existing content and copy the following in the Source tab page:

    Syntax Syntax

    1. <?xml version="1.0" encoding ="UTF-8"?>
    2. <xsd:schema xmlns:xsd ="http://www.w3.org/2001/XMLSchema"
    3. xmlns="http://www.example.org/CallCharges" elementFormDefault="qualified"
    4. targetNamespace="http://www.example.org/CallCharges">
    5. <xsd:element name="CallCharges" type="CallChargesType"/>
    6.  <xsd:complexType name="CallChargesType">
    7. <xsd:sequence maxOccurs="unbounded">
    8. <xsd:element name="Charges" type="CallChargeType"/>
    9. </xsd:sequence>
    10. </xsd:complexType>
    11. <xsd:complexType name="CallChargeType">
    12. <xsd:sequence>
    13. <xsd:element name="ConnectionProvider" type="xsd:string"/>
    14. <xsd:element name="ConnectionRate" type="xsd:double"/>
    15. <xsd:element name="DestinationCountry" type="xsd:string"/>
    16. <xsd:element name="OriginCountry" type="xsd:string"/>
    17. <xsd:element name="TypeOfLine" type="xsd:string"/>
    18. </xsd:sequence>
    19. </xsd:complexType>
    20. </xsd:schema>
    End of the code.
  6. Press Ctrl+Shift+F.

  7. Save the changes

Adding the XSD Elements to the Rules Composer DC
  1. In the Project Explorer view, expand the Rules Modeling node and double-click the Project Resources node.

  2. In the Project Aliases Editor that appears, choose the Aliases tab.

  3. In the tab page that appears, choose the Add button and in the menu that appears, choose the XSD Element.

  4. In the dialog box that appears, expand the http://www.example.org/CallCharges node and select CallCharges.

    Note Note

    If you are not able to view the XSD elements, you need to build project.

    • In the SAP NetWeaver Developer Studio, choose   Project   Build Automatically.  

      Or

      In the Project Explorer view, in the context menu of the rules composer DC node, choose   Build Project.  

    End of the note.
  5. Choose Finish.

  6. In the Alias Name table select all the XML schema element checkboxes.

  7. Save the changes.

Renaming the XSD Aliases (Optional)
  1. In the Alias Name table, click each of the aliases. The aliases become editable. Enter an alternative name for the alias.

    Alias Name

    Rename as

    CallCharges/Charges/ConnectionProvider

    Connection Provider

    CallCharges/Charges/ConnectionRate = {double}

    Set Rate = {double}

    CallCharges/Charges/DestinationCountry

    Destination Country

    CallCharges/Charges/TypeofLine

    Type Of Line