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 » extract copybbok from XML element

Post new topic  Reply to topic
 extract copybbok from XML element « View previous topic :: View next topic » 
Author Message
alefrasca
PostPosted: Wed Jul 12, 2006 2:11 am    Post subject: extract copybbok from XML element Reply with quote

Newbie

Joined: 28 Feb 2006
Posts: 4

Hi all,
using IBM MB version 5, I need to extract from an XML file with namespaces an element that contains a copybook.
In the flow, first I have correctly extracted and copy in the environment the field using the XMLNS domain, and then I make a reset content descriptor of the domain because in version 5 the FolderBitStream option works only in XML domain.
The application that produce the XML file is a java application and people responsible of the creation of the XML file say that they are able to insert the copybook in the XML file only converting it in a xsd:base64Binary type. In this way I have tried to extract the copybook without success
Then I made a test: using an XML editor I have inserted the copybook as xsd:Binary in the ESQL (now it is readable) and I had a strange behavior:
The classical code passing the environment variable converted with ASBITSTREAM function doesn’t work, while if I parse directly the variable it does.
CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet = 'G3OOQVC002001';

SET OutputRoot.Properties.MessageType = 'msg_CWIMPS';
SET OutputRoot.Properties.MessageFormat = 'CWF1';


DECLARE inCCSID INT InputProperties.CodedCharSetId;
DECLARE inEncoding INT InputProperties.Encoding;
DECLARE option INTEGER BITOR (RootBitStream, ValidateNone, ValidateDeferred, ValidateLocalError);
DECLARE option1 INTEGER BITOR (FolderBitStream, ValidateNone, ValidateDeferred, ValidateLocalError);
DECLARE creationPtr REFERENCE TO OutputRoot;
DECLARE inBitStream BLOB ASBITSTREAM(Environment.Variables.datoInputFunzioneMC OPTIONS FolderBitStream);
DECLARE i INTEGER;
SET i = LENGTH(inBitStream);
CREATE LASTCHILD OF creationPtr DOMAIN('MRM')
PARSE(Environment.Variables.datoInputFunzioneMC --> with inBitStream doesn’t work
OPTIONS option
ENCODING inEncoding
CCSID inCCSID
SET OutputRoot.Properties.MessageSet
TYPE OutputRoot.Properties.MessageType
FORMAT OutputRoot.Properties.MessageFormat
);

My questions are:
1) Is it true that the unique way is use the xsd:base64Binary type to insert the copybook in the XML element? Or does anybody know other way in java?
2) If the xsd:base64Binary is right how can I parse it?
3) Why my example works only passing directly the environment variable because it is a xsd:Binary?

Thank you very much
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Wed Jul 12, 2006 4:38 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

In principle, a Java application should be able to encode a binary element as xs:Binary. But maybe your colleagues are using a library which is not under their control.
Anyway, you can parse xs:base64 ( or xs:Binary ) using the MRM XML format. The MRM parser will automatically convert the base64 data to a BLOB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » extract copybbok from XML element
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.