| Author | 
		  Message
		 | 
		
		  | pcelari | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 6:38 am    Post subject: difficulty with fieldname(InputBody.*[<] | 
				     | 
			   
			 
		   | 
		
		
		   Chevalier
 
 Joined: 31 Mar 2006 Posts: 411 Location: New York 
  | 
		  
		    
			  
				Hello,
 
 
I use the following code to create and populate A field at run-time. But the variable nodeName doesn't even get assigned anything. Input is in XML domain.
 
 
What am I missing???
 
 
declare nodeName character;
 
		
 
set nodeName = fieldname(InputBody.*[<]);
 
		
 
create field OutputLocalEnvironment.Variables.{nodeName};
 
		
 
set OutputLocalEnvironment.Variables.{nodeName} = InputBody.*[<];
 
 
 
   _________________ pcelari
 
-----------------------------------------
 
- a master of always being a newbie | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 6:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	Input is in XML domain.
 
 
What am I missing???  | 
   
 
This is far too easy...
 
You are missing IBM's very clear advice not to use the XML domain in new message flows   
 
 
As to your question, I suggest you take a user trace and look at where it goes wrong. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pcelari | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 7:03 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Chevalier
 
 Joined: 31 Mar 2006 Posts: 411 Location: New York 
  | 
		  
		    
			  
				I'm aware of that. But this is an old msgflow, expanded to take dynamic response - whatever name they may bear.
 
 
Also, I don't think the problem is related to XML.
 
 
thanks for the advice. _________________ pcelari
 
-----------------------------------------
 
- a master of always being a newbie | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 7:44 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				OK - apologies for assuming that it was a new flow. 
 
It's worth noting that converting to XMLNS is very easy - should be just a search-and-replace task. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | pcelari | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 7:49 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Chevalier
 
 Joined: 31 Mar 2006 Posts: 411 Location: New York 
  | 
		  
		    
			  
				SOLVED.  The following works, yet don't know why the other one didn't.
 
 
declare nodeName character; 
 
 
set nodeName = fieldname(InputBody.*); 
 
 
create field OutputLocalEnvironment.Variables.{nodeName}; 
 
 
set OutputLocalEnvironment.Variables.{nodeName} = InputBody.*;
 
 
   _________________ pcelari
 
-----------------------------------------
 
- a master of always being a newbie | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Fri Oct 03, 2008 10:37 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				You may have wanted 
 
    InputBody.[<]
 
instead of
 
    InputBody.*[<]
 
 
(Unless kimbert tells me I'm confused again, and obviously know nothing about Broker) | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |