|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to extract XML from PDF? |
« View previous topic :: View next topic » |
Author |
Message
|
jeeth_m |
Posted: Sun Nov 15, 2009 11:21 pm Post subject: How to extract XML from PDF? |
|
|
Voyager
Joined: 21 Jan 2002 Posts: 93
|
Hi,
We have a requirement where we need to extract XML from pdf.
Usage of SWA was already suggested and tested, but some how the application sending the message is not able to create SWA with pdf document bigger than 1 MB. So it was decided to send the pdf docuemnt with soap message embedded in it.
We successfully implemented it by taking the PDF as a BLOB message and using string functions to extract XML out of it.
Is there a better way to do it?
Thanks & Regards,
Jeeth |
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 16, 2009 2:34 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
So it was decided to send the pdf document with soap message embedded in it.
...
Is there a better way to do it? |
You could define a new message format which contains two parts - one part for the XML and one part for the PDF. That would avoid the need to parse a PDF document in your message flow. If you do this, I suggest that both parts have a prefix length field - then you can use MRM/TDS to extract the parts for you, and re-parse the XML using XMLNSC.
Or you could put some effort into finding out why the source application cannot send large SWA messages. |
|
Back to top |
|
 |
jeeth_m |
Posted: Tue Nov 17, 2009 9:01 pm Post subject: |
|
|
Voyager
Joined: 21 Jan 2002 Posts: 93
|
Thanks Kimbert!
For the SWA part, effort is already on to find out the issue with application handling source message.
For the suggestion you made let me put my understanding as below.
Create MRM/TDS message set with elements as below.
LENGTHOFPDF
PDFDOCUMENT Takes length as value in LENGTHOFPDF
LENGTHOFXML
XMLDOCUMENT Takes length as value in LENGTHOFXML
Is my understanding correct?
Thanks & Regards,
Jeeth |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 18, 2009 12:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Yes - that is exactly what I was suggesting. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|