I dont own the x32, but maybe this issue is related to this:
When you use the Mackie Control surface in Sonar, Sonar issues a sysex MIDI request command Out the MIDI Out Port you specified in the surface setup in Sonar.
It repeats issuing this sysex and displays "connecting..." until it receives a sysex answer at the in port you specified in sonars surface setup.
After sonar received the sysex answer the mackie control surface works communicating via the in/out ports.
So it seems the x32 does not send this sysex answer upon sysex request received from sonar. It's the same with NI Maschine in Mackie Control template Midi mode.
If somebody is interested I could look up the sysex mid command and provide a step by step explanation on how to get this working using Bome Midi Translator and LoopMidi. I for example use Maschine in Mackie Control mode to control sonar, using MidiTools which simulates the MCs display in a window.
My guess is that this would work with the x32, too.