Connect C++ app to JAVA web app with SOAP

后端 未结 6 1513
余生分开走
余生分开走 2020-12-19 00:41

I have a C++ app that needs to connect to a JAVA web app, are there any good, open source SOAP packages for this, or would it be easier to just roll my own?

6条回答
  •  萌比男神i
    2020-12-19 01:22

    When I saw the generated code from gSOAP, I about had a heart attack.

    The fact that the user is required to do all of the memory management for each object just boggled my mind. So, I sat down and did something probably stupid in the long term, but fairly satisfying in the short term...

    I wrote a program that wraps the gSOAP code with my own CPP classes that make the interface look more like I'd like it to look.

    I used Scoped Guards within each service method to hold onto memory, and since I'm dealing with all sorts of different types, I used a std::list to do it. I have functions that make each object type that I need, and they put the actual memory into my list. It's had a few problems - mostly just configuration changes. I'm generating thousands of classes now, talking to dozens of web services.

    I'm not sure I'd recommend my same path to anyone else... I should probably bite the bullet and start trying to contribute to gSOAP, rather than maintain my own tool which is dependent on the output of gSOAP...

提交回复
热议问题