| Author | 
		  Message
		 | 
		
		  | amrit | 
		  
		    
			  
				 Posted: Tue Oct 31, 2017 7:16 am    Post subject: CREATE MOCK SERVICE WITH FLAT FILE IN RESPONSE | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 24 Oct 2017 Posts: 5
  
  | 
		  
		    
			  
				Hello Users, I need to build a message flow where I am supposed to trigger a message(which is combination of numbers and alphabets simply a Id no) to a URL through HTTP request node and get a flat file in response(EDI Data). I have coded and I want to test whether my flow is working. For this i need to create a mock service and construct a flat file. MY QUESTION IS HOW I CAN CONSTRUCT THE RESPONSE.  Any proper code to write flat files(EDI data) so that I can get that as response and make sure my flow is working.
 
 
please provide some solution.
 
 
Thanks
  Last edited by amrit on Tue Oct 31, 2017 11:57 pm; edited 1 time in total | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | exerk | 
		  
		    
			  
				 Posted: Tue Oct 31, 2017 7:38 am    Post subject: Re: CREATE MOCK SERVICE WITH FLAT FILE IN RESPONSE | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 02 Nov 2006 Posts: 6339
  
  | 
		  
		    
			  
				
   
	| amrit wrote: | 
   
  
	please provide some solution.
 
 
Thanks | 
   
 
 
Please post in the correct forum    .
 
 
Thanks
 
 
Moving it to the Broker forum... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Nov 02, 2017 8:56 am    Post subject: Re: CREATE MOCK SERVICE WITH FLAT FILE IN RESPONSE | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| amrit wrote: | 
   
  
	| please provide some solution. | 
   
 
 
 
Write some code. Proper code (as you indicate) is best.
 
 
Seriously.
 
 
You want a mock service that returns EDI data? Write a harness round whatever the Prod system is using to create the real EDI data. 
 
 
Done. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | amrit | 
		  
		    
			  
				 Posted: Thu Nov 02, 2017 10:22 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 24 Oct 2017 Posts: 5
  
  | 
		  
		    
			  
				Hi Avatar,
 
 
 
as per my requirement I want (EDI_DC40 000000 file) some thing like this in my response. For implementation of this I have used a HTTP input node followed by compute node and HTTP reply node.
 
 
SET OutputRoot = 'EDI_DC40 000000 file'; This I have used in my compute node, but I am getting a blank response. I tried Soap UI to test my mock service.
 
 
Kindly suggest If I am wrong in my concept or code.
 
And reply If you need any more information.
 
 
Thanks for giving your precious time and reply.
 
Thank you | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Fri Nov 03, 2017 4:48 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| amrit wrote: | 
   
  
	| Kindly suggest If I am wrong in my concept or code. | 
   
 
 
 
The concept's ok, but doing EDI structure longhand will be a problem for you as complexity increases.
 
 
Your code is way off. Way, way off. The most obvious problem is a lack of parser domain, which is way you're getting a blank response. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Fri Nov 03, 2017 6:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				
   
	| amrit wrote: | 
   
  
	Hi Avatar,
 
 
 
as per my requirement I want (EDI_DC40 000000 file) some thing like this in my response. For implementation of this I have used a HTTP input node followed by compute node and HTTP reply node.
 
 
SET OutputRoot = 'EDI_DC40 000000 file'; This I have used in my compute node, but I am getting a blank response. I tried Soap UI to test my mock service.
 
 
Kindly suggest If I am wrong in my concept or code.
 
And reply If you need any more information.
 
 
Thanks for giving your precious time and reply.
 
Thank you | 
   
 
 
 
You have no business loading an IDOC file. The file may be way too big for the whole file to be treated as a single transaction.
 
 
Now if you create one message per EDI_DC40, that might work.
 
You should be using a DFDL parser and parsing EDI_DC40 + EDI_DD40 (unlimited).
 
Also look into the SAP Adapter and IDOC handling... 
 
Have fun   _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |