Samples > Starter stores > Starter store enhancements > Social Commerce > WebSphere Commerce Dojo Enhancements API > Social Commerce services > Implement the Service Adapter API for new service providers
Configure service adapters
After you create a service adapter, configure the new adapter in the SocApp project.
Procedure
- In the Enterprise Explorer view, expand SocApp > config and right-click ivy.xml to open this file in the XML editor.
- Click the Dependencies tab and click the Add button in the upper right hand corner to open the Dependency Selection dialog.
- From the list of dependencies, click the new service adapter project to add a dependency on this project.
- From the Filter by list, click Latest major version.
- Save and close the file.
- Edit the SocApp/config/adapter.config file to configure the new service adapter in the SocApp project. The following code snippet shows the addition of code to identify the class that was created in the module as the implementation of the blog service adapter:
/config/soccom/adapter/impl/myadapter = { "blog" : "com.acme.BlogAdapterImpl" }Where:
You can combine the implementations of resources for a single service adapter:
- myadapter
- Identifies the name of the service adapter.
- blog
- Identifies the type of resource to implement. For example, blog, profile, review, or photoGallery.
- com.acme.BlogAdapterImpl
- Identifies the class associated with the implementation class for the resource. For example, the Blog resource. For more information about the Blog resource, see com.ibm.commerce.soccom.adapter.IBlogAdapter .
/config/soccom/adapter/impl/youradapter = { "profile" : "com.acme.YourProfileAdapterImpl", "photoGallery" : "com.acme.YourPhotoGalleryAdapterImpl" }You can also identify the service adapter as the underlying service provider for a resource. For example:
/config/soccom/adapter/blog = "myadapter"
- Save and close the adapter.config file.
Next topic: Test service adapters