• justsomedude (unregistered)

    %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

  • Guybrush Threepwood (unregistered)
    <string xmlns="urn:Initech.Global.Comment"> <Comment> FRIST! </Comment> </string>
  • Geert (unregistered)

    Let's%20encode%20all%20comments%20from%20now%20on.%20It's%20actually%20better%20this%20way%20for%20future%20compatibility%2C%20you%20know.

  • anon (unregistered)

    They still need to replace with &#39s.

  • justsomedude (unregistered) in reply to Guybrush Threepwood
    Guybrush Threepwood:
    <string xmlns="urn:Initech.Global.Comment"> <Comment> SCEOND! </Comment> </string>

    FTFY ;-)

  • PS (unregistered)
    Comment held for moderation.
  • justsomedude (unregistered)

    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...

  • Henrik (unregistered)
    Comment held for moderation.
  • Severity One (cs)

    It never ceases to amaze me that (a) vendors come up with such crap and (b) customers accept it.

  • frits (cs) in reply to Henrik
    Henrik :
    Miss anything? (Namespace)

    http://www.initechglobal.com/

    Yeah. Mike Judge is going to be pissed...

  • Gary (unregistered) in reply to PS
    Comment held for moderation.
  • Mr. S. (unregistered)

    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.

  • frits (unregistered)

    Who hasn't normalized their XML like this?

  • Prodis a.k.a. Fernando Hamasaki de Amorim (unregistered)

    This "technic" is called SOP, String Oriented Programming.

  • what (unregistered) in reply to Gary
    Comment held for moderation.
  • Paul (unregistered)
    <Image> Nx4U8fSs+0lLRRNjORrUg/495x23NWHYf6j8T/OqW7QnsndLp74jJ5p64q6XycDrWZYk4PPc [cut rather large blob]
    But, without the rest of the image, how can we print it out and OCR it from a wooden table photo?
  • Stretch (unregistered)

    Sterling Commerce does the same thing. Useless piece of crap.

  • mrsean2k (unregistered)

    File under "People who don't understand how to handle CDATA at one or more points in the stack"

    I could write a novel.

  • Bryan the K (unregistered)

    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?

  • Anon (unregistered)

    So this is the "future" of XML syntax then? XML, as it is now, is bloated enough already.

  • EatenByAGrue (unregistered) in reply to Prodis a.k.a. Fernando Hamasaki de Amorim
    Prodis a.k.a. Fernando Hamasaki de Amorim:
    This "technic" is called SOP, String Oriented Programming.

    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.

  • MurphyQJames (unregistered)

    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.

  • Anon (unregistered)

    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.

  • Glad (unregistered)

    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.

  • dkf (cs) in reply to mrsean2k
    mrsean2k:
    File under "People who don't understand how to handle CDATA at one or more points in the stack"
    Actually, it's easier to do it this way in code, since then you need less complex processing when dealing with a payload that may potentially contain the sequence “]]>”; remember, CDATA sections can't be nested. Using entity encoding (code which you have to have around for generating attributes safely, as they can't contain CDATA sections either) is simpler in that it minimizes the code that has to be written and tested.

    Still, it's a bonkers way to write a webservice interface as it just forces clients to do more work by hand…

  • Kempeth (unregistered)

    They should really escape those ampersands...

    btw. Does that changevision thing in the ad come with the girl in the tshirt?

    Captcha: eros

  • PS (unregistered) in reply to Gary
    Gary:
    What if I want to put CDATA inside my XML payload? That's why I need to URLencode it.

    Oh, no worries. You can actually split an XML text element into multiple CDATA blocks. So it's pretty straight forward:

    data:text/xml,<foo><![CDATA[<![CDATA[<data>]]>]]<![CDATA[>]]></foo>

    See? Simple and elegant as you'd expect from anything XML related.

  • fake me (unregistered) in reply to Kempeth
    Kempeth:
    They should really escape those ampersands...

    There is no escape from the Ampersand of Doom

  • boog (cs)
    ...it's actually better this way for future compatibility...
    The above phrase has become a red flag to me. Sure, "flexibility" can be a good thing in some instances, but in my experience it seems that words like "compatibility" and "flexibility" are frequently thrown about to justify poor design/planning and unneeded (unwanted) complexity.

    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?

  • Coyne (cs)

    Frankly, I think they need even more compatibility:

     <string  xmlns="urn:Initech.Global.Services.Extra.Compatible.Wrapper">
       <string xmlns="urn:Initech.Global.Services">
         &lt;CompanyGetConnector&gt;
           &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
             &lt;xs:element name="InitechGetConnector"&gt;
               &lt;xs:complexType&gt;
    

    Don't we all agree that is more compatible?

  • Brad Davis (unregistered)

    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.

  • boog (cs) in reply to Kempeth
    Kempeth:
    They should really escape those ampersands...
    I was thinking the same thing about the double-quotes.
  • mrsean2k (unregistered) in reply to dkf
    Comment held for moderation.
  • Jonathan (cs) in reply to Mr. S.
    Mr. S.:
    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.

    You have no schema changes because you don't really have a schema.

  • Mancomb Seepgood (unregistered) in reply to Guybrush Threepwood
    Guybrush Threepwood:
    <string xmlns="urn:Initech.Global.Comment"> <Comment> FRIST! </Comment> </string>

    Ha ha ha, that's the dumbest name I've ever heard!

  • dgvid (cs)

    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.)

  • PSWorx (cs) in reply to dgvid
    dgvid:
    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.)
    I think we already have that:
    Prodis a.k.a. Fernando Hamasaki de Amorim:
    This "technic" is called SOP, String Oriented Programming.
  • xunda (unregistered)

    The real WTF is to use SOAP and expect the resulting interfaces to be sane.

  • justsomedudette (unregistered) in reply to justsomedude

    %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

  • brommers (unregistered)

    I've seen something very similar from a partner firm in Ireland - they're now bust!

  • tamosius (unregistered)

    now that is short and sweat capital WTF! :)

  • Jeff (unregistered) in reply to Kempeth
    Kempeth:
    Does that changevision thing in the ad come with the girl in the tshirt?
    No, she's not nearly as hot as Irish Girl. I don't think changevision girl comes. Ever. With anything.
  • Jonathan (unregistered) in reply to boog
    but in my experience it seems that words like "compatibility" and "flexibility" are frequently thrown about to justify poor design/planning and unneeded (unwanted) complexity.

    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?

  • Bi Onic (unregistered) in reply to Jonathan
    Jonathan:
    Root WTF: marketing-driven development.
    Gentlemen, I think Jonathan has finally labeled an anti-pattern we've all experienced.

    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.

  • jtg (unregistered)

    Computer programmers that need to learn how to use SOAP? Say it ain't so!

  • Veritas (unregistered) in reply to Geert

    You%20forgot%20to%20encode%20the%20apostrophe%20and%20%period%46

  • Q (unregistered)

    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.

  • Anonymous (unregistered)

    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?

  • frits (cs) in reply to tamosius
    tamosius:
    now that is short and sweat capital WTF! :)

    That's why they needed SOAP.

  • hoodaticus (cs) in reply to frits
    frits:
    Who hasn't normalized their XML like this?
    TRWTF is you.

Leave a comment on “XML'd XML”

Log In or post as a guest

Replying to comment #:

« Return to Article