Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
updateAppDetails
updateAppDetails
Updating application details

The updateAppDetails operation updates specified details of a specific application. 

...

Following is a sample proxy service that illustrates how to connect to Facebook with the init operation and then use the banAppUser operation. The sample request for this proxy can be found in  banAppUser sample request. You can use this sample as a template for using other operations in this category.

Info

As a best practice, create a separate sequence for handling the to handle response payload for errors. In the following sample, the sequence that handles errors is  is the faultHandlerSeq.

Code Block
languagehtml/xml
titleSample Proxy
 
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="facebook_banAppUser"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl"
                   expression="json-eval($.apiUrl)"/>
		 <property name="apiVersion"
                   expression="json-eval($.apiVersion)"/>
         <property name="accessToken"
                   expression="json-eval($.accessToken)"/>
         <property name="appId"
                   expression="json-eval($.appId)"/>
         <property name="uids"
                   expression="json-eval($.uids)"/>
         <facebook.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiVersion>{$ctx:apiVersion}</apiVersion>
            <accessToken>{$ctx:accessToken}</accessToken>
         </facebook.init>
         <facebook.banAppUser>
            <appId>{$ctx:appId}</appId>
            <uids>{$ctx:uids}</uids>
         </facebook.banAppUser>
         <respond/>
      </inSequence>
      <outSequence>
         <property name="messageType" value="application/json" scope="axis2" />
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>