One of the key advantages of service applications is
their ability to be consumed on an a la carte level. Use the service
only as you need it. Extending this paradigm further, service
applications are similar to services in a cloud. Use what you need, no
matter what farm you are using.
This gives organizations the ability to pool their
resources effectively. An example of a resource that could be shared is
content types. Many organizations are ISO certified and as such they are
required to collect particular information with regards to their
documents. A content type can be set up to which custom fields are
assigned. For example, we could create a field called Safety Training Date and assign that to the content type.
As the SharePoint installation grows, more web
applications and site collections are created. The organization does not
want to recreate the content type that contains the field safety
training date in each farm. By publishing the metadata service, other
farms can consume this service and no redundancy is created. Further,
maintenance of the content type is from a central location providing
consistency and timeliness. The organization can adapt easily to change.
In order to use another service application, it must be made available. This is referred to as publishing the service.
Getting ready
You must have local administrative permissions to the
SharePoint 2010 web front-end (WFE) and have Farm Administrator
privileges to Central Administration.
How to do it...
Open the Central Administration screen and click Application Management.
The third section is Service Applications. Under it click Manage Service Applications.
Navigate
to the service you will be publishing. Click to the right of the
service name and check to see that the ribbon has lit up. The chosen
service should look like the following screenshot:
Click Publish on the ribbon. The following form appears:
Fill in the required information.
Connection Type: Usehttp from the available drop-down list.
Publish to other Farms: Check this box.
Trusted Farms: Use this link to create a new trust relationship. This process is detailed in the recipe called Establishing a trust relationship between two farms.
Published URL: This URL will be used when we consume another farm's service. Copy this to Notepad for reference.
Description Text: This is an
informational description and URL where you provide information about
the service. Provide a description that gives supporting information as
to why this is being done.
Information URL: Provide the link to
the web page that has been set up previously. Include a description text
that gives an explanation about the trust being set up.
Once you have filled in the required information, click OK.
How it works...
The key component in publishing a service is the
Published URL. This is created when publishing a service. It is the
reference back to the service being published.
The URL will be provided to the consuming farm. This
should be copied to a separate location so that the administrators know
where to reference it.
There's more...
Publishing a Service Application can be done with the
help of scripts, through the use of PowerShell. Here is the associated
Powershell command:
PowerShell: Publishing Service Cmdlet
Publish-SPServiceApplication -Identity <ServiceApplicationGUID>
More info
Only the following service applications can be published between SharePoint farms: