Using Anypoint Studio to Configure SAP S/4HANA SOAP Connector 2.1 - Mule 4
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files.
To add and configure a connector in Studio:
If you are new to configuring connectors in Studio, see Using Anypoint Studio to Configure a Connector.
Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
-
In Studio, select File > New > Mule Project.
-
Enter a name for your Mule project and click Finish.
Add the Connector to Your Project
Add SAP S/4HANA SOAP Connector to a Mule project to automatically populate the XML code with the connector’s namespace and schema location, as well as to add the required dependencies to the project’s pom.xml
file.
-
In Studio, create a Mule project.
-
In the Mule Palette view, click (X) Search in Exchange.
-
In Add Modules to Project, type
SAP S/4HANA SOAP
in the search field. -
Click the SAP S/4HANA SOAP connector name in Available modules.
-
Click Add.
-
Click Finish.
Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace.
Configure an Input Source
An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with SAP S/4HANA SOAP Connector:
-
Outbound Message Listener, which listens for incoming SAP S/4HANA SOAP outbound messages
-
HTTP Listener, which initiates a flow each time it receives a request on the configured host and port
-
Scheduler, which initiates a flow when a time-based condition is met
For example, to configure HTTP Listener, follow these steps:
-
In the Mule Palette view, select HTTP > Listener.
-
Drag Listener to the Studio canvas.
-
On the Listener tab, optionally change the value of the Display Name field.
-
Specify a value for the Path field.
-
Click the plus sign (+) next to the Connector configuration field to configure a global element that can be used by all instances of
HTTP Listener
in the app. -
On the General tab, specify connection information.
-
On the TLS tab, optionally specify TLS information.
-
On the Advanced tab, optionally specify reconnection information, including a reconnection strategy.
-
Click Test Connection to confirm that Mule can connect with the specific server.
-
Click OK.
Add a Connector Operation to the Flow
When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform.
To add an operation for SAP S/4HANA SOAP Connector, follow these steps:
-
In the Mule Palette view, select SAP S4 HANA SOAP and then select the desired operation.
-
Drag the operation onto the Studio canvas to the right of the input source.
Global Configuration Elements
To use SAP S/4HANA SOAP Connector in a Mule app, you can configure a global SAP S/4HANA configuration element for use by SAP S/4HANA Connector operations in your application.
You can put placeholder values in the mule-artifact.content
configuration file in the src/main/resources
folder of your project.
You can either enter your credentials in the global configuration content or reference a configuration file that contains the values for your credentials. Using a configuration file is recommended for simpler maintenance and better reuse of your project. Keeping these values in a separate file is useful if you need to deploy to different environments, such as production, development, and QA, where access credentials might differ.
Configure the SAP S/4HANA SOAP Config
When you configure a connector, it is best to configure a global element that can be used by all instances of that connector in the app. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target SAP S/4HANA system. SAP S/4HANA Connector supports both Basic authentication and OAuth 2.0 client credentials authentication.
To configure the global element for SAP S/4HANA SOAP Connector, follow these steps:
-
In your project, click the Global Elements tab at the base of the canvas.
-
In the Global Configuration Elements screen, click Create:
-
In the Choose Global Type wizard, expand Connector Configuration, select SAP S/4HANA SOAP Config, and click OK.
-
In the General tab, select the connection authentication from the Connection drop-down:
-
Enter the required information for the selected connection type and click OK.
-
Click Test Connection to ensure that your access credentials are correct.
-
Click the Advanced tab to configure the following values:
Studio Field Description Discovery Service Enabled
Feature switch for service discovery. If disabled, the service discovery relative path is not applied.
Discovery Service Path
Relative path from the base URL to the service to use for automatic services discovery
Service directory
Common HTTP directory for all SAP services. You can leave this parameter blank and specify the HTTP directory individually for every service in the unlisted services list.
Unlisted services
List of services to add to the list of discovered services
Service discovery resolution timeout
Connection timeout for service discovery
Service discovery timeout unit
Time unit to use in the service discovery resolution timeout configuration
Default headers
Custom headers to include in each request sent
Default query parameter
Custom query parameters to include in each request sent
TLS configuration
TLS configuration
Proxy configuration
Configuration for executing requests through a proxy
-
Click OK to save the global connector configuration.
Basic Authentication
Enter the following information on the General tab of the Global Element Properties screen to configure Basic authentication:
-
Service Base URL
URL of the SAP S/4HANA instance you want to manage -
Username
User name used to initialize the session -
Password
Password used to authenticate the user
OAuth 2.0 Client Credentials Authentication
Enter the following required information on the General tab of the Global Element Properties screen to configure OAuth 2.0 client credentials authentication:
-
Service base URL
Base URL of the service provider of the SAP S/4HANA system to access from the connector
All other endpoints are derived from the base URL. -
Client ID
OAuth client ID that is registered with the service provider. -
Client secret
OAuth client secret that corresponds to the client ID and is registered with the service provider.
Configure the SAP S/4HANA SOAP Listener Config
Use the Global Element Properties configuration dialog to configure a global element for SAP S/4HANA SOAP Connector:
-
In your project, click the Global Elements tab at the base of the canvas.
-
In the Global Configuration Elements screen, click Create:
-
In the Choose Global Type wizard, expand Connector Configuration, select SAP S/4HANA SOAP Listener Config, and click OK.
-
Configure the following values in the General tab:
-
HTTP Listener
Reference to a global HTTPS Listener configuration, for example:HTTPS_Listener_config
. This configuration must be secured by using HTTPS protocol in order to receive outbound messages from the SAP S/4HANA system. -
WSDL Path
Specify the paths to the WSDL definitions to use for resolving metadata keys. -
Encoding
Character encoding used in the messaging.
-
-
Click OK to save the global connector configuration.
It is possible to share the same path between multiple sources, but sources that share a path cannot listen to the same message type.
The list of message types specifies the message types the source can listen to. Message types are built from the provided WSDL definitions. The message type ANY, which is always present, allows the source to listen to any outbound message type sent from the SAP S/4HANA system.
Next Step
After configuring the SAP S/4HANA SOAP Connector for use in Studio, see the Examples topic for more examples of configuring the connector in Studio.