The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Web [Service] 1.0

Last post 01-12-2009 2:30 PM by morbiuswilters. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 01-06-2009 2:08 PM

    Web [Service] 1.0

    While integrating a 3rd-party CRM app, most of the documentation - no, I'm just kidding, there isn't any documentation - most of the responses from its homebrew XML API are encapsulated in a pretty simple structure with a success tag and a message tag. Our "update the website" code is thus pretty simple, and can generically parse most responses for the "success" value, and fail/retry if it's false, while logging the details. Simple stuff.

    Client calls us, complains that nothing is being updated on their website. The user log contains no information about the response. The debug log contains this hunk of crap, representing the full response from the API call:

    <WTFAPI mode="Insert">
        <tracking>
            <successful>False</successful>
            <message>System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'aaaaaTrackingNumbers_PK'. Cannot insert duplicate key in object 'TrackingNumbers'.
    The statement has been terminated.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at Sql_Misc50.Class_SQL50.ExecuteSQLTextReturnScalar_MsSQL(Object& SqlConnection_, String& sSQL, Boolean bDispose, Boolean bLog_SQL_Usage, Object[& SqlParameters)
    INSERT INTO [TrackingNumbers]
    ([OrderID], [ShipDate], [TrackingNumber])
    VALUES
    (@OrderID , @ShipDate , @TrackingNumber )
    SELECT @@IDENTITY;</message>
        </tracking>
    </WTFAPI>

    People, if you're going to use XML for webservices and for some reason not use an established toolkit:

    1. Escape your output or just use the DOM, for chrissakes (wtf do I care that you pass your connection object by reference? All I care is that it's NOT VALID XML, ASSHOLE)
    2. Stop putting stacktraces into your output altogether - that's what logs are for
    3. Stop putting raw SQL commands into your output - see above
    4. Try to friggin design an API that doesn't force me to telepathically understand your DB structure, knowing that it may be slightly silly to make an API where one is required to C, U and D without being able to R.

    And namespaces like "Sql_Misc50" and "Class_SQL50" and methods like "ExecuteSQLTextReturnScalar_MsSQL" lead me to believe that your code is not, how to put this nicely, a joy to work with. Especially if it's anything like your API.

    All in all, this is either the stupidest thing I've read all week (and I'm porting SSDS to .NET!), or the worst trolling attempt ever.
    -bstorer
  • 01-06-2009 2:30 PM In reply to

    Re: Web [Service] 1.0

     Hmm,

    I have a project to integrate a B2B web app. I was going to send the other business an XML document. My initial design was way too simple. This will make the other web developer who has to write the parser cry. 

     

     

    Filed under:
  • 01-06-2009 2:40 PM In reply to

    Re: Web [Service] 1.0

    Heh. This is on par with that web service that made my client barf when it returned text from a CORBA exception.

    Or that other one where I expect a four-letter return code, but sometimes returns stuff like

    ERROR: [ODBC][MS SQL Server 2000] user 'fudge' does not exist in database 'someseriousstuff'.

    I've had to register 'ERRO' as "Some idiotic internal error" ever since.

  • 01-06-2009 4:34 PM In reply to

    • Vechni
    • Top 200 Contributor
    • Joined on 09-12-2007
    • Baltimore, MD
    • Posts 185

    Re: Web [Service] 1.0

     

  • 01-06-2009 9:00 PM In reply to

    Re: Web [Service] 1.0

    Vechni:
    Worst use of the wtfmeter ever

    SpectateSwamp exposing aliens. Obviously the World needs SSDS


    [10:07] <fatdog> so from now on.. be sure to wear nice clean underwear
    [10:07] <mps> fatdog: That is simply not going to happen
  • 01-07-2009 7:46 AM In reply to

    Re: Web [Service] 1.0

    belgariontheking:

    Vechni:
    Worst use of the wtfmeter ever

    And he got the meme wrong.  "Holy shit" my arse, everyone knows it should be "Whaaat?"

    (USER WAS BANNED FOR THIS POST)


  • 01-07-2009 8:18 AM In reply to

    Re: Web [Service] 1.0

    DaveK:

    belgariontheking:

    Vechni:
    Worst use of the wtfmeter ever

    And he got the meme wrong.  "Holy shit" my arse, everyone knows it should be "Whaaat?"

    And he made it 1x1. WTF?
    ╩юфют√ь ёЄЁрэшЎрь яюЁр эр яхэёш■.

    #TDWTF @ SlashNET was merged into #codelove @ the same network. You're still welcome to drop by. I guess.
  • 01-07-2009 10:29 PM In reply to

    Re: Web [Service] 1.0

    DaveK:

    belgariontheking:

    Vechni:
    Worst use of the wtfmeter ever

    And he got the meme wrong.  "Holy shit" my arse, everyone knows it should be "Whaaat?"

    Yeah, but that's the official WTF Meter, from the guy who originally made it.
  • 01-09-2009 7:47 AM In reply to

    Re: Web [Service] 1.0

    Kyanar:
    DaveK:

    belgariontheking:

    Vechni:
    Worst use of the wtfmeter ever

    And he got the meme wrong.  "Holy shit" my arse, everyone knows it should be "Whaaat?"

    Yeah, but that's the official WTF Meter, from the guy who originally made it.
    Pardon me if my sarcasm detector is off, but it is neither of those things you described.
    SpectateSwamp exposing aliens. Obviously the World needs SSDS


    [10:07] <fatdog> so from now on.. be sure to wear nice clean underwear
    [10:07] <mps> fatdog: That is simply not going to happen
  • 01-11-2009 9:50 PM In reply to

    Re: Web [Service] 1.0

    belgariontheking:

    Kyanar:
    DaveK:

    belgariontheking:

    Vechni:
    Worst use of the wtfmeter ever

    And he got the meme wrong.  "Holy shit" my arse, everyone knows it should be "Whaaat?"

    Yeah, but that's the official WTF Meter, from the guy who originally made it.
    Pardon me if my sarcasm detector is off, but it is neither of those things you described.
    Actually, it's both of the things I described. From this thread, dtech is the creator of it. dtech owns dtechnology.nl. The meter in this thread is from dtechnology.nl. Hence, it's the original WTF meter.
  • 01-11-2009 10:38 PM In reply to

    Re: Web [Service] 1.0

    Kyanar:
    Actually, it's both of the things I described. From this thread, dtech is the creator of it. dtech owns dtechnology.nl. The meter in this thread is from dtechnology.nl. Hence, it's the original WTF meter.

    The word official would imply that it was somehow sanctioned by Alex.  Please learn how to use words.

  • 01-12-2009 8:13 AM In reply to

    Re: Web [Service] 1.0

    morbiuswilters:

    Kyanar:
    Actually, it's both of the things I described. From this thread, dtech is the creator of it. dtech owns dtechnology.nl. The meter in this thread is from dtechnology.nl. Hence, it's the original WTF meter.

    The word official would imply that it was somehow sanctioned by Alex.  Please learn how to use words.

    And while dtech took it to the next level, the idea was originally from fredfoobar.  Vechni is not its originator, and that's who it's "from" in this case.
    SpectateSwamp exposing aliens. Obviously the World needs SSDS


    [10:07] <fatdog> so from now on.. be sure to wear nice clean underwear
    [10:07] <mps> fatdog: That is simply not going to happen
  • 01-12-2009 2:07 PM In reply to

    Re: Web [Service] 1.0

    belgariontheking:

    morbiuswilters:

    Kyanar:
    Actually, it's both of the things I described. From this thread, dtech is the creator of it. dtech owns dtechnology.nl. The meter in this thread is from dtechnology.nl. Hence, it's the original WTF meter.

    The word official would imply that it was somehow sanctioned by Alex.  Please learn how to use words.

    And while dtech took it to the next level, the idea was originally from fredfoobar.  Vechni is not its originator, and that's who it's "from" in this case.
     

    Sure glad we settled that. Vechni, please see dtech and fredfoobar to remit your royalty payments.

    All in all, this is either the stupidest thing I've read all week (and I'm porting SSDS to .NET!), or the worst trolling attempt ever.
    -bstorer
  • 01-12-2009 2:30 PM In reply to

    Re: Web [Service] 1.0

    belgariontheking:
    And while dtech took it to the next level, the idea was originally from fredfoobar.  Vechni is not its originator, and that's who it's "from" in this case.

    I knew I could count on you to sort things out. 

Page 1 of 1 (14 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems