Apex SOAP メソッドを呼び出す場合にヘッダーを設定することは、Salesforce における Web サービスインテグレーションの重要な要素です。この記事では、Salesforce コネクタの Invoke Apex Soap メソッドを使用する場合に、どのようにしてヘッダーを設定するかについて説明します。
Salesforce コネクタの場合に、Invoke Apex Soap メソッドを使用してヘッダーの debugLevel を Debugonly に設定する方法の例を次に示します。
<flow name="sf-contacts-cleanupFlow2">
<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/apex"/>
<ee:transform doc:name="Transform Message">
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/xml
ns ns0 http://soap.sforce.com/schemas/class/InvokeApexTest
---
{
ns0#sayHello: {
ns0#name:"Name",
ns0#someNumber:1
}
}]]></ee:set-payload>
</ee:message>
<ee:variables >
<ee:set-variable variableName="DebugHeader" ><![CDATA[%dw 2.0
output application/json
---
{
"DebuggingHeader": {
"debugLevel":"Debugonly"
}
}]]></ee:set-variable>
</ee:variables>
</ee:transform>
<salesforce:invoke-apex-soap-method doc:name="Invoke apex soap method" config-ref="Salesforce_Config" methodName="sayHello" className="InvokeApexTest" apexHeaders="#[vars.DebugHeader]">
</salesforce:invoke-apex-soap-method>
<ee:transform doc:name="Transform Message" >
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
</ee:message>
</ee:transform>
</flow>
Apex SOAP ヘッダーの詳細については、こちらの Salesforce ドキュメントを参照してください。
001115316

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.