Hospido — talking to SES.Hospedajes from C# without the WSDL pain
PR 2 of 3: the SES protocol library and state machine just landed. The dashboard is next.
Two weeks ago I introduced the Hospido SES one-click submission feature. The plan was a three-release rollout: foundation, then protocol, then the dashboard the property owner actually clicks. The protocol piece just merged.
What that means in plain Spanish: Hospido can now construct a legally valid Parte de Viajero XML, zip and base64-encode it, wrap it in the SOAP envelope SES.Hospedajes expects, post it with HTTP Basic Auth, and parse the response — including the awkward case where SES is "in process" and needs polling, or where it accepts most of a batch but rejects one registration because someone typed a passport number that's too short to be a Spanish DNI. The state machine knows how to react to each outcome: confirm the booking, queue an automatic retry, surface a plain-language rejection to the owner, or transition to "no enviado" when credentials have expired.
I made one deliberate choice that's worth flagging: no WCF dynamic client, no auto-generated C# from the WSDL. The SES protocol is shallow — one submit operation, one polling operation — and the WSDL has been quietly revised more than once. Hand-rolling the XML and SOAP envelope keeps every byte transparent to the next engineer who looks at it, and the unit tests pin the wire format against a golden fixture so accidental drift is caught immediately. 143 tests now exercise the protocol from corner to corner.
Next release: the cockpit. Owner-side dashboard with the per-row status badges, batch submit, the automatic retry worker, and the audit history view. Then María at Casa de Doña Concha can finally stop opening the SES portal by hand.