|
Web [Service] 1.0
-
01-06-2009 2:08 PM
|
|
-
sootzoo


- Joined on 02-12-2007
- Posts 221
|
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:
- 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)
- Stop putting stacktraces into your output altogether - that's what logs are for
- Stop putting raw SQL commands into your output - see above
- 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
|
|
-
-
OSvsOS


- Joined on 07-25-2008
- Posts 35
|
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.
|
|
-
-
danixdefcon5


- Joined on 01-09-2007
- Mexico City, DF, Mexico
- Posts 608
|
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.
|
|
-
-
Vechni


- Joined on 09-12-2007
- Baltimore, MD
- Posts 185
|
|
-
-
belgariontheking


- Joined on 08-20-2007
- Cincinnati, OH, USA
- Posts 2,276
|
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
|
|
-
-
DaveK


- Joined on 02-22-2006
- Posts 1,153
|
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)
|
|
-
-
Spectre


- Joined on 05-09-2007
- ::1
- Posts 771
|
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.
|
|
-
-
Kyanar


- Joined on 10-21-2006
- Posts 157
|
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.
|
|
-
-
belgariontheking


- Joined on 08-20-2007
- Cincinnati, OH, USA
- Posts 2,276
|
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
|
|
-
-
Kyanar


- Joined on 10-21-2006
- Posts 157
|
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.
|
|
-
-
morbiuswilters


- Joined on 01-15-2008
- East Coast Represent!
- Posts 4,982
|
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.
|
|
-
-
belgariontheking


- Joined on 08-20-2007
- Cincinnati, OH, USA
- Posts 2,276
|
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
|
|
-
-
sootzoo


- Joined on 02-12-2007
- Posts 221
|
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
|
|
-
-
morbiuswilters


- Joined on 01-15-2008
- East Coast Represent!
- Posts 4,982
|
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)
|
|
|