2011-12-02 147 views
2

我正在開發將消耗WCF服務HTTPS(可能使用soap)的iPad應用程序。iOS使用HTTPS消費WCF服務

我在iPad上使用NSURLConnection連接到HTTP Web服務,工作正常。但是WCF服務將使用HTTPS。 WCF作爲一些不同的配置(例如,安全模式:傳輸,消息和TransportWithMessageCredential)。

iPad使用HTTPS使用WCF服務有任何限制嗎?什麼是最好的方法?

回答

3

您可以使用NSURLConnection本身。如果你要處理的安全證書,同時連接到你要看看下面的方法服務器,

- (BOOL)connection:(NSURLConnection *)conn canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace 

- (void)connection:(NSURLConnection *)conn didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 

從蘋果的示例如下項目將幫助你,

http://developer.apple.com/library/ios/#samplecode/AdvancedURLConnections/Introduction/Intro.html