Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
connector/src/main/resources/salesforce/getServerTimestamp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
~ | ||
~ WSO2 Inc. licenses this file to you under the Apache License, | ||
~ Version 2.0 (the "License"); you may not use this file except | ||
~ in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, | ||
~ software distributed under the License is distributed on an | ||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
~ KIND, either express or implied. See the License for the | ||
~ specific language governing permissions and limitations | ||
~ under the License. | ||
--> | ||
<template name="getServerTimestamp" xmlns="http://ws.apache.org/ns/synapse"> | ||
<parameter name="sObjectType" description="The sobject type"/> | ||
<parameter name="startDate" description="The start date for deleted records lookup"/> | ||
<parameter name="endDate" description="The end date for deleted records lookup"/> | ||
<sequence> | ||
<property | ||
expression="get-property('operation','salesforce.serviceUrl')" | ||
name="uri.var.salesforce.url"/> | ||
<payloadFactory> | ||
<format> | ||
<soapenv:Envelope | ||
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" | ||
xmlns:urn="urn:partner.soap.sforce.com"> | ||
<soapenv:Header> | ||
<urn:SessionHeader> | ||
<urn:sessionId>$1</urn:sessionId> | ||
</urn:SessionHeader> | ||
</soapenv:Header> | ||
<soapenv:Body> | ||
<urn:getServerTimestamp/> | ||
</soapenv:Body> | ||
</soapenv:Envelope> | ||
</format> | ||
<args> | ||
<arg expression="get-property('operation','salesforce.sessionId')"/> | ||
<arg expression="$func:sObjectType"/> | ||
<arg expression="$func:startDate"/> | ||
<arg expression="$func:endDate"/> | ||
</args> | ||
</payloadFactory> | ||
<property name="messageType" scope="axis2" value="text/xml"/> | ||
<header name="Action" value="urn:partner.soap.sforce.com/Soap/getServerTimestampRequest"/> | ||
<property value="true" name="FORCE_ERROR_ON_SOAP_FAULT"/> | ||
<property name="HTTP_METHOD" scope="axis2" value="POST"/> | ||
<header name="To" expression="$ctx:uri.var.salesforce.url"/> | ||
<filter source="$ctx:SALESFORCE_BLOCKING" regex="true"> | ||
<then> | ||
<call blocking="true"> | ||
<endpoint> | ||
<default format="soap11"> | ||
<timeout> | ||
<duration>60000</duration> | ||
<responseAction>fault</responseAction> | ||
</timeout> | ||
<suspendOnFailure> | ||
<initialDuration>2000</initialDuration> | ||
<progressionFactor>1.0</progressionFactor> | ||
<maximumDuration>3000</maximumDuration> | ||
</suspendOnFailure> | ||
</default> | ||
</endpoint> | ||
</call> | ||
</then> | ||
<else> | ||
<call> | ||
<endpoint> | ||
<default format="soap11"> | ||
<timeout> | ||
<duration>60000</duration> | ||
<responseAction>fault</responseAction> | ||
</timeout> | ||
<suspendOnFailure> | ||
<initialDuration>2000</initialDuration> | ||
<progressionFactor>1.0</progressionFactor> | ||
<maximumDuration>3000</maximumDuration> | ||
</suspendOnFailure> | ||
</default> | ||
</endpoint> | ||
</call> | ||
</else> | ||
</filter> | ||
</sequence> | ||
</template> |