| Author | 
		  Message
		 | 
		
		  | tecnologiai | 
		  
		    
			  
				 Posted: Fri May 28, 2004 12:13 am    Post subject: How trasfer files in a MQseries message? | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 28 May 2004 Posts: 4
  
  | 
		  
		    
			  
				| How trasfer files in/with a MQseries message? (Attach file to message) | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jed | 
		  
		    
			  
				 Posted: Fri May 28, 2004 12:23 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 08 Jan 2004 Posts: 118 Location: MI, USA 
  | 
		  
		    
			  
				well.... what programming language u going to use?
 
as per experience, C/C++ and Java can handle files and put in as a message in a queue. _________________ Jed | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tecnologiai | 
		  
		    
			  
				 Posted: Fri May 28, 2004 12:48 am    Post subject: Trasfer files in MQseries message | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 28 May 2004 Posts: 4
  
  | 
		  
		    
			  
				Hello, I use Java to send and read text messages, but now I need trasfer(atach) files in messages.
 
Do you speak spanish?
 
 
Thanks.
 
 
 
   
	| jesus_dino wrote: | 
   
  
	well.... what programming language u going to use?
 
as per experience, C/C++ and Java can handle files and put in as a message in a queue. | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jed | 
		  
		    
			  
				 Posted: Fri May 28, 2004 12:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 08 Jan 2004 Posts: 118 Location: MI, USA 
  | 
		  
		    
			  
				i think you should try to open the file like an input stream and use it to write and put into the queue.
 
 
i do speak spanish...... _________________ Jed | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tecnologiai | 
		  
		    
			  
				 Posted: Fri May 28, 2004 1:02 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 28 May 2004 Posts: 4
  
  | 
		  
		    
			  
				Yes I can do this, but the file have diferent formats (xml, txt, doc, pdf). Can I attach the file to message? Like a email witch attach files.
 
 
 
   
	| jesus_dino wrote: | 
   
  
	i think you should try to open the file like an input stream and use it to write and put into the queue.
 
 
i do speak spanish...... | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jed | 
		  
		    
			  
				 Posted: Fri May 28, 2004 1:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 08 Jan 2004 Posts: 118 Location: MI, USA 
  | 
		  
		    
			  
				nope, you cannot attach a file in a message.
 
you need to read the file byte by byte (or use the filestream of java) before you put it as a message in the queue.
 
and do the reverse when you want to read the message in the queue.
 
 
this will work on any type of file.....
 
i was able to do this using C/C++ and also JAVA.
 
read a file, put it into the queue and retrieve the message and re-construct the file. _________________ Jed | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tecnologiai | 
		  
		    
			  
				 Posted: Fri May 28, 2004 1:13 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 28 May 2004 Posts: 4
  
  | 
		  
		    
			  
				Thanks.
 
 
I do this, the message can be a text message?.
 
Dou you have any code in java?
 
 
 
   
	| jesus_dino wrote: | 
   
  
	nope, you cannot attach a file in a message.
 
you need to read the file byte by byte (or use the filestream of java) before you put it as a message in the queue.
 
and do the reverse when you want to read the message in the queue.
 
 
this will work on any type of file.....
 
i was able to do this using C/C++ and also JAVA.
 
read a file, put it into the queue and retrieve the message and re-construct the file. | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Fri May 28, 2004 3:51 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				You can read the file into the message and write it out again. There is also the option of "reference messages" where the queue manager will perform the file i/o for you at each end.
 
 
There are several software products which offer FTP over MQ, and I think some free MQ support pacs have a basic offering.
 
 
http://www.primeur.com/products/xsp/xsp.html | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |