C
C#10mo ago
HideousKojima

❔ SOAP to HTTP question

So I'm migrating an old library that uses SoapClientHttpProtocol and I'm planning on just doing it all over HTTP because SOAP sucks and because there's no .NET 6 support for SoapClientHttpProtocol . Anyways, the only thing I was wondering about was for base64Binary byte arrays in SOAP, do I just need to do Convert.ToBase64String(someByteArray)? Or does SoapClientHttpProtocol do something special or different in the encoding process?
9 Replies
mtreit
mtreit10mo ago
Base64 is Base64, it's unlikely you need to do anything special. You're building a client that is talking to an existing SOAP service?
HideousKojima
HideousKojima10mo ago
Correct
mtreit
mtreit10mo ago
The SOAP client support in System.ServiceModel is fully supported in .NET 6, just use that. You can build a proxy from the WSDL for the service and just use that. Doing it totally by hand yourself is going to be a pain and error prone unless the service is trivially simple.
HideousKojima
HideousKojima10mo ago
It's relatively simple, I'll do some more poking around and see what System.ServiceModel can do for me. Thanks!
mtreit
mtreit10mo ago
I never used SoapClientHttpProtocol, must be quite old - the "normal" way of making a SOAP client using svcutil.exe has been around for at least a dozen years. (I spent the past decade or more working on SOAP services and also ported our existing WCF SOAP service to .NET 6 via CoreWCF). In my experience you shouldn't have any issue making a .NET 6 client.
HideousKojima
HideousKojima10mo ago
At least according to the docs it's been arround since .NET Framework 1.1 if not longer The weird thing is that this old codebase is relatively new haha. It's definitely had work done on it within the last 5 years
mtreit
mtreit10mo ago
Someone followed some super old tutorial or something 🙂
HideousKojima
HideousKojima10mo ago
Won't be the first or last time I see that with some of the stuff I've been tasked with porting/updating here, unfortunately Thanks for the help!
Accord
Accord10mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.