Silverlight özellikli bir WCF hizmetine sahip bir web sitem var. Servis iyi çalışıyor ve tarayıcıda WSDL sayfasına hiçbir sorun olmadan göz atabiliyorum.Program aracılığıyla WCF istemcisi oluşturun
Şimdi, bir DLL'de bir istemci oluşturmaya çalışıyorum. Programsal olarak tüm istemciyi oluşturmam gerekiyor, çünkü bir DLL'de çağrılıyor çünkü hangi nedenle olursa olsun (tasarımdan) ServiceModel bölümünü kendi yapılandırma dosyasından okumayacaktır. Yani burada
benim kodudur:
Dim endp As EndpointAddress = New EndpointAddress("http://www.mydomain.com/licensing/lic.svc")
Dim bind As WSHttpBinding = New WSHttpBinding()
Dim svc = New lnt.licClient(bind, endp)
Dim rsp = svc.CheckIt(key)
Ama svc.CheckIt yöntemini çağırdığınızda, ben aşağıdaki hatayı alıyorum:
Content Type application/soap+xml; charset=utf-8 was not supported by service http://www.mydomain.com/licensing/lic.svc.
The client and service bindings may be mismatched.
{"The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'application/soap+msbin1'.."}
düzgün bu şekilde müvekkilimi nasıl oluştururum düzgün "eşleşti"?
Şimdiden teşekkürler!
Sivlerlight WSHttpBinding öğesini desteklemiyor. http://msdn.microsoft.com/en-us/library/cc896571(VS.95).aspx –