By default the envelop will be generated by B2B itself.
See if the XML payload that is coming to B2B has any internal properties. The values in internal-properties will get over ridden and they need to be in proper format.
If the <internal-properties> tag exists, you can try removing them and just have <ST>/<SE> segments
Strange!!!. Eventhough the approach worked for you, It should work by default. We hv not heard this from any one else as well...
Can you please share the configuration and diagnostic log in trace:32 mode along with payload?
Which patchset (e.g 126.96.36.199.0, etc) have you installed