Hi,
The code has been migrated from 4.6 to 6.1.
The service is first invoking wm.b2b.edi.templateMgr:getTemplate and getting the templateObject.
After that it is invoking wm.b2b.edi:convertToString to get the string.
But while executing wm.b2b.edi:convertToString in 6.1 it is giving the following error:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
Cay anyone tell where the problem is?
If any Fix has to be applied, can any one list the Fix which has to applied.
Thanks,
Vijay.
Did you migrate your templates to flat file schema?
In 6.1 you no longer use edi templates instead you use flat file schema. There is a web interface to migrate templates → ff schema. Then the service getTemplate will return the name of the flat file schema and hopefully everything will work as you expect.
If that’s not the problem then including the full stack trace would help determine why this error is occuring.
Hi,
Thanks for the reply.
Actually I didnt migrate templates to flat file scheme.
But when I tried to do that using the web interface, I got the following error
Error getting packages: class com.wm.app.b2b.server.ServiceException
com.wm.util.LocalizedIOException: [ISC.0076.9001] Unsupported RPC type: 6
can you help me how to migrate the templates to flat file, cause i couldnt find any documentation related to that.
Thanks,
Vijay.
You can find this documented in the EDI upgrade guide called “webMethods EDI Modules Upgrading from 4.x to 6.1” available at:
https://advantage.webmethods.com/meta/default/folder/0000032174
–
Subhash
Hi Vijay,
I offer basic trouble shooting help with this, but have you traced the pipeline and made sure you are handing the :convertToString method a proper value?
I spent a day working on this error with this method, and the method I was using before this was bad, and therefore I was not actually handing the :convertToString method any string value, hence the “out of bounds”
If this is the answer, it makes your life easier!
Let me know if this helps, Good Luck,
Scott Corder
Hi Scott,
Thanks for your reply.
I traced the pipeline.
Here are the input which are being passed to wm.b2b.edi:convertToString
Values An EDIRecord
nsRecord Hard codded as LXKcXML.edi.rec:EDI850_4010 (Basing on this doc only an xml file has been mapped to the above EDIRecord)
Segment_terminator ~
Field_separator *
Subfield_separator |
In 4.6 this service is generating the EDIString without any errors.
But in 6.1 it is giving the following error.
error: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
In 6.1 WmEDI_SP1 has been installed.
If you have any ideas where the problem is please let me know.
Thanks,
Vijay
Hi,
The record terminator is missing. May be because of this entire output is written out in a single line and hence it is failing.
Check this option also setting a value in the record delimiter (for eg. new line character)
Regards,
Vishnu
Is there a flat file schema called ‘LXKcXML.edi.rec:EDI850_4010’ anywhere on your server? This should have been created during the migration process. It would be in the same package as the original template, except now you’ll be able to see the flat file schema in the developer.
Chris