【问题标题】:Salesforce Outgoing message: SOAP response was a nackSalesforce 传出消息:SOAP 响应很糟糕
【发布时间】:2016-03-03 19:32:31
【问题描述】:

我正在与内部系统集成。我在一个对象上设置了一条传出消息,并且每次更新记录时我的 Web 服务都会看到该消息。我的服务正在发送真实响应,但传出消息传递状态显示“SOAP 响应是 nack”。

我使用了 wireshark 在我的网络服务器上捕获请求和响应。这是我看到的:

请求:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
   <OrganizationId>00D00000000hfNqEAI</OrganizationId>
   <ActionId>04k370000004FsYAAU</ActionId>
   <SessionId xsi:nil="true"/>
   <EnterpriseUrl>https://na31.salesforce.com/services/Soap/c/36.0/00D00000000hfNq</EnterpriseUrl>
   <PartnerUrl>https://na31.salesforce.com/services/Soap/u/36.0/00D00000000hfNq</PartnerUrl>
   <Notification>
    <Id>04l370000006ISGAA2</Id>
    <sObject xsi:type="sf:Opportunity" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
     <sf:Id>00637000007h5uwAAA</sf:Id>
     <sf:AccountId>00100000003Qy45AAC</sf:AccountId>
     <sf:Name>Andrew Test</sf:Name>
     <sf:OwnerId>00500000006pE7kAAE</sf:OwnerId>
     <sf:StageName>Unqualified</sf:StageName>
    </sObject>
   </Notification>
  </notifications>
 </soapenv:Body>
</soapenv:Envelope>

响应:(HTTP/1.1 200 OK)

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-NV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.sforce.com/2005/09/outbound"><SOAP-ENV:Body><Ack>true</Ack></SOAP-ENV:Body></SOAP-ENV:Envelope>

谁能看到导致响应失败的原因?

【问题讨论】:

    标签: laravel salesforce laravel-5.2 soapserver


    【解决方案1】:

    您的响应消息不符合 WSDL 描述的格式,应该是

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
       <notificationsResponse xmlns="http://soap.sforce.com/2005/09/outbound">
         <Ack>true</Ack>
       </notificationsResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

    注意额外的 notificationsResponse 元素,以及它位于 OM xml 命名空间中的事实。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-28
      • 1970-01-01
      • 1970-01-01
      • 2016-01-20
      • 2014-10-22
      • 2011-05-23
      • 2011-10-06
      相关资源
      最近更新 更多