Web Services Documentation

This SAP product documentation specifies the SOAP APIs for the Web Services technical interface provided by SAP Convergent Charging 4.1. The Web Services (WS) deliver a set of services (see process components) dedicated to the new master data model based on provider contracts (see charging contracts). This technical interface is available from the SAP CC Core Server system and accessible endpoints. Your client application or system must consume these business services.

Target Audience

  • Technology consultant
  • Development consultant
  • Project implementation team

Definition

SAP CC Web Services deliver a set of services related to the charging and the refilling processes. These operations enable the charging of customers' consumptions and the refilling of prepaid accounts.

SAP Convergent Charging also provides some business services to activate the recurring charges of the contracts. Normally, this service is consumed by an external scheduler, which triggers the recurring charges of the contracts.

See the SAP CC Security Guide to get information on user authorizations and rights to perform the service operations described in this documentation.

Business Context and Use

SAP CC Web Services are a technical interface dedicated to the integration of SAP CC with a CRM application such as SAP CRM or with a billing system such as SAP ERP. Use this technical interface if you want to manage master data stored in SAP Convergent Charging or if you want to perform operations such as charging and refilling from a CRM.

A prerequisite for the integration is to define the pricing logic and the charging and refilling rules in SAP Convergent Charging.

The standard integration of SAP Convergent Charging with a CRM can be split into three stages:

  • The definition of the commercial product and its catalog: In the CRM application, you combine the charge plans and the refill plans defined in SAP Convergent Charging (see charge plan class and refill plan class) to set up your commercial product and its catalog of marketable services. Optionally, you can customize the pricing information configured in SAP CC by enriching and maintaining some master data related in a pricing catalog owned by the service provider (see mapping tables or range tables for tiered pricing)
  • The customer data provisioning in SAP Convergent Charging from the CRM with their accounts, which can be prepaid or external. Notice that external accounts are links to the postpaid accounts managed by the invoicing system.
  • The provisioning of pricing and charging information in contracts stored in SAP Convergent Charging from the CRM.

Provided Services

For implementing some business services in your system landscape, SAP CC Web Services provide you with process components categorized as follows:

Management of Master Data

The master data includes pricing and charging configuration settings that are necessary to rate and charge the use of customer services. The service provider is the owner of the master data.

Management of Master Data for Product Modeling
Management of Customer Master Data
Customer Data Migration

Business Processing

Restricted Services

Some services and operations are provided to be used by other SAP applications. They are not aimed to be used in an implementation project:

These services are released and supported by SAP for restricted consumption only.

Technical Details

Technical details of SOAP messages are included in this documentation for all the service operations. They describe the structure and the content for each message types. The formats of all the elements of the messages are detailed.

  • An envelope defines an XML document as a SOAP message and represents its root
  • A header contains particular information: see WS-Addressing, wsse (in SAP Security Guide), SAP Passport.
  • A body contains an operation request or a response: the technical information is based on the Web Services Description Language (WSDL) and the associated XML Schema Definition (XSD) both provided by SAP CC.

Consult the SAP CC Security Guide for more information about the WS technical interface, the SOAP over HTTP communication channel, and Web Service Security (WS-Security).

WSDL

Web Services Description Languages (WSDL) are available from a running SAP CC Core Server system from each endpoint. A WSDL is provided for each process component (Web service) and includes the specifications of the SOAP APIs. It refers some XSD fragments necessary for your development tools. During the implementation project phase, you can access online to the relevant WSDL by using the URI of the needed process component(s):

  • <WS_ENDPOINT_URI>?wsdl
Where:
  • <WS_ENDPOINT_URI> is the URI of the endpoint related to a Web service (process component)

Endpoints

SAP CC provides several endpoints for accessing the Web Services. They are defined by a URI that includes a network address of the SAP CC system associated with a SOAP binding. The network address is the HTTP or HTTPS address of a particular instance of the SAP CC system. A port number is dedicated to these communications. The SOAP binding is the technical name of the process component (Web service). The URI is case sensitive.

Web Services are versioned so that they can be enhanced with new features without causing issues for clients using the older versions. The original version of a Web Service is version 0, with each subsequent version incrementing the version number by 1. A specific version of a Web Service can be accessed by using its version number in the URI of the endpoint, apart from version 0 where no suffix is required.

Format:

  • http://<INSTANCE_HOST_ADDRESS>:<INSTANCE_WS_PORT_NB>/[v<WS_VERSION>/]<WS_TECH_NAME>
  • https://<INSTANCE_HOST_ADDRESS>:<INSTANCE_WS_PORT_NB>/[v<WS_VERSION>/]<WS_TECH_NAME>
Where:
  • <INSTANCE_HOST_ADDRESS> is the network address (DNS name or the IP address) of the host machine of the active updater instance or the dispatcher instance of the SAP CC Core Server system
  • <INSTANCE_WS_PORT_NB> is the port number dedicated to the Web Services communications for the target instance
  • <WS_TECH_NAME> is the technical name of the Web Service (process component)
  • <WS_VERSION> is the version of the Web Service (optional, required only to access versions greater than 0)

Examples

Updater Instance of the SAP CC system:

  • https://<UPDATER_INSTANCE_HOST_ADDRESS>:9080/catalog
  • https://<UPDATER_INSTANCE_HOST_ADDRESS>:9080/suacProvisioning
  • https://<UPDATER_INSTANCE_HOST_ADDRESS>:9080/refilling
  • https://<UPDATER_INSTANCE_HOST_ADDRESS>:9080/v1/refilling

Dispatcher Instance:

  • https://<DISPATCHER_INSTANCE_HOST_ADDRESS>:9180/chargeableItemCharging
  • https://<DISPATCHER_INSTANCE_HOST_ADDRESS>:9180/recharging

Idempotent Web Service Operations

SAP CC provides some idempotent or safe operations via the Web Services technical interface. Idempotency management means that the same repeated invocation of safe Web services has no unintended effects on the service state.

Two different modes of message resubmission are supported by SAP CC 4.1, depending on the service operation:

  • Without response caching, which means that if a request is detected as resubmitted to SAP CC, a resubmission detection response is sent back (in this case the original operation response is not available).
    In this mode, while the invocations fail whichever the reason is (authentication, missing prerequisite, and so on), next invocations will be processed again. If an invocation is successfully processed, the next invocations will be successful but not processed again.
  • With response caching, which means that if a request is detected as resubmitted to SAP CC, the original operation response is sent back.
    In this mode, while the invocations fail whichever the reason is (authentication, missing prerequisite, and so on), next invocations will be processed again. If an invocation is in progress, the next invocations will not be processed and flagged as in progress. If an invocation is successfully processed, the next invocations will be successful but not processed again.

The idempotency capability of SAP CC is based on the Web Service Addressing (WS-Addressing or WS-A) specification and the availability of the WS-A Message ID (wsa:MessageID element) in the SOAP header. Design and implement the appropriate management of these identifiers. The WS-A Message ID is the unique identifier of a SOAP message. A SOAP message having a MessageID header can be sent to SAP CC several times without any problem.

Example of safe invocation

Here is an extract of safe SOAP message enabling safe invocation:

   <soapenv:Envelope xmlns:sch="http://schema.catalog.ws.highdeal.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
         <wsse:Security soapenv:mustUnderstand="1"
                       xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken wsu:Id="UsernameToken-3" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                  <wsse:Username>mylogin</wsse:Username>
                  <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">********</wsse:Password>
            </wsse:UsernameToken>
         </wsse:Security>
         <wsa:MessageID>uuid:c623a504-7d63-46d8-b9bf-eed05299043b</wsa:MessageID>
      </soapenv:Header>
      <soapenv:Body>
         <sch:mappingTableCreateRequest>
            <id>myMappingTable</id>
            <mappingTableClassId>myMappingTableClass</mappingTableClassId>
         </sch:mappingTableCreateRequest>
      </soapenv:Body>
   </soapenv:Envelope>

Business Object Models

SAP CC Web Services specify data models of business objects necessary to the service operations. These models relate to the master data (subscriber accounts, ...) and transactional data (chargeable items) managed by SAP Convergent Charging. Functional and technical details (see Data Type) are available from each process component.

Notes

  • A unique specification of an object may be reused in many request and response operations. The technical details facilitate the understanding of the service operations and do not reflect this sharing. You must interpret some annotations. For example, the Web Services specify a model for a subscriber account that is used by several request operations and response operations.
  • The same master data can have several specifications. For example, the Web Services specify two models for a charging contract: charging contract and charging contract state.

Master Data

The master data includes configuration data that determines the charging processing.

Master Data Related to the Product Modeling and Pricing Catalog
Master Data Related to the End Customers of the Service Provider

The customer master data includes the following configuration data:

Transactional Data

  • Incoming chargeable item
  • Temporary output chargeable item
  • Output charged item

Finding Business Objects

Any find operation defined as an SAP CC Web Service returns all business objects available in the system that match the criteria used to search for a given data model. The number of objects contained in the response message may be large and it may be difficult for calling application to iterate on these objects. To retrieve only subset of matching object set and navigate between these subsets, each find operation also specify standardized elements for requests and responses. This mechanism is called pagination.

Using pagination requires a specific implementation on calling application side. Find operations defined by SAP CC Web Services are stateless and do not store any information about the last page sent back to the calling application. To process pages, SAP CC Web Services use a reference that must be transferred from a find response to the next find request to navigate forward or backward among pages. Requests have to be filled with a fromUniqueId element, which is the reference of the first element of the page and response contains a lastUniqueId element which is the reference of the last object of this page. This lastUniqueId element must be used to go forward to the following page.

To activate pagination mechanism a searchWindow element must be set up in the find operation request. This element defines two children to navigate and configure pagination:

  • fromUniqueId: The reference to start pagination from. If it is omitted the initial window of the object set is returned by the SAP CC system (first find operation request). It must be then set in following find operation requests and must be equal to the lastUniqueId element read from the previous find operation response.
  • windowSize: The maximum number of objects expected in the find operation response. The SAP CC system returns a subset of the matching object set.
If pagination is activated each find operation response defines an element lastUniqueId to navigate between pages of the matching object set. This element defines the reference of the last element of the returned page. This reference must be used when next page is requested to define the value for element fromUniqueId so that SAP CC can internally determine the next page to send back. Element lastUniqueId not available in the response means that the current page is the last page.

Note

  • There is no link between fromUniqueId, windowSize, and lastUniqueId. This is the reason why, even knowing the fromUniqueId that has been used to find objects and the page size, lastUniqueId must be used for next page processing. For example, lastUniqueId is not the sum of fromUniqueId plus windowSize.
  • It is possible to change the windowSize between two requests asking for pages. Only the element lastUniqueId is used to identify the object following the last one sent in the previous page.
  • To monitor the remaining count of objects the flag totalCountRequired can be set to true. This is not required to navigate through pages. If set to true, an element totalCount in the matching response counts the number of remaining objects in the set after the current page. The number of objects in the current page is included in this count.

Example of paginated find invocation

Here is an extract of SOAP messages enabling pagination in find operation:

An initial find operation request search for Charge Plan Descriptions. The searchWindow element is defined, windowSize element is set to two charge plan descriptions maximum to retrieve per page. No fromUniqueId is defined as this is the first request.

<soapenv:Envelope xmlns:sch="http://schema.catalog.ws.highdeal.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>mylogin</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">********</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <sch:chargePlanClassDescriptionFindRequest>
         <chargePlanClassSearchFilter>
            <searchWindow>
               <windowSize>2</windowSize>
            </searchWindow>
            <totalCountRequired>true</totalCountRequired>
         </chargePlanClassSearchFilter>
      </sch:chargePlanClassDescriptionFindRequest>
   </soapenv:Body>
</soapenv:Envelope>
                  

As an answer, the system indicates that:

  • 6 remaining Charge Plan Descriptions defined in the SAP CC system match with the search criteria, including this current page (totalCount)
  • The last reference for this page is 30637 (lastUniqueId)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns3:chargePlanClassDescriptionFindResponse xmlns:ns3="http://schema.catalog.ws.highdeal.com/">
         <status>return</status>
         <totalCount>6</totalCount>
         <lastUniqueId>30637</lastUniqueId>
         <chargePlanClassDescription>
            <id>CP1</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 1</description>
         </chargePlanClassDescription>
         <chargePlanClassDescription>
            <id>CP2</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 2</description>
         </chargePlanClassDescription>
      </ns3:chargePlanClassDescriptionFindResponse>
   </S:Body>
</S:Envelope>
                  

The next page is requested and another request is defined to search for Charge Plan Description. SearchWindow element is defined, windowSize element is set to 2 Charge Plan Descriptions. fromUniqueId is defined to 30637 as this was the value in last response the first request.

<soapenv:Envelope xmlns:sch="http://schema.catalog.ws.highdeal.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>mylogin</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">********</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <sch:chargePlanClassDescriptionFindRequest>
         <chargePlanClassSearchFilter>
            <searchWindow>
               <windowSize>2</windowSize>
               <fromUniqueId>30637</fromUniqueId>
            </searchWindow>
            <totalCountRequired>true</totalCountRequired>
         </chargePlanClassSearchFilter>
      </sch:chargePlanClassDescriptionFindRequest>
   </soapenv:Body>
</soapenv:Envelope>
                  

As an answer, the system indicates that:

  • 4 remaining Charge Plan Descriptions defined in the SAP CC system match with the search criteria, including this current page (totalCount)
  • The last reference for this page is 30657 (lastUniqueId)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns3:chargePlanClassDescriptionFindResponse xmlns:ns3="http://schema.catalog.ws.highdeal.com/">
         <status>return</status>
         <totalCount>4</totalCount>
         <lastUniqueId>30657</lastUniqueId>
         <chargePlanClassDescription>
            <id>CP3</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 3</description>
         </chargePlanClassDescription>
         <chargePlanClassDescription>
            <id>CP4</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 4</description>
         </chargePlanClassDescription>
      </ns3:chargePlanClassDescriptionFindResponse>
   </S:Body>
</S:Envelope>
                  

The next page is requested and another request is defined to search for Charge Plan Description. SearchWindow element is defined, windowSize element is set to 2 Charge Plan Descriptions. fromUniqueId is defined to 30637 as this was the value in last response the first request.

<soapenv:Envelope xmlns:sch="http://schema.catalog.ws.highdeal.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>mylogin</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">********</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <sch:chargePlanClassDescriptionFindRequest>
         <chargePlanClassSearchFilter>
            <searchWindow>
               <windowSize>2</windowSize>
               <fromUniqueId>30657</fromUniqueId>
            </searchWindow>
            <totalCountRequired>true</totalCountRequired>
         </chargePlanClassSearchFilter>
      </sch:chargePlanClassDescriptionFindRequest>
   </soapenv:Body>
</soapenv:Envelope>
                  

As an answer, the system indicates that:

  • 2 remaining Charge Plan Descriptions defined in the SAP CC system match with the search criteria, including this current page (totalCount)
  • There is no last reference what indicates that this page is the last one (lastUniqueId)
  • .

<soapenv:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns3:chargePlanClassDescriptionFindResponse xmlns:ns3="http://schema.catalog.ws.highdeal.com/">
         <status>return</status>
         <totalCount>2</totalCount>
         <chargePlanClassDescription>
            <id>CP5</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 5</description>
         </chargePlanClassDescription>
         <chargePlanClassDescription>
            <id>CP6</id>
            <owner>webServicesCatalog</owner>
            <status>released</status>
            <description>Charge Plan 6</description>
         </chargePlanClassDescription>
      </ns3:chargePlanClassDescriptionFindResponse>
   </soapenv:Body>
</soapenv:Envelope>
                  

Service Operation Processing

SAP CC Web Services provide two particular modes for bulk processing: The bundle and mass modes. The bundle or mass operation groups multiple single operations for processing by the connected SAP CC system. All the single operations are the same type. The single operations are sequentially executed.

Note

  • The idempotency is applied to the bundle operation and mass operation. It does not apply to each single operation included in the bundle or mass operation message.
  • Up to 1,000 single operations can be set in a bulk operation.

You implement the operations in bundle mode or in mass mode according to your business requirements and context.

Bundle Mode (All or None)

The bundle operation groups multiple single operations for processing. All single operations are successfully performed or none: The processing stops at the first failed single operation and the modifications done by the previous single operations are canceled in the SAP CC system.

The overall bundle result includes a list of successful single results. In case of business error, the overall result is failed and includes a list of successful but not applied single results and one failed operation. In case of system error, a SOAP fault is replied. No change applies.

The required implementation of the error handling is facilitated: Your application must send again the same request once the issue has been fixed. Each time an error occurs, you must restart from the beginning.

Examples

Mass Mode

The mass operation groups multiple single operations for processing. Most of the single operations are successfully performed whatever the failure of certain single operations: The processing is never stopped (except for a system failure) and the modifications done by the previous single operations remain in the SAP CC system.

The overall mass result includes a list of successful or erroneous single results.

  • In case of some business errors, the overall result is successful and includes a complete list of successful or erroneous single results and the count of errors.
  • If all the single operations fail, then the mass operation fails.
In case of system error, a SOAP fault is replied. No change applies.

The required implementation of the error handling is intelligent based on the count of individual errors: Your application must be able to take into account the successful and the failed single operations to only send again the relevant single operations later on. All the business errors are immediately listed in the mass result.

Examples

  • Create or change subscriber accounts in mass mode
  • Create or change charging contracts in mass mode

SAP Passport Handling

SAP CC Web Services support the SAP Passport technology for the end-to-end tracing feature. See the SAP CC Application Help and the SAP CC Operations Guide for more information about the logging and tracing functions, and performance troubleshooting.

Security

Consult the SAP CC Security Guide to get information on communication security and user rights to perform the service operations described in this documentation.

Configuration

Consult the SAP CC Configuration and Implementation Guide to set up the technical settings of the SAP CC system for the Web Services and to get some recommendations on the implementation activities.

Related Documentation

For more information, see the related product documentation of SAP Convergent Charging in SAP Help Portal.