【问题标题】:How to populate SOAP header Sales Force如何填充 SOAP 标头 Sales Force
【发布时间】:2013-09-19 19:02:55
【问题描述】:

我在 Saels Force 中创建了一个服务 webservices,从类创建了 WSDL 的 soliceitei 生成,然后去了将使用该服务的公司。但是有一些头信息不能preecher,有人可以帮助我吗?

  <soapenv:Header>
  <atu:AllowFieldTruncationHeader>
     <atu:allowFieldTruncation>???????????</atu:allowFieldTruncation>
  </atu:AllowFieldTruncationHeader>
  <atu:DebuggingHeader>
     <!--Zero or more repetitions:-->
     <atu:categories>
        <atu:category>??????????</atu:category>
        <atu:level>???????????</atu:level>
     </atu:categories>
     <atu:debugLevel>????????????</atu:debugLevel>
  </atu:DebuggingHeader>
  <atu:CallOptions>
     <atu:client>??????????????</atu:client>
  </atu:CallOptions>
  <atu:SessionHeader>
     <atu:sessionId>?????????????</atu:sessionId>
  </atu:SessionHeader>

【问题讨论】:

    标签: web-services soap salesforce apex-code


    【解决方案1】:

    对于会话 ID,您必须使用 Enterprise.WSDL 或 Partner.wsdl 提供的登录方法登录。

    下面是一个用标题填充的 exeplo 肥皂。

    <soapenv:Header>
      <atu:AllowFieldTruncationHeader>
         <atu:allowFieldTruncation>**true**</atu:allowFieldTruncation>
      </atu:AllowFieldTruncationHeader>
      <atu:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <atu:categories>
            <atu:category>**Apex_Code**</atu:category>
            <atu:level>**Debug**</atu:level>
         </atu:categories>
         <atu:debugLevel>**Debugonly**</atu:debugLevel>
      </atu:DebuggingHeader>
      <atu:CallOptions>
         <atu:client>**true**</atu:client>
      </atu:CallOptions>
      <atu:SessionHeader>
         <atu:sessionId>**YOUR_SESSION_ID**</atu:sessionId>
      </atu:SessionHeader>
    

    希望对你有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-24
      • 2012-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多