我们使用的是SalesForce的出站通知服务。
从ASMX生成代理并尝试将其发送到我的ASMX服务后,我得到了以下错误
无法识别请求元素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, NotificationPortSalesForce WSDL具有以下soap定义
<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"你知道是什么导致了这个命名空间问题吗?谢谢
发布于 2013-02-26 11:56:26
事实证明我使用了错误的工具来生成我的代理。
我应该使用wsdl.exe而不是svcutil.exe
有关创建web服务以接收来自SalesForce的出站通知的提示
use .asmx
WS-I Basic Profile 1.1
Web Service Description Language (WSDL) 1.1
Simple Object Access Protocol (SOAP) 1.1https://stackoverflow.com/questions/14973525
复制相似问题