Consumed WebService Soap Client Stream?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Consumed WebService Soap Client Stream?



I have a bit of a unique scenario here so bear with me.



I have used the Bouncy Castle library to implement TLS 1.2 on Windows
CE on the .NET Compact Framework 2.0.
http://www.bouncycastle.org/csharp/. Obviously As im using windows CE
it doesnt support .NET 4.5 so cant implement TLS1.2 the usual way.



I have a WebService with WSDL which i would normally consume in
Visual Studio and get a easily usable auto generated class based on
SoapHttpClientProtocol. However doing this results in TLS1.0 usage on
the compact framework and i need TLS1.2



The implementation of Bouncy Castle gives me a Stream class which communicates in TLS1.2 and to interact with the web service I need to build the http request manually including headers and soap xml body and then send it like this:


Stream MyTls12Stream = GetBouncyCastleStream();
byte MyRequestHeaders = GetHttpHeaders();
byte MySoapBody = GetSoapXmlBody();

MyTls12Stream.Write(MyRequestHeaders, 0, MyRequestHeaders.Length);
MyTls12Stream.Write(MySoapXmlBody, 0, MySoapXmlBody);
MyTls12Stream.Flush();



The i need to go to the hassle of parsing the Soap XML response.



Question: Is there any way I can use this TLS 1.2 Stream in combination with the autogenerated Reference.cs SoapHttpClientProtocol based file to make my life easier or any other way to do this without having to write every request and response?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered