It appears to be soap-rpc, but uses the very bad technique of stuffing the real payload into the single field called “data”. Also, the XML stuffed into the CDATA tag is not well formed. Perhaps that occured because you manually typed in the XML doc. There is no matching end tag for the element “Cosmos2Rqst”.
In short this is a very poor attempt to integrate using soap. If it is dictated by an application vendor you should give them lots of grief and refuse to pay maintenance. If this was created by an internal application team, send it back as unacceptable.
Actually the xml created by cosmosworldwide the port application vendor from Belgium. I will response to them about your analysis. Thank you very much.
I fail to understand why the above is a bad SOAP message. As I understand, all that the application is trying to do is wrap an XML payload into a SOAP body. However, I agree that the same result may be achieved by cleaning it up, by perhaps having the XML payload as an attachment.
However, in essence, I see it as a very valid SOAP message (not beautified though).
Life gets even more complicated if you were to attempt to encrypt or digitally sign one or more elements inside the CDATA-enclosed XML string.
It’s not that the soap request was invalid per the soap spec, its just that it is non-standard, ignores best practices and reflects either a naive or lazy design.
Seriously, how much extra work would be required to avoid the CDATA if you were given that task? 30 minutes, a few days if you needed a generalized interface?
I get to see this kind of stuff frequently from web service newbies. That’s to be expected and there’s nothing wrong with that during a learning period (the web services equivalent of pink flashing fonts when learning HTML). However, when an application vendor produces this kind of, er, stuff and calls it web services or SOA, they should be soundly criticized and sent packing in embarrassment to get it right.
Thanks for the reply, clarifying most of my questions. The reason that I saw nothing wrong in the SOAP message, was because I was looking at it as a SOAP envelope.
However, I must admit I have done quite some wrapping of XML within a SOAP message myself. The message posted above reminded me of trying to force eBays’ web services (non SOAP based, previously) to a SOAP based client.
Well, we did not do the CDATA, as in the message posted, but we did use xsd:any extensively.
Yes, validation of the XMLs was quite a pain, but XSLT to get the desired XML response from eBay was quite helpful in validation.