Trading partner Location code and alias code were not the same as the ones defined in OSN
1. Go into the responsibility: XML Gateway Responsibility
2. Navigate to Define Trading Partner
3. Ensure the Destination Trading Partner Location code is the same as the Trading partner Alias code that is set in OSN under the Trading Partners > My Trading Partners > Your Trading Partners section
4. Retest the issue.
5. Migrate the solution as appropriate to other environments.