ConvertToString throwing Nullpointer exception

i am doing mapping from delimited flatfile to 835 EDI mapping in 6.0.1.
i am done with segment mapping , and when i do converttoString service i am getting NullPointer exception.
i am passing the EDI document as input and ns record as actual EDI document.
what could be the problem here?
when i look into the EDI document from my mapping , only i see ST01 as 835 and ST02, SE01 and SE02 all are blanks.
any help is appreciated.its some what urgent.


Make sure your mapping of segments are perfect(IData Values).

And Instead of giving nsRecord,try with passing the ffschema param(EDIFFSchema.X12.V4010:T835)of convertToString,This should work.

If this problem still exists,then problem might be with mapping itself.

(Above mentioned schema will be stored in EDIforTN Package.)


Hello RMG,
i tried this by passing ffschema param.but i am getting this error now
“com.wm.ff.parse.StorageException: [FFP.0015.0005] Specified an invalid schema WmEDIforTN.X12.V4010:T835, is not a Flat File Schema.”


Hello RMG,
Sorry about this. i did wrong refernece .it’s " EDIFFSchema.X12.V4010:T835". not WmEDIforTN.
its working now.but why it is not working for nsRecord.

Thanks for your help.

Pls check,Is that 835 schema exists in EDIforTN package.
This schema will be automatically generated when you install EDI document Types in TN Console.

Pls make sure schema exists and loaded properly.

Oh it was fast,good to know its working.

I haven’t tried with ns record,anyway functionality should be the same.

Hell RMG,
ConvertToString is modifying the format of some fields. ex. field1 value is 3489.07 in EDI values document, but the service convertToString is formating this as 3.489E7 or something like that. how to overcome this formating.Can you please let me know soon.


Check in the 835 schema about the field which you are referring this behaviour.some times its all depends on schema picklist constraint or invalid content may be passing to it.

If its not clicked,may be someone will chim on this.

What is the data type of “field1”? I believe the only way a translation like that would occur is if the field is typed as a float or double, thus a toString() call will return exponential notation format.

As in EDI documentation explained, i modified the Flow.xml in /integrationServer/packages/WmEDI/config/ . i modified the autoformat = ‘false’ in formatdecimal format service.
and reload the is working now.

Thanks for all your help.


I had this same problem and recommended that the config/format.xml file be changed for our development work. However, there is a lot of stuff with EDI already in production on IS 6.1 using EDI. None of it uses the convertToString flow. My question is what other flows in the WmEDI package use the formatDecimal FormatService ?
Other than regression testing all the EDI stuff in production, how can we make sure this change does not cause another problem?

Well, I looked thru the wmEDI package and the WmFlatFile package. When I look for dependents of wm.b2b.edi.util.formatServices:formatDecimal there are none. Probably because the code to wm.b2b.edi:convertToString
is hidden or the code that runs the “find dependents” service won’t find the relationship inside a java service.
Anyway, the convertToString and convertToValues are the only services that use the FormatInfo document - which interacts with formatDecimal.
Srini, are you reading this? Does anybody think I’m way off on this?