| Author | 
		  Message
		 | 
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 9:19 am    Post subject: Recognize a especific tag of XML in Filter Node | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Hi!
 
 
I´m trying to recognize, using esql, a specific tag of one XML input message inside a filter node, but I can´t. Someone could tell me where I can look for an example of this, please?
 
 
Thanks a lot. _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | special_agent_Queue | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 9:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Centurion
 
 Joined: 27 Jul 2006 Posts: 102
  
  | 
		  
		    
			  
				Well, what have you tried?
 
Do you know where this tag lies in the XML?
 
Getting to a tag in a filter node is similar to a compute node.  But not exactly the same.
 
I'm sure you can find what you need if you look at the infocenter/help that came with the toolkit. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:09 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Hi!
 
 
Thanks for the information.
 
 
I´m doing:
 
 
CREATE FILTER MODULE Recupera_Mensaje_SBL_Filter
 
	CREATE FUNCTION Main() RETURNS BOOLEAN
 
	BEGIN
 
		RETURN (Body.*[1] = 'siebel-xmlext-fields-req');
 
	END;
 
END MODULE;
 
 
But It isn´t run. _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:10 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi r4lukk4,
 
 
Can we see the sample input message to this filter node...
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				The input message is:
 
 
(
 
  (0x01000000):Properties = (
 
    (0x03000000):MessageSet      = ''
 
    (0x03000000):MessageType     = ''
 
    (0x03000000):MessageFormat   = ''
 
    (0x03000000):Encoding        = 546
 
    (0x03000000):CodedCharSetId  = 1208
 
    (0x03000000):Transactional   = TRUE
 
    (0x03000000):Persistence     = FALSE
 
    (0x03000000):CreationTime    = GMTTIMESTAMP '2006-12-20 01:11:47.290'
 
    (0x03000000):ExpirationTime  = -1
 
    (0x03000000):Priority        = 0
 
    (0x03000000):ReplyIdentifier = X'414d5120424c53424b443030202020205b7582452001a205'
 
    (0x03000000):ReplyProtocol   = 'MQ'
 
    (0x03000000):Topic           = NULL
 
    (0x03000000):ContentType     = ''
 
    (0x03000000):Topic           = NULL
 
  )
 
  (0x01000000):MQMD       = (
 
    (0x03000000):SourceQueue      = 'BLBRKD00.SBL.XML.Q04'
 
    (0x03000000):Transactional    = TRUE
 
    (0x03000000):Encoding         = 546
 
    (0x03000000):CodedCharSetId   = 1208
 
    (0x03000000):Format           = 'MQSTR   '
 
    (0x03000000):Version          = 2
 
    (0x03000000):Report           = 56623107
 
    (0x03000000):MsgType          = 1
 
    (0x03000000):Expiry           = -1
 
    (0x03000000):Feedback         = 0
 
    (0x03000000):Priority         = 0
 
    (0x03000000):Persistence      = 0
 
    (0x03000000):MsgId            = X'414d5120424c53424b443030202020205b7582452001a205'
 
    (0x03000000):CorrelId         = X'414d5120424c53424b443030202020205b7582452001a205'
 
    (0x03000000):BackoutCount     = 0
 
    (0x03000000):ReplyToQ         = 'BLSBKD00.SBL.XML.Q05                            '
 
    (0x03000000):ReplyToQMgr      = 'BLSBKD00                                        '
 
    (0x03000000):UserIdentifier   = 'brasvc      '
 
    (0x03000000):AccountingToken  = X'16010515000000c09dc66bed09306cbff2e452eb03000000000000000000000b'
 
    (0x03000000):ApplIdentityData = '                                '
 
    (0x03000000):PutApplType      = 11
 
    (0x03000000):PutApplName      = '\siebsrvr\bin\siebmtshmw.exe'
 
    (0x03000000):PutDate          = DATE '2006-12-20'
 
    (0x03000000):PutTime          = GMTTIME '01:11:47.290'
 
    (0x03000000):ApplOriginData   = '    '
 
    (0x03000000):GroupId          = X'000000000000000000000000000000000000000000000000'
 
    (0x03000000):MsgSeqNumber     = 1
 
    (0x03000000):Offset           = 0
 
    (0x03000000):MsgFlags         = 0
 
    (0x03000000):OriginalLength   = -1
 
  )
 
  (0x01000010):XML        = (
 
    (0x01000000):siebel-xmlext-fields-req = (
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Periodo Referencia'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Data Emissao'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Data Vencimento'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Consumo'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Status Fatura'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Tipo Leitura'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Consumo Real'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Data Apresentacao'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Data Pagamento'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Forma Pagamento'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Atualizado Em'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Atualizado Por'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Fator Correcao'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Data Identificacao Pagamento'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Pagamento Duplicidade'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Situacao Divida'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Fatura Interdicao'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Motivo Interdicao'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Interditado Por'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Interditado Em'
 
      )
 
      (0x01000000):support = (
 
        (0x03000000):field = 'CEG Consumo LECOTP'
 
      )
 
    )
 
  )
 
) _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi r4lukk4,
 
 
Use FIELDNAME, something like below
 
   
	| Code: | 
   
  
	| RETURN FIELDNAME(Body.*[1]) = 'siebel-xmlext-fields-req'; | 
   
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:32 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Thanks a lot elvis_gn!
 
 
I´ll try it now    _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				It´s not run...    _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 10:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi r4lukk4,
 
 
Can u paste the xml message please...does it contain namespaces ?
 
 
Can u try storing the output of FIELDNAME(Body.*[1]) to a variable and see what the outcome is...using the debugger...
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 11:16 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Ok, elvis_gn.
 
 
I tested again, and the result for "FIELDNAME(Body.*[1]) " was "siebel-xmlext-fields-req".
 
 
I don´t know what´s happen with my code? _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 11:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi r4lukk4,
 
 
Copy paste your exact code and ur exact sample message.
 
 
Also, why do u say its not working ? Where is the message going ?
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 11:53 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Hi elvis_gn,
 
 
The message is going to the DLQ queue.
 
 
My code is: 
 
CREATE FILTER MODULE Recupera_Mensaje_SBL_Filter
 
    CREATE FUNCTION Main() RETURNS BOOLEAN
 
    BEGIN
 
        RETURN FIELDNAME(Body.*[1]) = 'siebel-xmlext-fields-req'; 
 
    END;
 
END MODULE;
 
 
And the file:
 
<siebel-xmlext-fields-req><support field="CEG Periodo Referencia" /><support field="CEG Data Emissao"/><support field="CEG Data Vencimento" /><support field="CEG Consumo" /><support field="CEG Status Fatura" /><support field="CEG Tipo Leitura" /><support field="CEG Consumo Real" /><support field="CEG Data Apresentacao" /><support field="CEG Data Pagamento" /><support field="CEG Forma Pagamento" /><support field="CEG Atualizado Em" /><support field="CEG Atualizado Por" /><support field="CEG Fator Correcao" /><support field="CEG Data Identificacao Pagamento" /></siebel-xmlext-fields-req>
 
 
Thanks for your help. _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | elvis_gn | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 12:36 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 08 Oct 2004 Posts: 1905 Location: Dubai 
  | 
		  
		    
			  
				Hi r4lukk4,
 
 
The current code with the sample is working on my system...I think some of your settings must be wrong...Have u specified domain in the input node as XML ?
 
 
Use the debugger to find out the exact error thrown and its location, I doubt it is from the filter node.
 
 
Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | r4lukk4 | 
		  
		    
			  
				 Posted: Wed Dec 20, 2006 12:43 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 29 Nov 2006 Posts: 20
  
  | 
		  
		    
			  
				Thanks elvis_gn!
 
 
I´ll check all and debbuger...
 
 
I´ll report you if I´ll get it    _________________ R4lukk4 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |