2016-03-03 99 views
0

我正在与内部系统进行集成。我在一个对象上创建了一个传出消息,每次更新记录时,我的Web服务都会看到该消息。我的服务正在发送一个真正的响应,但传出的消息传递状态显示“SOAP响应已经很糟糕”。Salesforce传出消息:SOAP响应非常糟糕

我已经使用wireshark在我的Web服务器上捕获请求和响应。这是我所看到的:

请求:

<?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> 

有人能看到是什么原因造成的响应失败?

回答

0

您的响应消息不符合由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命名空间。

相关问题