ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Unzip using JCN

Post new topic  Reply to topic Goto page Previous  1, 2
 Unzip using JCN « View previous topic :: View next topic » 
Author Message
gagan.maverick
PostPosted: Wed Oct 08, 2014 11:08 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Sep 2014
Posts: 50

thanks..
customer file is giving--- PKPKLg3E
after extracting the file is giving -- PKLg3Eßû‘é


so what do you sugest... Thanks once again
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Oct 09, 2014 12:03 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

google for 'Zip file Header'. There is lots of information out there including this one
https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html


the 'PKPK' seems a little strange to me. Find out what utility the customer is using to zip the file. (don't forget the version)

You could try stripping the first two character off the BLOB and running it through your java code.
If that works, add a simple test to your code to check for 'PKPK' in the blob and remove the first 'PK' if found.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
gagan.maverick
PostPosted: Thu Oct 09, 2014 10:22 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Sep 2014
Posts: 50

Thanks a lot .. you suggestion worked and I have asked client as you mentioned about the utility.. But i have one more question .. After unzipping the zip in jcn ... I have one pdf file .. i need to store the name of that file as well.. coz i will need that down stream ..can you tell me how can i do that .. I mean in local env or in header somewhere in JCN..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Oct 09, 2014 10:37 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I'm glad you got it working.
Java is the 'work of the devil' as far as I'm concerned. I really have no idea how to do what you want.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 10, 2014 4:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

gagan.maverick wrote:
But i have one more question .. After unzipping the zip in jcn ... I have one pdf file .. i need to store the name of that file as well.. coz i will need that down stream ..can you tell me how can i do that .. I mean in local env or in header somewhere in JCN..


You've already asked that question here. You're not going to get different advice asking the same question twice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gagan.maverick
PostPosted: Wed May 06, 2015 1:27 am    Post subject: Reply with quote

Acolyte

Joined: 30 Sep 2014
Posts: 50

Hi,
After unzipping of the files , the fresh problem which have started arriving is that in xml messages ....<?xml version="1.0" encoding="ISO-8859-1"?> when it comes out of JCN i can see that after converting it from HEX to ascii it has <?xml version="1.0" encoding="ISO-8859-1"?>?? like this in start and at the end ??. because of this i am getting xml parsing errors.
Back to top
View user's profile Send private message
gagan.maverick
PostPosted: Wed May 06, 2015 1:31 am    Post subject: Reply with quote

Acolyte

Joined: 30 Sep 2014
Posts: 50

And yes if it's a huge xml invoice message then some the tags in the xml gets missing for ex <Article_name>hdhdhd</Article_name> should be there but in output i am seeing /Article_name> "<" is missing..
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed May 06, 2015 2:27 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>


What do you think is wrong with this?

If the data in the XML that follows is not covered in the character set ISO-8859-1 (ISO Latin-1) there is your problem.***

THE SENDER need to change their message to something like
Code:

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


*** ISO-8859-1 does not contain the Euro symbol amongst other characters
Google for ISO-8859-1 and ISO-8859-15 and see the differences.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 06, 2015 4:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

gagan.maverick wrote:
thanks..
customer file is giving--- PKPKLg3E
after extracting the file is giving -- PKLg3Eßû‘é


so what do you sugest... Thanks once again

The change in characters here suggests to me that you are using a BLOB (not changing the contents) but on the output you are changing the CCSID.

This will corrupt the text content as it might/will be interpreted with a different character set than the original one. Another possibility is that the original CCSID of the incoming message is just plain wrong...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Unzip using JCN
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.