Enable the Web Service Proxy


Scenario/Problem: You need to enable the use of the InfoPath Form Services web service proxy.


Solution: Use the Set-SPInfoPathWebServiceProxy cmdlet.

The InfoPath Form Services web services proxy can be used to access web services without passing the credentials of the form user. A set of credentials for the web service needs to be stored within SharePoint’s Secure Store Service (SSS), which is the replacement for Single Sign-On (SSO).

You need to modify a data connection file that your InfoPath form is using as a web service connection by adding a UseFormsServiceProxy attribute with a setting of true (see Listing 12.7), along with an Authentication element that references the Secure Store application ID (see Listing 12.8).

Listing 12.7. UseFormsServiceProxy Attribute in the Data Connection File


<udc:ServiceUrl UseFormsServiceProxy="true"/>


Listing 12.8. Authentication Element in the Data Connection File


<udc:Authentication>
    <udc:SSO AppId="<<AppID>>" CredentialType="<<credential type>>"/>
</udc:Authentication>


The possible credential types are as follows:

• Basic

• CD

• Digest

• Kerberos

• NTLM

• SQL

To enable the use of the web proxy, use the following cmdlet:

Set-SPInfoPathWebServiceProxy -Identity "<<URL of web application>>"
-AllowWebServiceProxy $true

To enable SharePoint forms to use the web proxy, use the following cmdlet:

Set-SPInfoPathWebServiceProxy -Identity "<<URL of web application>>"
-AllowForUserForms $true


Tip

The AllowWebServiceProxy setting needs to be set to true first before AllowForUserForms can be set to true. This is why the cmdlets need to be separated.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.109.151