Last update: 29. Feb 2024
How to manage message metadata in the following components
- Cloud Integration (this blogpost)
- API Management
- Event Mesh
In SAP PO the tasks were quite clear: All interface definitions were created in or imported into ESR.
In SAP Cloud Integration we do not even have to use schema definitions, but they are helpful, not only for XML schema validations. Usually it is good to know the structure of an API/Webhook/Event/Message and store this information in our Integration Flow. Btw: our Interface Documentation adds all schema files as attachments to the automatically generated PDF, so they are also part of the technical documentation.
- There is no API-first or Outside-In Approach where API/message definitions are created in Cloud Integration first and then used in applications for an implementation
- The main use case is simply importing already existing API definitions/message schema documents
- In some cases we do not even have a schema, so we have to generate it…
- SOAP APIs are using XML messages and are documented via XSD and WSDL files.
- OData APIs are often documented in EDMX (XML) files, even if the API supports JSON message exchange
- HTTP APIs can be very technical and exchange any message types (XML, JSON, but also CSV or plain text)
- REST APIs exchanging JSON messages are often documented via OpenAPI (f.k.a. Swagger via YAML/JSON) or sometimes (more rarely) via RAML/RSDL/WADL
- GraphQL APIs are documented via SDL (Schema Definition Language), but can not be used elsewhere. Typically you generate GraphQL requests via Groovy (or simple ones via Content Modifier)
- XSD, WSDL, EDMX and OpenAPI JSON schemas can be imported and used in SAP Cloud Integration Message Mappings or simply as Reference Documents on Integration Flow level.
How to generate required interface definitions if NO schema is available or provided:
With ChatGPT you can easily generate them:
- XML to XSD
- CSV to XSD
- JSON to OpenAPI (JSON format)
How to import messages from SAP ABAP Backends:
- RFC enabled function modules (can be accessed via SOAP- or via RFC-Adapter): Get the WSDL via browser calling URL http://<host>:<port>/sap/bc/soap/wsdl11?services=<RFC-FM> (make sure that you have activated the service /sap/bc/soap/wsdl11 in transaction SICF)
- IDoc: Export the XSD from transaction WE60
- WS Proxy: Get the WSDL from transaction SPROXY (or SOAMANAGER)
- XI Proxy: Get the WSDL from transaction SPROXY
- OData: Get the EDMX from the API URL by adding /$metadata at the end of the URL from transaction /iwfnd/maint_service or using the OData API import wizard using ODC
- Btw: You can also find the standard IDocs and SOAP APIs in the Integration Advisor (and OData for S/4HANA Cloud), but the usage is limited to MIGs and MAGs, so a simple export of XSD/WSDL is not (yet?) supported.