1

在 Windows Phone 应用程序中,我添加了 Enterprise.wsdl(从我的 salesforce 登录 ID 获得)作为参考。我可以使用 Loginresult 进行身份验证。但是在使用 Create 时会抛出上述开销。

在 Web 应用程序中使用 SoapHeader 类继承 System.Web.Services.Protocols.SoapHeader 所以引用了服务器 url 和 id。无法在 Windows phone 中使用网络。如果您知道任何解决问题的样本,请帮助

4

2 回答 2

2

登录调用的部分结果是 serverUrl,此 url 应该用于发出所有后续请求,通常在 .NET 中,您只需将存根的 .Url 属性设置为提供的值。虽然没有特定于 win-phone 的示例,但文档中有很多 .NET 示例

于 2013-04-08T15:18:30.413 回答
0

My experience has been that you can't import the Partner or Enterprise WSDLs to a Windows Phone 7 project.

With Windows Phone 7 projects you can add a Service Reference (for WCF), but not a Web Reference.

Whenever I've imported the Salesforce WSDLs to a standard .NET project I've needed to use a Web Reference to get the APIs working correctly. Something about how WCF doesn't support the Salesforce WSDL defined SOAP headers that are needed to specify the session details.

I found using the REST API and JSON.NET to be the easiest with Windows Phone 7 projects.

That said, my phone app only works with Developer, Enterprise and Unlimited Salesforce editions. Professional and Group editions get the API_DISABLED_FOR_ORG error. I think I need to get the app certified to work with those editions.

于 2013-04-09T07:47:17.153 回答