Hacker News new | ask | show | jobs
by Jeema3000 5642 days ago
I will now share my secret SOAP API Pro Method:

Step 1: Ignore all tools which supposedly make things easier (very important)

Step 2: Find the web service API documentation

Step 3: Ctrl-C example XML request

Step 4: Ctrl-V example XML request into program, replacing appropriate parts with program variables

Step 5: Parse the response. You're on your own here... Godspeed. :)

1 comments

The company I work for has to digest a handful of XML and SOAP protocols. Theoretically, they all conform to spec A or B, and/or define their own subset of that spec with an XML language definition. There should be like 3 or 4 pieces of code which would handle every format they offer.

Practically: ctrl-C, ctrl-V, and call them when it doesn't work. More often than not it's either A) incorrect documentation, or B) you hit a bug (yes, this means their sample-code doesn't work. It happens frequently). A good chunk of our request-data builders are simply string manipulators, because some of the APIs we call are nitpicky about the order of XML attributes in a tag.

I laugh when people tell me XML works better "because it's a standard".