Connecting a Business Manager service configuration to LocalServiceRegistry code
Key Takeaway
LocalServiceRegistry.createService loads a Business Manager service configuration by its ID. Business Manager holds the connection settings. Your callbacks build the request and parse the response.
A B2C Commerce web service integration has two halves that meet at one name. In Business Manager, you create a service configuration that holds the connection settings, such as the credential, the profile, the service type and live or mocked mode. In code, LocalServiceRegistry.createService loads that configuration by its ID and attaches your callbacks. Your callbacks build the request and parse the response.
The three Business Manager records
Each web service needs three records under Administration > Operations > Services in Business Manager.
| Record | What it holds |
|---|---|
| Service credential | The URL, username and password used for basic authentication |
| Service profile | The timeout, circuit breaker and rate limit settings |
| Service configuration | Links one credential and one profile to a named service |
Create the credential and the profile first. Then create the service configuration that links them.
The credential password is masked after you type it. You can't retrieve it from Business Manager, so store it securely somewhere else.
The service configuration generates a ServiceConfig object with these read-only properties:
IDcredential, aServiceCredentialprofile, aServiceProfileserviceType, such as HTTP or SOAP