- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
%49%27%64%20%70%6F%73%74%20%22%66%69%72%73%74%22%20%69%6E%20%65%6E%67%6C%69%73%68%2C%20%62%75%74%20%69%74%27%73%20%61%63%74%75%61%6C%6C%79%20%62%65%74%74%65%72%20%74%6F%20%75%73%65%20%68%65%78%20%66%6F%72%20%63%6F%6D%70%61%74%69%62%69%6C%69%74%79%2C%20%61%6E%64%20%73%65%76%65%72%61%6C%20%6F%66%20%6F%75%72%20%63%6F%6D%70%75%74%65%72%73%20%61%6C%72%65%61%64%79%20%75%73%65%20%69%74%20%74%68%69%73%20%77%61%79%2E
Admin
Admin
Let's%20encode%20all%20comments%20from%20now%20on.%20It's%20actually%20better%20this%20way%20for%20future%20compatibility%2C%20you%20know.
Admin
They still need to replace with 's.
Admin
FTFY ;-)
Admin
Already way ahead of you. (Scroll down to the last two examples)
Admin
Somebody should remind the vendor that it's also better for future compatability to submit payments in the form of IOUs instead of bank notes...
Admin
Miss anything? (Namespace)
http://www.initechglobal.com/
Admin
It never ceases to amaze me that (a) vendors come up with such crap and (b) customers accept it.
Admin
Yeah. Mike Judge is going to be pissed...
Admin
What if I want to put CDATA inside my XML payload? That's why I need to URLencode it.
Admin
We do this too. It does make SOAP a little easier - no schema changes for every little response change, but I'd expect more from a third party, external-facing service.
Not to say that doing this isn't a WTF.
Admin
Who hasn't normalized their XML like this?
Admin
This "technic" is called SOP, String Oriented Programming.
Admin
What if I want to put a url in my URLencoded payload? That is why I need to Base64 ecode it.
Admin
Admin
Sterling Commerce does the same thing. Useless piece of crap.
Admin
File under "People who don't understand how to handle CDATA at one or more points in the stack"
I could write a novel.
Admin
I'm disappointed, I was hoping for another day of hidden comments or at the very least unicorns.
Oh and the real WTF is that he's using SOAP when they should have been using CORBA, amirite?
Admin
So this is the "future" of XML syntax then? XML, as it is now, is bloated enough already.
Admin
However, the vendor is actually engaged in the SOL technique: you didn't make the decision to buy our stuff, but you're the poor sap who has to implement it, so you're SOL.
Admin
Yo dawg, I heard you like to XML while you XML'd, so I put some XML in your XML so you could XML while you XML'd.
Admin
UPnP and DLNA do this too. XML describing the video you're about to play, entity-escaped and put in an XML SOAP document.
Of course, DLNA is designed for embedded devices (like TVs) where you really don't want the memory overhead of copying the entire XML document and un-entity-escaping it.
Admin
This is actually quite common, the reason for this is also because, in quotes, "its easier compatibility wise talking to clients written in languages like java"...
I've seen it go as far as entire systems built on a single webmethod.
string ProcessMessage(string xml, string username, string password)
And this isnt from some little 3rd party developer, i'm talking about entire countries running their mobile number portability systems like this.
Admin
Still, it's a bonkers way to write a webservice interface as it just forces clients to do more work by hand…
Admin
They should really escape those ampersands...
btw. Does that changevision thing in the ad come with the girl in the tshirt?
Captcha: eros
Admin
Oh, no worries. You can actually split an XML text element into multiple CDATA blocks. So it's pretty straight forward:
See? Simple and elegant as you'd expect from anything XML related.
Admin
There is no escape from the Ampersand of Doom
Admin
Granted, in this case all they're doing is wrapping the XML message in a string. So not a lot of extra complexity. Still, why? No, "compatibility" is not an answer. What actual, measurable benefit is there to doing it this way?
Admin
Frankly, I think they need even more compatibility:
Don't we all agree that is more compatible?
Admin
Yeah, this isn't a WTF. One of the most common reasons for doing something like this is so you can extract the XML, create a standalone DOM from it and validate it against a schema. This is much harder to do if the piece you want to validate is actually just a node in a SOAP envelope. The point is that the encoded XML document is logically distinct from the soap envelope and even the response wrapper, so there's no good reason to make it all one big XML document.
Admin
Admin
Hi @dfk,
Yes I understand the nesting issue - but misunderstandings of it are what leads to this sort of thing.
Avoiding it (and consequently multiply encoded horrors like this) involves no more than a handful of lines of code to appropriately insert and extract at specified points in the application stack - wrapped in a tiny helper class / whatever.
I'd argue that once you consistently employ these routines it's less complex for all sorts of reason. YMMV
Cheers
S
Admin
You have no schema changes because you don't really have a schema.
Admin
Ha ha ha, that's the dumbest name I've ever heard!
Admin
I've seen this kind of thing often enough that it deserves its own anti-pattern name. (And of course, the Real WTF is SOAP.)
Admin
Admin
The real WTF is to use SOAP and expect the resulting interfaces to be sane.
Admin
%41%73%20%73%6F%6D%65%6F%6E%65%20%66%72%6F%6D%20%74%68%65%20%66%75%74%75%72%65%20%49%20%74%68%61%6E%6B%20%79%6F%75%20%66%6F%72%20%79%6F%75%72%20%65%61%73%79%20%74%6F%20%72%65%61%64%20%6D%65%73%73%61%67%65
Admin
I've seen something very similar from a partner firm in Ireland - they're now bust!
Admin
now that is short and sweat capital WTF! :)
Admin
Admin
Root WTF: marketing-driven development. But in the "consumer software" space, it's how the game is played now. shrug
Serious question: What development methodologies and languages/toolkits deal well with management psychosis?
Admin
Next steps: somebody needs to flowchart the MDD methodology.
Anyway, that's why open source will ultimately win. No marketing weasels. No ignorant cost-cutting MBAs.
Admin
Computer programmers that need to learn how to use SOAP? Say it ain't so!
Admin
You%20forgot%20to%20encode%20the%20apostrophe%20and%20%period%46
Admin
They just follow best practices: encapsulate what varies. And the performance is drastically increased when they can send you the contents from table_125.field_12 without processing it.
Admin
I don't think this is a WTF. it seems that the result string would not always be XML, so it makes sense this way.
not to mention safety concerns, if the string is not sanitized for XML, what's to stop a bug from returning </result> and ruining the XML syntax?
Admin
That's why they needed SOAP.
Admin