I can perhaps add some insight into this, since this thread caused us to have some dicussions about it today with respect to web services we are involved with being developed and/or enhanced by two vendors we are using.
One is using SOAP the way you might expect: no embedded XML. The other vendor is embedding XML in SOAP. With quoting. Why? As a guess, because the latter group had probably been doing POX (plain old XML over HTTP) and wanted to be able to support SOAP with a minimum of effort. And, since most SOAP implementations seem to be capable of automatically providing the necessary quoting, it was acually the path of least resistance. JRJ -----Original Message----- From: Asankha Perera [mailto:[email protected]]on Behalf Of Asankha C. Perera Sent: Friday, February 13, 2009 3:49 AM To: [email protected] Subject: Re: Invoking Synapse from Non Axis 2 Client Andreas Veithen wrote: >> This is not good.. you should not be sending an XML payload in a SOAP >> message as a String! and your payload even has the XML declaration! This is >> very poor design and could cause many problems >> > > I totally agree here. However I see (too) many people doing this. Any > idea what makes people choose this approach? > I guess lots of people still use XML as strings, falsely thinking its more optimal.. recently I helped a client who generated loads of XML using String concatenation! And I have even seen some publicly available web services that defines elements such as follows :-) <strProduct>xxx</strProduct> <strSubProd>yyy</strSubProd> <strService>zzz</strService> <strSvcType /> -- Asankha C. Perera http://adroitlogic.org http://esbmagic.blogspot.com
