我们正在使用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具有以下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"
知道是什么导致了这个命名空间问题吗?谢谢
1 回答
结果我使用了错误的工具来生成我的代理 .
我本来应该使用wsdl.exe而不是svcutil.exe
创建Web服务以从SalesForce接收出站通知的提示