【发布时间】:2013-02-20 06:23:44
【问题描述】:
我们正在使用来自 SalesForce 的出站通知服务。
从 SalesForce WSDL 生成代理并尝试将其发送到我的 ASMX Web 服务后,我收到以下错误
请求元素 http://soap.sforce.com/2005/09/outbound'> 未被识别。
在我的 C# ASMX Web 服务上
[WebService(Namespace = "http://services.company1.com.au/services")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)]
public class ImportPosition : WebService, NotificationPort
SalesForce WSDL 具有以下肥皂定义
<definitions targetNamespace="http://soap.sforce.com/2005/09/outbound"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://soap.sforce.com/2005/09/outbound"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ent="urn:enterprise.soap.sforce.com"
xmlns:ens="urn:sobject.enterprise.soap.sforce.com">
如果我将 C# ASMX Web 服务命名空间更改为“http://soap.sforce.com/2005/09/outbound”,则请求成功进入,但作为空对象。
使用 Wireshark 我可以看到传入的 SOAP 消息
<notifications xmlns="http://soap.sforce.com/2005/09/outbound"
知道是什么导致了这个命名空间问题吗?谢谢
【问题讨论】:
标签: c# soap salesforce asmx