Service applications can consume another service
application. The advantage of this capability is leveraging resources
that are defined and managed from a central location and distributed
throughout the farm and/or farms.
Using the managed metadata service example from
publishing, redundancy is reduced through reuse. The field created in
one web application/site collection can be consumed in a completely
separate web application/site collection. Maintenance of the content
type is from a central location providing consistency and timeliness. As
business and needs change, the organization can adapt quickly.
In this recipe, we will show how to consume another service application.
Getting ready
You must have local administrative permissions to the
SharePoint 2010 web front-end (WFE) and have Farm Administrator
privileges to Central Administration.
If you are consuming a service from another farm, a trust must be set up between farms. Refer to the Establishing a trust relationship between farms recipe on how to perform this action.
How to do it...
Open the Central Administration screen and click Application Management.
The third section is Service Applications. Under it, click Manage Service Application.
Navigate the listing until your mouse is over the Manage Metadata Service option. The bar should be blue.
The second ribbon component is Connect. Click the down arrow and seek the listing call Managed Metadata Service Connection. Choose this by clicking on it. The following screenshot will appear:
Copy the published URL that was saved in step 4 ofPublishing a SharePoint Service recipe. After clicking OK, the following screenshot will appear:
Click on the Managed Metadata Service link. Now the OK option will be enabled. After clicking OK, the following screenshot will appear:
You may rename the connection. Leave this value to default and click OK.
The service is now connected.
How it works...
The Application Discovery and Load Balancer Service
Application are the means by which farms know which service application
are available to be consumed. This service is also referred to as the
Topology Service.
When we published the service application, a URL was
automatically created that we used as the input to step 4. This URL is
what the Topology Service discovers. In step 5, the topology service
shows the services that we could use as connections. In the example
explained here, there is only one to choose.
Once everything is completed from the consume recipe,
the new service application being consumed will appear with the name
given in step 7 (referred to as Connect to: Managed Metadata Service) under the Managed Metadata Service.
There's more...
The setup of consuming another service can be done
with scripts through the use of PowerShell. Here are the two associated
PowerShell commands that must be run in the order shown:
PowerShell: Consuming Cmdlets
Receive-SPSharedServiceApplicationInfo -FarmUrl <PublishingFarmTopologyURL>
This step obtains the URL that will be used in the following step.
SP-ServiceApplicationProxy -Name"<ServiceApplicationProxyName>" -Url "<PublishingFarmTopologyURL>"