is there a .Net automatic serialization and deserialization tool for sage x3 soap webservice?

hello everyone i have a problem so we have a soap webservice created from sage x3 and we want to use it in another external .Net application that we are developing and we need a tool or a visual studio plugin that does the serialization and deserialization of the sub-programs and generates the class of entities automaticaly does anyone a tool that does this work or does anyone have another solution for me and thanks

  • 0

    Have you added the X3 wsdl as a web service reference to your .net application?  That gives you the wrapper for the SOAP web service calls.  As far as serializing and deserializing, I normally create classes representing the request for each web service, and then use Newtonsoft Json to serialize and deserialize.  I'm sure you could create a generate function to do the serialize/deserialize, but I normally do it within each function I am calling. It is also much easier if you return the inputXML results from X3 in json format, if you aren't already doing that.

  • 0

    In VS you can paste XML/JSON as classes. You can use postman, curl, etc to get an end point result, then copy/paste that result into VS. When you paste, right click and select 'xml as class'. You are then free to change those class names as you see fit as the default names are generic.