Templates in 46

Hi,
I am working on WM 4.6 .I need to extract data from a flat file. I have used userdefined template with character delimiter,but its not able to parse data.
The error returned is…

An error occurred while tracing.

com.wm.app.b2b.server.ServiceException: Input template object in service wm.b2b.edi:convertToValues is null [EDICOR.000010.000822]

Can you suggest wat d problem is?

The template a designed is…with * as field separator.

<?xml>

<desadv_template>

<segment-delimiter>
<keyword></keyword>
<offset></offset>
<fixed></fixed>
</segment-delimiter>

<field-delimiter>
<keyword></keyword>
<offset></offset>
<fixed>*</fixed>
</field-delimiter>

<sub-field-delimiter>
<fixed></fixed>
<keyword></keyword>
<offset></offset>
</sub-field-delimiter>

<segment>
<field>
<field>
<field>
<field>
<field>
<field>

</segment>

<loop>
<seg-id>recordWithNoID</seg-id>
</loop>

</desadv_template>

Are you able to see template object when you did getTemplate and then you have to pass this template object to convertToValues to parse the desadv document.

Looks like templateobject is null in the pipeline,please debug it.

HTH,
RMG

Hi RMG,

I am passing template object as an input to convertToValues. Still same error occurs.
The input data string is like :

50135467228271780129987051010123455’1’*…

Please suggest me wat to do?

thanx,
parul

hi, i worked on it again… i am receiving template record from documentToRecord service which i am giving as input to convertToValues. & the data into edidata is string of input i defined before…

50135467228271780129987051010123455’1’*…

Now the error is…

Could not run the service ‘parse’.

java.lang.NullPointerException

Please let me know where can i go wrong. Its a urgent situation.

Thanx,
parul

you have to use getTemplate (WmEDI service),the reason of null service is convertToValues is not able to parse becuase of template issue.

Please use getTemplate and check if the pipeline templateObject contains your flatfile structure as defined.

HTH,
RMG

Thanks RMG,

I was able to solve the problem. Actually the problem was in mapping the the right node from boundnode recieved.

thanx,
parul