| Author | 
		  Message
		 | 
		
		  | mqbrkrs | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 8:53 am    Post subject: MRM and a XML message with a CData section | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 16 Oct 2006 Posts: 3 Location: The Netherlands 
  | 
		  
		    
			  
				Hi,
 
 
I want to use the MRM to generate XML messages with a CData section.
 
I have read many topics about the subject, but there is no real answer to if it can be done or not.
 
 
 
Using:
 
 
SET OutputRoot.XML.SomeField.(XML.CDataSection) = .....
 
 
does the trick if you use the XML parser.
 
 
 
But what if you want to use the MRM parser?
 
 
Thanks, | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | madi | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 11:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Chevalier
 
 Joined: 17 Jan 2006 Posts: 475
  
  | 
		  
		    
			  
				i guess you would have to define an element in your msg def file to contain CDATA and then assign to it
 
 
just a thought
 
 
--madi | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 12:32 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				Sorry - it's a known requirement, but you cannot do this today.
 
Depending on your requirements, you might want to encode it as base64 instead of using a CDATA section. The MRM domain will do the base64 encoding for you as long as you define the field as xs:binary and set the Encoding property to base64. You will have to supply binary data in the message tree, which will probably mean a CAST from CHARACTER to BLOB before you write.
 
I suppose I should ask - why is it important to use the MRM domain to write this message? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqbrkrs | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 1:51 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 16 Oct 2006 Posts: 3 Location: The Netherlands 
  | 
		  
		    
			  
				A business partner writes the XML schemas for the SOAP messages we use to communicate. 
 
To make sure that the messages are correct I import the messages in the toolkit and use the created messageset to validate and translate the outgoing messages. Works fine but now they want a message containing
 
a CData section.
 
 
I tried a couple of options, but failed.
 
 
And now that you confirm that it doesn't work,  I will code the missing CData part  in ESQL.
 
 
Thanks for your quick response. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 3:41 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Hey ... kimbert...
 
 
What happens if you insert the literal value '<![CDATA['||<data>||']]]>'... into an MRM-XML element? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqbrkrs | 
		  
		    
			  
				 Posted: Mon Oct 16, 2006 10:27 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 16 Oct 2006 Posts: 3 Location: The Netherlands 
  | 
		  
		    
			  
				| It will be parsed as '<........>' and that is not what you want in the XML message. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |