| Author | Message | 
		
		  | bijesh | 
			  
				|  Posted: Mon Mar 05, 2007 10:22 pm    Post subject: BITSTREAM to CHARACTER?? |   |  | 
		
		  | Acolyte
 
 
 Joined: 30 Jan 2007Posts: 66
 
 
 | 
			  
				| Hi, 
 I've an MRM that contains certain element that are delimitted by comma.
 My input message is an XML that contains a request and a response.
 
 eg:
 <xml>
 <message>
 <request>
 ...
 </request>
 <response>
 ...
 </response>
 </message>
 </xml>
 
 the requirement is ,
 I want to write the InputRoot.xml.message.request and InputRoot.xml.message.response to two fields in the MRM.
 
 The MRM is like,
 
 Description,
 Request,
 Response,
 Terminator.
 
 I've tried using ASBITSTREAM on InputRoot.xml.message.request. But I'm not able to get it .
 
 My reqmt is OutputRoot.MRM.Request=InputRoot.XML.message.request;
 
 Any thoughts to share?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | AkankshA | 
			  
				|  Posted: Tue Mar 06, 2007 2:31 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 12 Jan 2006Posts: 1494
 Location: Singapore
 
 | 
			  
				| ASBISTREAM should have worked for it 
 What error are u facing with ASBITSTREAM???
 
 
 
 pls paste the excpetion details
 _________________
 Cheers
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | vsr | 
			  
				|  Posted: Tue Mar 06, 2007 10:56 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 04 Apr 2006Posts: 104
 
 
 | 
			  
				| Place a trace node after the compute node and paste the trance here. 
 As your message set is comma delimited create a string variable with comma as the delimiter , for example
 
 
   
	| Code: |  
	| myString = InputRoot.XMLNS.message.request+','+
 InputRoot.XMLNS.message.response+',+
 InputRoot.XMLNS.message.Terminator ;
 
 |  and then parse myString using either ASBITSTREAM or RCD node...if you have to parse it within the flow ..
 
 May be this should work , but no guarantees !
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | jefflowrey | 
			  
				|  Posted: Tue Mar 06, 2007 11:47 am    Post subject: |   |  | 
		
		  | Grand Poobah
 
 
 Joined: 16 Oct 2002Posts: 19981
 
 
 | 
			  
				| Neither ASBITSTREAM nor ResetContentDescriptor do any parsing at all. 
 In fact, ASBITSTREAM does the opposite of parsing.
 
 RCD merely marks data so that it can be parsed.
 _________________
 I am *not* the model of the modern major general.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bijesh | 
			  
				|  Posted: Tue Mar 06, 2007 10:49 pm    Post subject: |   |  | 
		
		  | Acolyte
 
 
 Joined: 30 Jan 2007Posts: 66
 
 
 | 
			  
				| Hi, 
 Sorry for the delay in reply.
 
 In fact I'm not getting any exception as such while using ASBITSTREAM.
 the thing is if I use ASBITSTREAM on InputRoot.XML.Message.Request,
 then the result I'm getting is X'3c436f6d70616e79436f64653e54415246393c2f436f6d70616e79436f64653e'.
 
 How can I get this back in Characters?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Wed Mar 07, 2007 1:11 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| So you want to convert an XML message into a delimited message? In that case you don't need ASBITSTREAM. You need to - map your input tree to your output tree ( using mapping node or ESQL ),
 - set the domain, message set, message type and message format for the output tree.
 
 
 
  Please stop using the XML domain. Use XMLNSC ( but make sure you are on the latest runtime fix pack ). 
	| Quote: |  
	| InputRoot.XML.message.request |  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | bijesh | 
			  
				|  Posted: Wed Mar 07, 2007 1:45 am    Post subject: |   |  | 
		
		  | Acolyte
 
 
 Joined: 30 Jan 2007Posts: 66
 
 
 | 
			  
				| 
   
	| kimbert wrote: |  
	| So you want to convert an XML message into a delimited message? In that case you don't need ASBITSTREAM. You need to - map your input tree to your output tree ( using mapping node or ESQL ),
 - set the domain, message set, message type and message format for the output tree.
 
 |  
 I've already tried this.
 
 Like OutputRoot.MRM.Payload.Request=InputRoot.XML.Message.Request
 
 Its getting written, but while writing to the queue using MQOutput node, it throws an exception like "Invalid Dictionary Context".
 
 Request is an element in Payload group in the message set which is basically of TDS format.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kimbert | 
			  
				|  Posted: Wed Mar 07, 2007 4:57 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| 
  Your output message tree does not match your message definition. Put a Trace node just before the MQOutput node and trace ${Root}. Look at the output and check off each element against the corresponding element in the message definition. 
	| Quote: |  
	| Its getting written, but while writing to the queue using MQOutput node, it throws an exception like "Invalid Dictionary Context". |  By the way, this problem might go away if you use XMLNSC instead of XML - because XMLNSC builds a message tree which is quite similar to the ones which the MRM domain uses.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |