|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  Retrieving a Delivery queue message | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | brokerics | 
		  
		    
			  
				 Posted: Wed Dec 21, 2005 2:56 am    Post subject: Retrieving a Delivery queue message | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 30 Oct 2005 Posts: 45
  
  | 
		  
		    
			  
				hey guys
 
 
im tryin to retrieve certain elements of a message which ive got on the delivery queue using ESQL
 
 
this is the msg:
 
 
<<mcd><Msd>xml</Msd><Type>EMPL</Type><Fmt>CwXML</Fmt></mcd> 
 
<jms><Dst>queue:///JDBC_X/DELIVERYQUEUE</Dst><Tms>1135162337190</Tms><Dlv>2</Dlv></jms> 
 
<usr><WSDLBinding>EMPLAgentDeliveryBinding</WSDLBinding><WSDLOperation>EMPLCreate</WSDLOperation><PrivacyLevel>None</PrivacyLevel><MessageType>EMPL</MessageType></usr> <?xml version="1.0" encoding="UTF-8"?>
 
<Q1:EMPL
 
xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/EMPL" version="3.0.0" verb="Create" locale="en_US" delta="false">
 
<Q1:NAME>barrett</Q1:NAME>
 
<Q1:EID>85A</Q1:EID>
 
<Q1:PAY>85000</Q1:PAY>
 
<Q1:ObjectEventId>JDBC_X_119XWORLDS_EVENTS20051221162214.756001</Q1:ObjectEventId>
 
</Q1:EMPL>
 
 
 
i tried this
 
 
 
SET OutputRoot = InputRoot;
 
SET OutputRoot.XML."Q1:EXEC" = OutputRoot.XML."Q1:EMPL";
 
SET OutputRoot.XML."Q1:EMPL" = NULL;
 
		
 
IF (InputRoot.XML."Q1:EMPL"."Q1:PAY") > 50000 		THEN
 
			
 
SET OutputRoot.XML."Q1:EXEC"."Q1:NAME" = UPPER('SAMPLE NAME');
 
 
SET OutputRoot.XML."Q1:EXEC".COMMENTS= UPPER('SENIOR');
 
 
END IF
 
 
 
but an exception is being thrown : no valid body of data found(XML)
 
 
are there any more ive to include in the msg to make a well formed msg? | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | jsware | 
		  
		    
			  
				 Posted: Wed Dec 21, 2005 5:02 am    Post subject: Re: Retrieving a Delivery queue message | 
				     | 
			   
			 
		   | 
		 
		
		    Chevalier
 
 Joined: 17 May 2001 Posts: 455
  
  | 
		  
		    
			  
				Is this the complete data portion of the MQ message or is there an MQRFH2 header preceeding this?
 
   
	| brokerics wrote: | 
   
  
	<<mcd><Msd>xml</Msd><Type>EMPL</Type><Fmt>CwXML</Fmt></mcd> 
 
<jms><Dst>queue:///JDBC_X/DELIVERYQUEUE</Dst><Tms>1135162337190</Tms><Dlv>2</Dlv></jms> 
 
<usr><WSDLBinding>EMPLAgentDeliveryBinding</WSDLBinding><WSDLOperation>EMPLCreate</WSDLOperation><PrivacyLevel>None</PrivacyLevel><MessageType>EMPL</MessageType></usr> | 
   
 
 
This section looks like the XML portion of an RFH2 header.  However it does start with a double << which makes it invalid XML.  Also if you don't have an RFH2 header preceeding that, the broker's XML parser is going to throw because you don't have a well formed XML message.
 
 
   
	| brokerics wrote: | 
   
  
	<?xml version="1.0" encoding="UTF-8"?>
 
<Q1:EMPL
 
xmlns:Q1="http://www.ibm.com/websphere/crossworlds/2002/BOSchema/EMPL" version="3.0.0" verb="Create" locale="en_US" delta="false">
 
<Q1:NAME>barrett</Q1:NAME>
 
<Q1:EID>85A</Q1:EID>
 
<Q1:PAY>85000</Q1:PAY>
 
<Q1:ObjectEventId>JDBC_X_119XWORLDS_EVENTS20051221162214.756001</Q1:ObjectEventId>
 
</Q1:EMPL> | 
   
 
 
 
This section is using XML namespaces, and I am not sure whether the plain old XML parser in the broker can handle this.  If you have WBIMB v5 then you could try using the XMLNS parser (InputRoot.XMLNS.whatever) to parse the message properly. _________________ Regards
 
John
 
The pain of low quaility far outlasts the joy of low price. | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | alexey | 
		  
		    
			  
				 Posted: Thu Dec 22, 2005 12:45 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		    Acolyte
 
 Joined: 18 Dec 2003 Posts: 62 Location: Israel 
  | 
		  
		    
			  
				Hi
 
1. It seems like you have a message in RFH2 format, including a RFH2 header with mcd tag - it means the flow will parse the message as MRM, regardless of what you've put in your MQInput Defaults.
 
The message also looks like a WBI Adapter BO, so you probably have an XSD file of this BO, just import it into a message set and work with MRM parser. After a parsing you can convert to XML.
 
 
2. You can't use namespaces literally in element names, thing like InputRoot.XML."Q1:EMPL" could not work. You should read about XMLNS domain in help, http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ac17330_.htm
 
and always separate namespace from the tag name, like "Q1":"EMPL". | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | brokerics | 
		  
		    
			  
				 Posted: Thu Dec 22, 2005 3:50 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 30 Oct 2005 Posts: 45
  
  | 
		  
		    
			  
				thanks guys
 
 
i did use the BO xsd to import it into message set and mapped it to the output set...converted it into the output domain(XML)..it worked.
 
 
but theres a small problem after that
 
 
heres the trace content of the jdbc connector 
 
[Time: 2005/12/22 15:58:53.804] [System: ConnectorAgent] [SS: JDBC_X] [Thread: a
 
ppPolling (#702053529)] [Type: Trace] [Mesg: :checkStatus]
 
[Time: 2005/12/22 15:58:53.985] [System: ConnectorAgent] [SS: JDBC_X] [Thread: J
 
DBC_X/REQUESTQUEUEJmsThreadPool.thread1 (#702299289)] [Type: Trace] [Mesg: :Rece
 
iver.processMsg(msg) received message:
 
JMS Message class: jms_text
 
  JMSType:         mcd://xml/TRIGSET/EXEC?format=CwXML
 
  JMSDeliveryMode: 2
 
  JMSExpiration:   0
 
  JMSPriority:     4
 
  JMSMessageID:    ID:414d5120545249422020202020202020783faa432000112e
 
  JMSTimestamp:    1135247328730
 
  JMSCorrelationID:null
 
  JMSDestination:  queue:///JDBC_X/DELIVERYQUEUE
 
  JMSReplyTo:      null
 
  JMSRedelivered:  false
 
  JMSXDeliveryCount:1
 
  JMS_IBM_MsgType:8
 
  JMSXAppID:ters\AdapterJRE\bin\java.exe
 
  JMS_IBM_Format:MQSTR
 
  PrivacyLevel:None
 
  JMS_IBM_PutApplType:11
 
  WSDLBinding:EMPLAgentDeliveryBinding
 
  JMSXUserID:EAIUSER
 
  WSDLOperation:EMPLCreate
 
  MessageType:EMPL
 
  JMS_IBM_PutTime:10284875
 
  JMS_IBM_PutDate:20051222
 
<EXEC><version>3.0.0</version><delta>FALSE</delta><locale>en_US</locale><verb>Cr
 
eate</verb><NS1:NAME
 
Another 190 character(s) omitted]
 
[Time: 2005/12/22 15:58:54.005] [System: ConnectorAgent] [SS: JDBC_X] [Thread: J
 
DBC_X/REQUESTQUEUEJmsThreadPool.thread1 (#702299289)] [Type: Trace] [Mesg: :Conv
 
erting the Bomo to String -- <EXEC><version>3.0.0</version><delta>FALSE</delta><
 
locale>en_US</locale><verb>Create</verb><NS1:NAME xmlns:NS1="http://www.ibm.com/
 
websphere/crossworlds/2002/BOSchema/EXEC">boris</NS1:NAME><NS2:EID xmlns:NS2="ht
 
tp://www.ibm.com/websphere/crossworlds/2002/BOSchema/EXEC">207</NS2:EID></EXEC>]
 
 
[Time: 2005/12/22 15:58:54.035] [System: Server] [Thread: JDBC_X/REQUESTQUEUEJms
 
ThreadPool.thread1 (#702299289)] [Type: Error] [MsgID: 0] [Mesg: String index ou
 
t of range: -1]
 
[Time: 2005/12/22 15:58:54.035] [System: ConnectorAgent] [SS: JDBC_X] [Thread: J
 
DBC_X/REQUESTQUEUEJmsThreadPool.thread1 (#702299289)] [Type: Error] [MsgID: 9068
 
] [Mesg: The received message cannot be converted to BO Message. The message is
 
not valid and is NOT processed. The response will be sent to the ReplyToQueue if
 
 it is set. Otherwise, the message will be sent to the fault queue. Message ID:
 
ID:414d5120545249422020202020202020783faa432000112e]
 
[Time: 2005/12/22 15:58:54.035] [System: ConnectorAgent] [SS: JDBC_X] [Thread: J
 
DBC_X/REQUESTQUEUEJmsThreadPool.thread1 (#702299289)] [Type: Trace] [Mesg: :Send
 
ing fault message:
 
JMS Message class: jms_text
 
  JMSType:         mcd://xml/TRIGSET/EXEC?format=CwXML
 
  JMSDeliveryMode: 2
 
  JMSExpiration:   0
 
  JMSPriority:     4
 
  JMSMessageID:    ID:414d5120545249422020202020202020783faa432000112e
 
  JMSTimestamp:    1135247328730
 
  JMSCorrelationID:null
 
  JMSDestination:  queue:///JDBC_X/DELIVERYQUEUE
 
  JMSReplyTo:      null
 
  JMSRedelivered:  false
 
  status:-1
 
  PrivacyLevel:None
 
  WSDLBinding:EMPLAgentDeliveryBinding
 
  resubmitTo:null
 
  description:The received message cannot be converted to BO. The message is not
 
 valid.
 
  WSDLOperation:EMPLCreate
 
  keys:null
 
  MessageType:EMPL
 
<null>]
 
 
 
i think the xml output is not in the standard schema that the BO supports, is it that? if so, what should i do? | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | 
		    
		   | 
		 
	   
	 | 
   
 
  
	     | 
	 | 
	Page 1 of 1 | 
   
 
 
 
  
  	
	  
		
		  
 
  | 
		  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |