from Hacker News

Ask HN: What programming language for needing to interact with SOAP services?

by jsyolo on 1/14/22, 10:09 PM with 11 comments

Hello, I have been learning programming by reading some books and have a webapp/SAAS idea. The application will need to interact heavily with the government SOAP servers(words: wsdl, xsd, xsl, schematron etc...) I don't have deep knowledge in any programming language yet and would like to keep everything in JS since I already have to use it for the browser but the Internet seems to suggest that nodejs libraries for interacting with SOAP are full of gotchas, edge cases and have trouble covering some functionality when compared to something like the Java the ecosystem.

For devs that know multiple programming languages and have dealt with SOAP, do you recommend I just go with the JVM for the backend and pay the price of dealing with two ecosystems? My current book is a java algorithms book so I'm not to far off from the language (although Java libs look scary).

Another maybe non-issue is that since there is going to be lots of xml processing and pdf generation, the single thread nature of nodejs might affect web responses, not sure if worker threads can help here.

  • by croo on 1/14/22, 10:36 PM

    I fully recommend java for SOAP development and dealing with xml. The ecosystem has already cooked up the solutions, tasted everything, got full and calmed down. Libs are stable, tutorials are written and fixed and then fixed again.
  • by mindcrime on 1/14/22, 11:38 PM

    You can work with SOAP from pretty much any language, but Java does have particularly good library/ecosystem support for that sort of thing. If you already know some Java anyway, that's probably as good a choice as any.
  • by friendlydog on 1/14/22, 10:57 PM

    Here is some info on a Javascript implementation https://stackoverflow.com/questions/124269/simplest-soap-exa...

    .net with Visual studio is pretty easy you point it at a wsdl and it builds a client, I bet Java has tools to do the same.

  • by PaulHoule on 1/14/22, 10:23 PM

    It was years ago but I had no problem writing a simple library to run SOAP requests against a .NET-based provider in PHP so long as authentication wasn't involved.

    I almost figured out authentication and it woulda worked if the server followed the spec but the server didn't follow the spec.

    You can't go wrong with Java on the back end.

  • by moistly on 1/15/22, 2:24 AM

    Saxonica now has an XSLT 3.1 interpreter implemented through JavaScript. Works a charm for XML processing of most any sort. Can call JS, access JS properties, etc. In-browser has access to the DOM & events; nodejs has its own frills and thrills, I expect.

    IMO it’s the right way to deal with XML.

  • by jcaguilar on 1/14/22, 11:55 PM

    a JVM language (Java, Kotlin) is your best bet, I have used the JVM for years. I had problems using JS or Python. .net should work well too but I have not experience with it.