soap etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
soap etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

13 Şubat 2012 Pazartesi

WP7 SOAP Web Service with Custom Headers

Evet, page rank lazim gençler. İngilizce yazalım, sevgili yabancı arkadaşlarımız da algılasınlar. Hem zaten bizler zeki insanlarız, İngilizce'de nedir yani?


Fellows! Today I am going to show you how you can add your custom headers to your web service requests. I have searched for it for a while in the past, lost my hope, forced my customers to write a new web service with a naive authentication. 


But the thing we are going to accomplish is not easy at all.


<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<AuthHeader xmlns="http://tempuri.org/">
<Username>string</Username>
<Password>string</Password>
</AuthHeader>
</soap:Header>
<soap:Body>
<BolgeSorgu xmlns="http://tempuri.org/" />
</soap:Body>
</soap:Envelope>


In here we see the soap envelope that we are going to send to get a response. I added the web service with Service References -> Add.