This additionally updates GetRegistrationInfo to use similar logic. The two are the exact same function within both the ECDK and the Wii Shop Channel's ESHOP SDK - they differ only in name, authentication level, and a single key.
Nintendo makes the unfortunate decision of sending the plaintext token to the client in a few requests.
Instead of storing a SHA-256 hash of the MD5 we expect from the Wii, we now store both the computed MD5 and plaintext generated token during registration.
The author of this commit apologizes.
Instead of individual handlers, each request deals with one Envelope. This allows fine-tuned error control, along with what's effectively middleware for authentication.
This allows the opportunity to have various handler methods for inserting XML data, instead of a jungle between properly parsing and string-based prayer.
This is an extraordinarily large commit, and in hindsight would have benefitied from being written separately.
To summarise:
- Converts namespace URI parsing to a regex, instead of convoluted string logic
- Removes per-request XML structures in favor of normalised XPath queries
- Moves common variables for all requests to a k/v map of their name and contents, in order to reduce function parameter count
- Changes the name of the ECS action "NotifiedETicketsSynced" to its hardcoded (tenseless) name, "NotifyETicketsSynced"
- Improved properly reporting errors to the end user in areas