Data Transformations from JSON to SOAP

Hello!

At my current role at my company we use DataWeave to transform requests from json(or java objects) to soap and back, since we interact with services that support SOAP, both context and contextless calls.

I was wondering how hard it is to send and transform json data to soap requests. Am I correct in assuming a potential json object would have to be first un marshaled to a Go Struct and then transformed to a SOAP request?

On the same topic how hard is it to either use a library or create a custom WSDL Converter for Go structs? I know there are some libraries out there but IDK if there are any recommended ones?

As with any API transformation, you need to transform the source request to something in the target request through some internal representation.

This is already true for simple REST to REST.

You can not convert “JSON” to “SOAP”, as “JSON” is a way to structure your data (aka payload) while SOAP is an API specification which does not only specify how you have to do your payload (it has to be XML) but also how you lay out your requests.

Anyway, yes, you need an internal representation of the request, to be able to translate it.

Whether you use structs or some other way to represent it, is up to you.

Awesome thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.