How to set a payment in Ripple without specifying currency issuers?
Ripple won't search for paths while processing transactions. The paths must be found first, using pathfinding, and specified in the transaction. You're getting a path dry error because you're not specifying any paths, so the only path you're getting is the default path.

A simple solution is to change the issuer of the SendMax amount to be the gateway. This will implicitly insert the gateway's account node before each path, including the default path. Alternatively, specify the gateway's account node as an explicit path or use pathfinding.