Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
NNayal1600240775
Contributor III
Contributor III

Error on line 1 of document : Premature end of file.

Hi Iam using trest -which returns the output like below in postman:

<?xml version="1.0" encoding="UTF-8"?>

<user>

  <key>XXXXXX</key>

  <c-id type="integer">123</c-id>

  <email>TEST@g.com</email>

  <id type="integer">11</id>

  <login>TEST@g.com</login>

  <mobile-number>0000</mobile-number>

  <name>TEST </name>

  <c-name>TEST LIMITED</c-name>

  <c-code>TEST</c-code>

  <mobile-label-printer-code nil="true"/>

  <is-driver type="boolean">false</is-driver>

  <c-website></c-website>

  <d-nos-to-generate type="integer">0</d-nos-to-generate>

  <d-no-generation-trigger-level type="integer">0</d-no-generation-trigger-level>

  <f_print_name>test</f_print_name>

  <f_name>test</f_name>

  <f_code/>

  <f_id>1234</f_id>

</user>

Now Iam using textractjsonfield to extract key ;but i get error like Error on line 1 of document : Premature end of file. my textractjsonfield looks like:

0695b00000hrjPTAAY.png

Labels (5)
1 Solution

Accepted Solutions
NNayal1600240775
Contributor III
Contributor III
Author

I was missing "Accept" in http header, also i replace textractjsonfield with textractxmlfields and i was able to fixe this issue.

0695b00000hrjgaAAA.png

View solution in original post

3 Replies
NNayal1600240775
Contributor III
Contributor III
Author

I was missing "Accept" in http header, also i replace textractjsonfield with textractxmlfields and i was able to fixe this issue.

0695b00000hrjgaAAA.png

Anonymous
Not applicable

Hello,

Thanks for letting us know you've resolved your issue by yourself and sharing the solution with us on Community.

Best regards

Sabrina

TBates1683209008
Contributor
Contributor

Thank you for letting us know how fixed it.