2014-06-20 1 views
0

WSDL을 통해 WCF를 통해 웹 서비스와 함께 작동 할 Xamarin 앱을 만들려고합니다. .wsdl 파일과 .cs 파일이 .wsdl 파일을 사용하여 SvcUtil에 의해 생성되었습니다.Xamarin : WSDL ServiceClient 초기화시 System.InvalidOperationException이 발생했습니다.

나는 다음에 무엇을 할 때 :

ServiceClient _mobileService; 

    public void Initialize() 
    { 
     var binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential) 
     { 
      MaxReceivedMessageSize = long.MaxValue, 
      MaxBufferSize = int.MaxValue, 
      MaxBufferPoolSize = long.MaxValue, 
      ReceiveTimeout = TimeSpan.FromMinutes(0.5), 
      SendTimeout = TimeSpan.FromMinutes(0.5), 
      OpenTimeout = TimeSpan.FromMinutes(0.5), 
      CloseTimeout = TimeSpan.FromMinutes(0.5), 
      ReaderQuotas = 
      { 
       MaxArrayLength = int.MaxValue, 
       MaxBytesPerRead = int.MaxValue, 
       MaxDepth = int.MaxValue, 
       MaxNameTableCharCount = int.MaxValue, 
       MaxStringContentLength = int.MaxValue 
      }, 
      Security = {Mode = BasicHttpSecurityMode.Transport} 
     }; 

     var endpoint = new EndpointAddress("https://ThereIsMySite/PathToService"); 

     _mobileService = new ServiceClient(binding, endpoint); 
     _mobileService.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(1); 

나는 예외를 가지고 :
System.InvalidOperationException: Operation 'activateAsync' contains a message with parameters. Strongly-typed or untyped message can be paired only with strongly-typed, untyped or void message. 

at System.ServiceModel.Dispatcher.OperationFormatter.Validate (System.ServiceModel.Description.OperationDescription od, Boolean isRpc, Boolean isEncoded) [0x00000] in <filename unknown>:0 
    at System.ServiceModel.Dispatcher.OperationFormatter..ctor (System.ServiceModel.Description.OperationDescription od, Boolean isRpc, Boolean isEncoded) [0x00000] in <filename unknown>:0 

가 그럼 난 콘솔 프로젝트에서 동일한 코드를 시도 (닷넷 4.5)하고, 오류가 없습니다.

Xamarin에서 작동하게하는 방법을 알고 있습니까?

미리 감사드립니다.

+0

참조 https://bugzilla.xamarin.com/show_bug.cgi?id=13074 –

답변

관련 문제