I am going through with a strange situation. I have created a DTD for EDI997. While running the service I can see the data in the EDI997 even ST segment values. When using the converToString service then its mapping all the segment values except ST segment values.
I agree with shubhro,just do a setValue for ST/SE segment fields mentioned above.so that is why some of the segments are missing when you do convertToString for generating edi outbound.