Is Using General Purpose XML Strings in WS Good or Bad?

We are now working on designing a new API for our product that will be exposed through web services. We have a debate over whether we should use strong parameters with well-defined types (my opinion) or strings that will contain XML in whatever structure is needed. It is quite obvious that, ideally, using strong signature is more secure, and this will allow our users to use tools like wsdl2java. OTOH, our product is evolving at a fast pace, and if the service parameters need to be changed, using XML (passed as a string or any type of type - not a complex type that is a well-defined type) will not require an interface change.

So what I'm asking is basically a rule of thumb guideline - do you prefer using strong types or flexible XML? Have you had any major problems using any method?

Thanks, Eran

+1


source to share


2 answers


I prefer to use strong types. This gives you access to client-side tools that make this job easier. You also point out that when changing messaging, the string approach does not require changing the interface. Personally, I think this is a disadvantage, not an advantage. If the interface changes, you will know very quickly which clients need to be updated.



+1


source


Strings containing XML are extremely bad ideas and take trouble. Use messages that follow a specific pattern. I had to rewrite a significant portion of the application that used a lot of XML internally, not for types. It was terribly slow and it was impossible to understand what was going on.



+1


source







All Articles