# mulesoft SAP S/4HANA SOAP Connector - Full Documentation
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# SAP S/4HANA SOAP Connector 2.6
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector (SAP S/4HANA SOAP Connector) provides full support for the SOAP APIs exposed by
SAP S/4HANA Cloud ERP, and starting with version 2.1, also provides support for SAP S/4HANA
on-premise ERP. This connector enables you to automatically discover SOAP services enabled on your
SAP S/4HANA instance and to invoke the SOAP service and associated operations.
For software requirements and compatibility information, see the
[SAP S/4HANA SOAP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-s4-hana-soap-cloud-connector-release-notes-mule-4).
## Before You Begin
Before you create an app and use this connector, you must:
- Have a developer account or other valid SAP S/4HANA instance.
- Have a MuleSoft Enterprise license.
- Enable discovery service in your SAP S/4HANA instance.
- Have a communication user that is assigned to the corresponding communication arrangements for the
desired APIs.
- Be familiar with:
- SAP S/4HANA SOAP
- Mule runtime engine (Mule)
- Anypoint Connectors
- Anypoint Studio essentials
## Common Use Cases For the Connector
Send an XML request to SAP S/4HANA’s SOAP API and print a response.
## Using Exchange Templates and Examples
[Anypoint Exchange](https://www.mulesoft.com/exchange/) provides templates you can use as a starting
point for your app, as well as examples that illustrate a complete solution.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to
create an app with [Anypoint Studio](https://docs.mulesoft.com/sap-s4hana-soap-connector/latest/sap-s4hana-soap-connector-studio).
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [SAP S/4HANA SOAP Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/sap-s4-hana-soap-cloud-connector-release-notes-mule-4)
- [SAP S/4HANA SOAP Connector on Exchange](https://www.mulesoft.com/exchange/com.mulesoft.connectors/mule-sap-s4hana-soap-cloud-connector/)
- [Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# SAP S/4HANA SOAP Connector 2.6 Examples
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
## Send an XML Request and Print the Response
This example sends an XML request to SAP S/4HANA’s SOAP API and prints the response:

### POM File for This Example
```xml
4.0.0
com.mycompany
sap-hana-soap-demo
2.1.0
mule-application
sap-hana-soap-demo
UTF-8
UTF-8
4.2.0
3.2.7
org.mule.tools.maven
mule-maven-plugin
${mule.maven.plugin.version}
true
org.mule.connectors
mule-http-connector
1.5.3
mule-plugin
org.mule.connectors
mule-sockets-connector
1.1.5
mule-plugin
com.mulesoft.connectors
mule-sap-s4hana-soap-cloud-connector
2.1.0
mule-plugin
anypoint-exchange
Anypoint Exchange
https://maven.anypoint.mulesoft.com/api/v1/maven
default
mulesoft-releases
MuleSoft Releases Repository
https://repository.mulesoft.org/releases/
default
mulesoft-releases
mulesoft release repository
default
https://repository.mulesoft.org/releases/
false
```
### XML Code for This Example
```xml
```
## Send an XML Request and Receive the Replication Outbound Message
In this example, an XML request is sent to SAP S/4HANA’s SOAP API and then receives the replication
outbound message, which is saved to the object store:

This flow is used to get the outbound message from the object store:

### POM File for This Example
```xml
4.0.0
com.mulesoft.connectors.examples
sap-hana-soap-demo
2.1.0
mule-application
s4-hana-source-demo
UTF-8
UTF-8
4.3.0
3.3.5
org.apache.maven.plugins
maven-clean-plugin
3.0.0
org.mule.tools.maven
mule-maven-plugin
${mule.maven.plugin.version}
true
mule-application
org.mule.connectors
mule-http-connector
1.5.17
mule-plugin
com.mulesoft.connectors
mule-sap-s4hana-soap-cloud-connector
2.1.0
mule-plugin
org.mule.connectors
mule-objectstore-connector
1.1.5
mule-plugin
anypoint-exchange-v2
Anypoint Exchange
https://maven.anypoint.mulesoft.com/api/v2/maven
default
mulesoft-releases
MuleSoft Releases Repository
https://repository.mulesoft.org/releases/
default
mulesoft-releases
mulesoft release repository
default
https://repository.mulesoft.org/releases/
false
```
### XML Code for This Example
```xml
```
## See Also
[Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# SAP S/4HANA SOAP Connector 2.6 Reference
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Connector for SAP S/4HANA SOAP provides full support for the SOAP APIs exposed by SAP
S/4HANA ERP and, starting with 2.1.x, provides support also for SAP S/4HANA On-Premise ERP.
The main class of an extension is the entry point from which configurations, connection providers,
operations, and sources are declared.
## Configurations
---
### Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Connection | | Connection types to provide to this configuration. | | x |
Encoding | | Default character encoding to use in all the messages. If not specified, the default charset in the mule configuration will be used. | | |
Connection timeout | | Connection timeout for the request. | 30 | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit to use in the timeout configurations. | SECONDS
| |
Name | | Identifier of this element used to reference it in other components. | | x |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate. | | |
Version | | WS-Addressing version. Defaults to WSA200508. | WSA200508 | |
From | | Reference of the endpoint where the message originated from. | | |
#### Connection Types
##### Basic Authentication
Basic authentication is the simplest way of enforcing access controls because it does not require
cookies, session identifiers, or login pages. Instead, it uses standard fields in the HTTP header,
removing the need for handshakes. This mechanism provides no confidentiality protection for the
transmitted credentials. They are merely encoded with Base64 in transit, but not encrypted or hashed
in any way.
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Service base URL | | Base URL of the service on SAP S/4HANA to be accessed from the connector. | | x |
Username | | Account username with which to log in to SAP S/4HANA. | | x |
Password | | Account password with which to log in to SAP S/4HANA. | | x |
Discovery Service Enabled | | Enables automatic service discovery. | true | |
Discovery Service Path | | URL to use for automatic services discovery. | /sap/bc/srt/wsil_ext
| |
Service directory | | Common HTTP directory for all SAP services. | | |
Unlisted services | | List of services to add to the list of discovered services. | | |
Service discovery resolution timeout | | Connection timeout for service discovery. | 30
| |
Service Discovery Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit to use in the timeout configuration. | SECONDS
| |
Default HTTP headers | | Default HTTP headers to include in the message. | | |
Default query parameters | | Default query parameters to include in the request. | | |
Proxy configuration | | Proxy configuration for the connector. | | |
TLS configuration | | Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol then the user needs to configure at least the keystore in the tls:context child element of the listener-config. | HTTP | |
Reconnection | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
##### Certificate Authentication
An X.509 certificate is a digital certificate based on the widely accepted International
Telecommunications Union (ITU) X.509 standard, which defines the format of public key infrastructure
(PKI) certificates. They are used to manage identity and security in internet communications and
computer networking. X.509 authentication requires a discovery service configuration, a valid
certificate, and a secure connection (HTTPS).
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Service base URL | | Base URL of the service on SAP S/4HANA to be accessed from the connector. | | x |
Discovery Service Enabled | | Enables automatic service discovery. | true | |
Discovery Service Path | | URL to use for automatic services discovery. | /sap/bc/srt/wsil_ext
| |
Service directory | | Common HTTP directory for all SAP services. | | |
Unlisted services | | List of services to add to the list of discovered services. | | |
Service discovery resolution timeout | | Connection timeout for service discovery. | 30
| |
Service Discovery Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit to use in the timeout configuration | SECONDS
| |
Default HTTP headers | | Default HTTP headers to include in the message. | | |
Default query parameters | | Default query parameters to include in the request. | | |
Proxy configuration | | Proxy configuration for the connector. | | |
TLS configuration | | Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol then the user needs to configure at least the keystore in the tls:context child element of the listener-config. | HTTP | |
Reconnection | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
##### OAuth 2.0 Client Credentials Authentication
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
OAuth 2.0 authentication provides a secure way of authenticating against the resource using the
provided client ID and client secret. Authentication is ensured using an access token generated by
the resource. The generated token has a limited lifespan and is automatically refreshed by
initiating a refresh dance, after the token expires.
###### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Service base URL | | Base URL of the SAP S/4HANA SOAP service to access from the connector. | | x |
Discovery Service Enabled | | Enables automatic service discovery. | true | |
Discovery Service Path | | URL to use for automatic services discovery. | /sap/bc/srt/wsil_ext
| |
Service directory | | Common HTTP directory for all SAP services. | | |
Unlisted services | | List of services that will be added to the list of discovered services, for example: /sap/bc/srt/wsdl_ext/flv_10002S111AD1/srvc_url/sap/bc/srt/scs_ext/sap/creditmanagementaccountbyidqu1 If the Service directory parameter is not specified, then the HTTP directory needs to be prepended before every service name in this list, in the following format: {directory}/{service-name}. | | |
Service discovery resolution timeout | | Connection timeout for service discovery. | 30 | |
Service Discovery Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit to use in the timeout configuration | SECONDS | |
Default HTTP headers | | Default HTTP headers the message should include. | | |
Default query parameters | | Default query parameters the request should include. | | |
Proxy configuration | | Proxy configuration for the connector. | | |
TLS configuration | | Defines a configuration for TLS, which can be used from both the client and server sides to secure communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured using TLS or SSL. If HTTPS is configured as the protocol then the user needs to configure at least the keystore in the tls:context child element of the listener-config. | HTTP | |
Reconnection | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
Client Id | | OAuth client ID as registered with the service provider. | | x |
Client Secret | | OAuth client secret as registered with the service provider. | | x |
Token Url | | Service provider’s token endpoint URL. | https://{host-name}/{oauth-service}/{generate-token-resource}
| |
Scopes | | OAuth scopes requested during the dance. If not provided, it defaults to those in the annotation. | | |
Object Store | | Reference to the object store used to store each resource owner ID’s data. If not specified, the default object store is automatically provisioned by Mule. | | |
#### Associated Operations
- [Invoke](#Invoke)
- [Unauthorize](#Unauthorize)
---
### Listener Config
#### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Name | String | Name for this configuration. Connectors reference the configuration with this name. | | x |
Encoding | | Default character encoding to use in all the messages. If not specified, the default charset in the Mule configuration is used. | | |
HTTP Listener | | Reference to the global HTTP Listener that will be used to receive SOAP S/4HANA messages. | | x |
WSDL Paths | | Specify the locations of the WSDL definitions. | | |
Name | | Identifier of this element; used by other components to reference it. | | x |
Security | | Message-level security configuration. | | |
Expiration Policy | | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate. | | |
#### Associated Sources
- [Outbound Message Listener](#OutboundMessageListener)
## Supported Operations
- [Invoke](#Invoke)
- [Unauthorize](#Unauthorize)
## Invoke
``
Consumes an operation from an S/4HANA SOAP Web Service.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Web Service Addressing | | Configuration of the WS-Addressing specific SOAP headers. | | |
Custom Soap Headers | | Additional soap headers to be wrapped in the soap envelope. | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Service name | | Name of the service. | | x |
Operation name | | Operation name of the service. | | x |
Message | | Content of the message. | #[payload] | |
Connection timeout | | Connection timeout for the request. | | |
Connection Timeout Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit to use in the timeout configurations | | |
Custom HTTP headers | | Custom headers that the request will include. The headers specified here will be merged with the default headers specified in the configuration. | | |
Custom query parameters | | Custom query parameters that the request will include. The query parameters specified here will be merged with the default query parameters specified in the config. | | |
Target Variable | | Name of a variable in which to store the operation’s output. | | |
Target Value | | Expression to evaluate against the operation’s output and store the expression outcome in the target variable. | #[payload] | |
Reconnection Strategy | | Retry strategy in case of connectivity errors. | | |
### Output
### For Configurations
- [Config](#Config)
### Throws
- S4HANA-SOAP:BAD\_REQUEST
- S4HANA-SOAP:CONNECTIVITY
- S4HANA-SOAP:PROCESSING\_ERROR
- S4HANA-SOAP:RETRY\_EXHAUSTED
## Unauthorize
``
Deletes all of the access token information of a given resource owner ID so that it’s impossible to
execute any operation for that user without repeating the authorization dance.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Config Ref | | Name of the configuration to use to execute this component. | | x |
### For Configurations
- [Config](#Config)
## Sources
## Outbound Message Listener
``
Creates an input source that listens for incoming SAP S/4HANA SOAP outbound messages.
### Parameters
| Name | Type | Description | Default Value | Required |
|---|
Configuration | String | Name of the configuration to use. | | x |
Path | | Path where server listens for the outbound messages. | | x |
Allowed Methods | | Comma-separated list of methods. Leave empty to allow all. | GET, POST | |
Message Type | | Message type the source listens for. | | x |
Allowed S/4HANA Systems | | Parameter for securing the Outbound Message Listener to receive outbound messages only from allowed S/4HANA systems. | | |
Config Ref | | Name of the configuration to use to execute this component. | | x |
Primary Node Only | | Whether this source should be executed only on the primary node when running in a cluster. | | |
On Capacity Overload | | Strategy that the Mule applies when the flow receives more messages to process than it has the capacity for | WAIT | |
Streaming Strategy | | Configure how Mule processes streams with streaming strategies. Repeatable streams are the default behavior. | | |
Redelivery Policy | | Defines a policy for processing the redelivery of the same message. | | |
Body | | | | |
Headers | | | | |
Status Code | | | | |
Reason Phrase | | | | |
### Output
### For Configurations
- [Listener Config](#ListenerConfig)
## Types
### Proxy Configuration
| Field | Type | Description | Default Value | Required |
|---|
Host | | Host where the proxy requests are sent. | | x |
Port | | Port where the proxy requests are sent. | | x |
Username | | Username to authenticate against the proxy. | | |
Password | | Password to authenticate against the proxy. | | |
Non Proxy Hosts | | List of hosts against which the proxy should not be used. | | |
Ntlm Domain | | Domain to authenticate against the proxy. | | |
### TLS
Defines a configuration for TLS, which can be used from both the client and server sides to secure
communication for the Mule app. When using the HTTPS protocol, the HTTP communication is secured
using TLS or SSL. If HTTPS is configured as the protocol then the user needs to configure at least
the keystore in the `tls:context` child element of the `listener-config`.
| Field | Type | Description | Default Value | Required |
|---|
Enabled Protocols | | Comma-separated list of protocols enabled for this context. | | |
Enabled Cipher Suites | | Comma-separated list of cipher suites enabled for this context. | | |
Truststore | | | | |
Keystore | | | | |
Revocation Check | | | | |
### Truststore
| Field | Type | Description | Default Value | Required |
|---|
Path | | Location of the truststore, which will be resolved relative to the current classpath and file system, if possible. | | |
Password | | Password used to protect the truststore. | | |
Type | | Type of store used. | | |
Algorithm | | Algorithm used by the truststore. | | |
Insecure | | If true, no certificate validations will be performed, rendering connections vulnerable to attacks. Use at your own risk. | | |
### Keystore
| Field | Type | Description | Default Value | Required |
|---|
Path | | Location of the keystore, which will be resolved relative to the current classpath and file system, if possible. | | |
Type | | Type of store used. | | |
Alias | | When the keystore contains many private keys, this attribute indicates the alias of the key that should be used. If not defined, the first key in the file will be used by default. | | |
Key Password | | Password used to protect the private key. | | |
Password | | Password used to protect the keystore. | | |
Algorithm | | Algorithm used by the keystore. | | |
### Standard Revocation Check
| Field | Type | Description | Default Value | Required |
|---|
Only End Entities | | Only verify the last element of the certificate chain. | | |
Prefer Crls | | Try CRL instead of OCSP first. | | |
No Fallback | | Do not use the secondary checking method (the one not selected before). | | |
Soft Fail | | Avoid verification failure when the revocation server can not be reached or is busy. | | |
### Custom OCSP Responder
| Field | Type | Description | Default Value | Required |
|---|
Url | | URL of the OCSP responder. | | |
Cert Alias | | Alias of the signing certificate for the OCSP response (must be in the truststore) if present. | | |
### CRL File
| Field | Type | Description | Default Value | Required |
|---|
Path | | Path to the CRL file. | | |
### Reconnection
| Field | Type | Description | Default Value | Required |
|---|
Fails Deployment | | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy. | | |
Reconnection Strategy | | Reconnection strategy to use. | | |
### Reconnect
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often in milliseconds to reconnect. | | |
Blocking | | If false, the reconnection strategy will run in a separate, non-blocking thread. | | |
Count | | How many reconnection attempts to make. | | |
### Reconnect Forever
| Field | Type | Description | Default Value | Required |
|---|
Frequency | | How often in milliseconds to reconnect. | | |
Blocking | | If false, the reconnection strategy will run in a separate, non-blocking thread. | | |
### Expiration Policy
| Field | Type | Description | Default Value | Required |
|---|
Max Idle Time | | Scalar time value for the maximum amount of time a dynamic configuration instance can be idle before it’s considered eligible for expiration. | | |
Time Unit | NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS
| Time unit that qualifies the maxIdleTime attribute. | | |
### Listener Security Config
| Field | Type | Description | Default Value | Required |
|---|
Service Credentials | | Listener client credentials configuration. | | x |
Signature Verification Strategy | | Strategy used to verify signed SOAP messages. | | |
### Username Password Security Strategy Config
| Field | Type | Description | Default Value | Required |
|---|
Clients | | List of authorized usernames and passwords. | | |
### Username Password Entry
| Field | Type | Description | Default Value | Required |
|---|
Username | | Client’s username. | | x |
Password | | Client’s password. | | x |
### Default Strategy
| Field | Type | Description | Default Value | Required |
|---|
CACerts Password | | Password for the default Java cacerts truststore. This store is located in <JAVA_HOME>/lib/security/cacerts. | changeit
| |
### Trust Store Strategy
| Field | Type | Description | Default Value | Required |
|---|
Trust store path | | Path to your truststore. This is either an absolute path or a path relative to your resources folder. | | x |
Trust store password | | Password for the truststore. | | x |
Trust store type | | Type of truststore. | PKCS12
| |
### SOAP Output Envelope
| Field | Type | Description | Default Value | Required |
|---|
Attachments | | | | |
Body | | | | |
Headers | | | | |
### SOAP Attributes
| Field | Type | Description | Default Value | Required |
|---|
Transport Additional Data | | | | |
Transport Headers | | | | |
### Addressing Settings
| Field | Type | Description | Default Value | Required |
|---|
Wsa To | | Address of the intended receiver of this message. | | x |
Wsa Version | | WS-Addressing version. If not specified, the connector uses the value from the configuration. | | |
Wsa From | | Reference of the endpoint from which the message originated. If not specified, the connector uses the value from the configuration. | | |
Wsa Message ID | | Identifier that uniquely identifies this message in time and space. If not specified, the connector uses time-based UUID. | | |
Wsa Relates To | | Message ID to which the message relates. | | |
### WSDL Path
| Field | Type | Description | Default Value | Required |
|---|
Wsdl Path | | Location of the WSDL definition. | | x |
### Outbound Message Attributes
| Field | Type | Description | Default Value | Required |
|---|
Http Request Attributes | | | | |
Message Type | | | | |
Soap Headers | | | | |
### Http Request Attributes
| Field | Type | Description | Default Value | Required |
|---|
Client Certificate | | | | |
Http Headers | | | | |
Listener Path | | | | |
Local Address | | | | |
Method | | | | |
Query Params | | | | |
Raw Request Uri | | | | |
Remote Address | | | | |
Scheme | | | | |
Uri Params | | | | |
Version | | | | |
### Allowed Outbound System Parameter
| Field | Type | Description | Default Value | Required |
|---|
Recipient Business System ID | | | | |
Sender Business System ID | | | | |
### Repeatable In Memory Stream
When streaming in this mode, Mule does not use the disk to buffer the contents. If you exceed the
buffer size, the message fails.
| Field | Type | Description | Default Value | Required |
|---|
Initial Buffer Size | | Amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can fit into the specified buffer size, then the buffer is expanded according to the bufferSizeIncrement attribute, with an upper limit of what is specified for maxInMemorySize. | | |
Buffer Size Increment | | How much the buffer size expands if it exceeds the amount specified for its initial size. Setting a value of zero or lower means that the buffer should not expand, and a STREAM_MAXIMUM_SIZE_EXCEEDED error is thrown when the buffer gets full. | | |
Max Buffer Size | | Maximum amount of memory to use. If the specified maximum is exceeded, a STREAM_MAXIMUM_SIZE_EXCEEDED error is thrown. A value lower than or equal to zero means there is no limit on the buffer size. | | |
Buffer Unit | | The unit in which all these buffer size attributes are expressed | | |
### Repeatable File Store Stream
File store repeatable streams require buffering. Mule keeps a portion of the stream contents in
memory. If the stream contents are larger than the configured buffer size, Mule backs up the
buffer’s content to disk and then clears the memory.
| Field | Type | Description | Default Value | Required |
|---|
In Memory Size | | Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed, then the contents start to buffer on the disk. | | |
Buffer Unit | | Unit in which maxInMemorySize is expressed. | | |
### Non-repeatable Stream
In some cases, you may want to disable the repeatable stream functionality and use non-repeatable
streams, which can have less performance overhead, memory use, and cost.
| Field | Type | Description | Default Value | Required |
|---|
Transactional Action | ALWAYS_JOIN JOIN_IF_POSSIBLE NOT_SUPPORTED
| Type of joining action that operations can take regarding transactions. | JOIN_IF_POSSIBLE
| |
### Redelivery Policy
| Field | Type | Description | Default Value | Required |
|---|
Max Redelivery Count | | Maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message. | | |
Message Digest Algorithm | | Secure hashing algorithm to use. If not set, the default is SHA-256. | | |
Message Identifier | | Defines which strategy is used to identify the messages. | | |
Object Store | | Object store where the redelivery counter for each message is going to be stored. | | |
### Redelivery Policy Message Identifier
| Field | Type | Description | Default Value | Required |
|---|
Use Secure Hash | | Whether to use a secure hash algorithm to identify a redelivered message. | | |
Id Expression | | Defines one or more expressions to use to determine when a message has been redelivered. This property may only be set if useSecureHash is false. | | |
## See Also
- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)
- [Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# SAP S/4HANA SOAP Connector 2.6 XML and Maven Support
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
If you manually code a Mule app in XML either from the Anypoint Studio XML editor or from a text
editor, you can get access to the connector in your app by adding reference statements to your XML
Mule flow and in the Apache Maven POM file.
> [!NOTE] You can avoid the manual process described in this topic by using Studio. When you install
> the connector in Anypoint Studio, Studio automatically populates the XML code with the connector’s
> namespace and schema location, and adds a dependency to the pom.xml file.
## Add a Namespace for the Connector
Paste the following code inside the `mule` tag of the header of your configuration XML:
```xml
http://www.mulesoft.org/schema/mule/s4hana-soap
http://www.mulesoft.org/schema/mule/s4hana-soap/current/mule-s4hana-soap.xsd
```
This example shows how the namespace statements are placed in the XML:
```xml
```
## Add a POM File Dependency
The pom.xml Apache Maven file generated by Anypoint Studio contains dependencies for a Mule app.
When you code a Mule app manually, include this XML snippet in your POM file to enable access to
this connector:
```xml
com.mulesoft.connectors
mule-sap-s4hana-soap-cloud-connector
x.x.x
mule-plugin
```
Verify that the connector `version` corresponds to the one you are using.
To obtain the most up-to-date `pom.xml` file information:
1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/).
2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
3. In Exchange, search for `SAP S/4HANA SOAP`.
4. Click **Dependency Snippets**.
## Next Step
After completing your namespace and pom.xml file, you can try the
[Examples](https://docs.mulesoft.com/sap-s4hana-soap-connector/latest/sap-s4hana-soap-connector-examples).
## See Also
[Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# Upgrading and Migrating SAP S/4HANA SOAP Connector to 2.x
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Upgrade Anypoint Connector for SAP S/4HANA SOAP to take advantage of the increased security offered
by using OAuth 2.0 authentication to connect to SAP S/4HANA SOAP.
## Supported Upgrade Paths
This is a direct upgrade from version 1.0.0 version to 2.x.x.
## Changes in This Release
- OAuth 2.0 is supported.
The **OAuth 2.0 Application Connection Provider** option has been added to **Connection** types.
For information about the configuration parameters for this connection type, see
[SAP S/4HANA SOAP Connector Reference](https://docs.mulesoft.com/sap-s4hana-soap-connector/latest/sap-s4hana-soap-connector-reference).
- Mule runtime engine (Mule) 4.2.1 or later is required.
- The base package name has been changed to `com.mulesoft.connector.sap.s4hana.soap` so that all
exported classes now have different fully qualified names.
## Requirements and Limitations
Be aware of the following requirements and limitations before you upgrade to the latest version.
### Requirements
You must be using Mule 4.2.1 or later.
### Limitations
This upgrade breaks backward compatibility.
## Upgrade Prerequisites
Before you upgrade, create a backup of your files, data, and configurations in case you need to
restore to them.
## Upgrade Steps
Follow these steps to perform the upgrade:
1. In Anypoint Studio, create a Mule project.
2. In **Mule Palette**, click **Search in Exchange**.
3. In **Add Dependencies to Project**, enter `SAP S/4HANA SOAP` in the search field.
4. In **Available modules**, select **SAP S/4HANA SOAP Connector** and click **Add**.
5. Click **Finish**.
6. Verify that the `mule-sap-s4hana-soap-cloud-connector` dependency version is the one you are
upgrading to in the `pom.xml` file in the Mule project.
Studio upgrades the connector automatically.
## Post Upgrade Steps
After you install the latest version of the connector, verify the upgrade:
1. In Studio, verify that there are no errors in the **Problems** or **Console** views.
2. Verify that there are no problems in the project `pom.xml` file.
3. Test the connection and verify that the operations work.
## Troubleshooting
If there are problems with caching the parameters and metadata, try restarting Studio.
## Revert the Upgrade
If you must revert to your previous version of SAP S/4HANA SOAP Connector, change the
`mule-sap-s4hana-soap-cloud-connector` dependency version 2.x.x in the project’s `pom.xml` to the
previous version.
## See Also
[Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# Using Anypoint Studio to Configure SAP S/4HANA SOAP Connector 2.6
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.
To add and configure a connector in Studio:
1. [Create a Mule project](#create-mule-project).
2. [Add the connector to your Mule project](#add-connector-to-project).
3. [Configure an input source for the connector’s flow](#configure-input-source).
4. [Add a connector operation to the flow](#add-connector-operation).
5. [Configure a global element for the connector](#configure-global-element).
If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
## Create a Mule Project
In Studio, create a new Mule project in which to add and configure the connector:
1. In Studio, select **File > New > Mule Project**.
2. 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.
1. In Studio, create a Mule project.
2. In the **Mule Palette** view, click **(X) Search in Exchange**.
3. In **Add Modules to Project**, type `SAP S/4HANA SOAP` in the search field.
4. Click the SAP S/4HANA SOAP connector name in **Available modules**.
5. Click **Add**.
6. 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:
1. In the **Mule Palette** view, select **HTTP** > **Listener**.
2. Drag **Listener** to the Studio canvas.
3. On the **Listener** tab, optionally change the value of the **Display Name** field.
4. Specify a value for the **Path** field.
5. 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.
6. On the **General** tab, specify connection information.
7. On the **TLS** tab, optionally specify TLS information.
8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection
strategy.
9. Click **Test Connection** to confirm that Mule can connect with the specific server.
10. 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:
1. In the **Mule Palette** view, select **SAP S4 HANA SOAP** and then select the desired operation.
2. 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:
1. In your project, click the **Global Elements** tab at the base of the canvas.
2. In the **Global Configuration Elements** screen, click **Create**:

3. In the **Choose Global Type** wizard, expand **Connector Configuration**, select **SAP S/4HANA
SOAP Config**, and click **OK**.
4. In the **General** tab, select the connection authentication from the **Connection** drop-down:
- [**Basic Authentication**](#basic_authentication)
- [**Certificate Authentication**](#certificate-authentication)
- [**OAuth 2 Client Credentials Authentication**](#oauth-client-credentials)
5. Enter the required information for the selected connection type and click **OK**.
6. Click **Test Connection** to ensure that your access credentials are correct.
7. Click the **Addressing** tab to configure the following values:
| Studio Field | Description |
|---|
Version | WS-Addressing version. If nothing is specified, the connector uses the value from configuration. |
From | Reference of the endpoint where the message originated from. If nothing is specified, the connector uses the value from configuration. |
8. 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 | |
Proxy configuration | Configuration for executing requests through a proxy |
9. 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
### Certificate Authentication
Enter the following required information on the **General** tab of the **Global Element Properties**
screen to configure certificate authentication:
- **Service Base URL**
URL of the SAP S/4HANA instance you want to manage
### OAuth 2.0 Client Credentials Authentication
Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).
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:
1. In your project, click the **Global Elements** tab at the base of the canvas.
2. In the **Global Configuration Elements** screen, click **Create**:

3. In the **Choose Global Type** wizard, expand **Connector Configuration**, select **SAP S/4HANA
SOAP Listener Config**, and click **OK**.
4. 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.
5. 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](https://docs.mulesoft.com/sap-s4hana-soap-connector/latest/sap-s4hana-soap-connector-examples) topic for more examples of configuring the connector
in Studio.
## See Also
[Salesforce Help](https://help.salesforce.com)
---
product: SAP S/4HANA SOAP Connector
version: 2.6
is-latest-version: true
---
# Web Service Addressing Example
> For the full documentation index, see: https://docs.mulesoft.com/llms.txt
This example uses the following components and operations to configure WS-Addressing and send a SOAP
request:
- **HTTP > Listener**
Component that initiates the flow
- **Transform Message**
Component that converts the input data to a new output structure or format
- **SAP S/4HANA > Invoke**
Operation that sends a request to the specified service
- **Logger**
Component that displays the response in the Mule console

Figure 1. The flow for this example sends a SOAP request with WS-Addressing enabled.
This example uses configuration properties for some field values. You can either replace the
variables with their values in the code, or you can provide the values for each variable in the
`src/main/resources/mule-artifact.properties` file.
## Before You Begin
You must have:
- Access to the SAP S/4HANA instance and Anypoint Platform
## Send a SOAP request with WS-Addressing headers
### Create a Mule Project
In Studio, create a new Mule project to add and configure the connector:
1. Select **File > New > Mule Project**.
2. Enter a name for your Mule project and click **Finish**.
### Add and Configure a Listener
1. In the **Mule Palette** view, search for **HTTP** and select the **Listener** operation:

2. Drag the **Listener** operation onto the canvas.
3. In the **Listener** configuration, click **+** next to **Connector configuration** to add a
global element.
4. Accept the defaults.
5. Set the **Path** field to `/wsa`:

### Add and Configure the Invoke Operation
1. In the **Mule Palette** view, search for **SAP S4 HANA** and select the **Invoke** operation.
2. Drag the **Invoke** operation onto the canvas, to the right of the **Listener** component.
3. In the **Invoke** configuration, click **+** next to **Connector configuration** to add a global
element.
4. Configure the global element for the **Invoke** operation:
- **Name**
Name used to reference the configuration. This example uses `SAP_S4_HANA_Cloud_SOAP_Config`.
- **Service base URL**
Base URL of SAP S/4HANA instance (endpoint) to be accessed from the connector.
- **Username**
Account username to log into SAP S/4HANA.
- **Password**
Account password to log into SAP S/4HANA.

Figure 2. The following image shows example values for the global element in **Invoke**
operation.
5. Open the **Addressing** tab.
6. Set global WS-Addressing properties:
- **Version**
WS-Addressing version.
- **From**
Reference of the endpoint where the SOAP request originated from.

Figure 3. The following image shows example values for **Addressing** fields.
7. At the base of the Studio canvas, click **Configuration XML** to view the corresponding XML:
```xml
```
8. Return to the **Global elements** tab in the editor and open `SAP_S4_HANA_Cloud_SOAP_Config`
configuration.
9. Click the **Test Connection…** button at the bottom of the window and verify if it is
successful.
10. After successful test connection, close the **Test connection** and the **Global Element
Properties** windows.
11. Open the Message flow tab in the editor and open **Invoke** operation processor.
12. Configure the following fields in the properties window:
- **Display Name**
Name to display in the UI for the connector operation.
- **Connector Configuration**
Global configuration you previously created for the **Invoke** operation named
`SAP_S4_HANA_Cloud_SOAP_Config`.
- **Service name**
Name of the service. In this example we chose `CreditManagementAccountByIDQuery_In`.
- **Operation name**
Operation name of the service. In this example we chose `CreditManagementAccountByIDQuery_In`.
- **Message**
Content of a SOAP message.
13. Open the graphical view of message payload and set the SOAP message content. In this example we
set the following payload:
```dataweave
%dw 2.0
output application/xml
ns ns0 http://sap.com/xi/SAPGlobal/Global
---
{
ns0#CreditManagementAccountByIDQuery: {
MessageHeader: {
ID: "@" as String,
CreationDateTime: now()
},
Selection: {
DebtorPartyInternalID: "0011100050" as String,
CreditsegmentInternalID: 1 as String
},
LanguageCode: "ZZZ" as String
}
}
```
14. Set the **General** properties of the **Invoke** operation.

15. Open the **Advanced** tab and change the **Web Service Addressing** dropdown from `None` to
`Edit inline`.
16. Configure the following fields:
- **To**
Address of the intended receiver of this message.
- **Version** (optional)
WS-Addressing version. If nothing is specified, the connector uses the value from the
configuration.
- **From** (optional)
Reference of the endpoint where the message originated from. If nothing is specified, the
connector uses the value from configuration.
- **Message ID**
Identifier that uniquely identifies the message in time and space. If nothing is specified,
the connector uses time-based UUID.
- **Relates to** (optional)
Message ID that the message is related to.

Figure 4. The following image shows the **Web Service Addressing** properties of the
**Invoke** operation.
### Add and Configure a Transform Message Component
Add the **Transform Message** component to the flow using what we transform in the response to JSON:
1. In the **Mule Palette** view, search for **Transform Message**.

2. Drag the **Transform Message** component onto the canvas, to the right of the **Invoke**
operation.
3. In the **Transform Message** configuration, set output to json and replace the brackets in the
**Output** section with a keyword **message**:
```dataweave
%dw 2.0
output application/json
---
message
```
### Add and Configure a Logger Component
Add and configure a **Logger** component to display the message response in the Mule console:
1. In the **Mule Palette** view, search for **Logger**.
2. Drag the **Logger** component onto the canvas, to the right of the **Transform Message**
component.
3. Configure the following fields:
- **Display Name**
Name for the Logger component.
- **Message**
String or DataWeave expression that specifies the Mule log message.
- **Level**
Configures the logging level. The default is `INFO`.

Figure 5. The following image shows example values for the fields:
### Run the Application and Verify
1. Run the application and wait until it successfully deploys.
2. Visit the following URL from the web browser: `http://localhost:8081/wsa`
3. Verify that the successful response was returned.
4. Locate the **headers** property in the **payload** and verify that the **Relates to** property
has the same value as the one we set in the **Message ID** field for the **Invoke** operation.
## XML for the Web Service Addressing Example
Paste this code into your XML editor to load the flow for this example use case into your Mule
application. If needed, change the values to reflect your environment.
```xml
```