ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMS app into MQInput

Post new topic  Reply to topic
 JMS app into MQInput « View previous topic :: View next topic » 
Author Message
goffinf
PostPosted: Wed Nov 25, 2009 5:06 am    Post subject: JMS app into MQInput Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Version: 6.1
Platform: Windows and AIX

I have an application that is sending a SOAP with Attchments message using JMS into an MQ queue that I have a flow connected to with an MQInpu node.

I have tried various setting for the MQInput parsing but can seem to receive the message succuessfully. There isn't any parsing error but the data doesn't appear in the message tree as I had expected.

When I set the MQInput parser to MIME I get a Message tree that shows the MIME parser but with a sibling of no name ?

BLOB obviously just shows a bunch of bytes.

JMSStream causes an XML parsing error.

I am clearly not understanding this sufficiently can anyone suggest what I am doing wrong. Below is what message look like sent from the app when reading them off a queue using RFHUtils.

Thanks

Fraser.

If I read the message off the queue that the app PUTs to using RFHUtils is looks like this :-

00000000 ..------=_Part_8_6789355.1259151
00000032 515578..Content-Type: text/xml;
00000064 charset=UTF-8..Content-Transfer-
00000096 Encoding: binary..Content-Id: <7
00000128 2311E1919A03C2403E568C05A1A3868>
00000160 ....<?xml version="1.0" encoding
00000192 ="UTF-8"?><soapenv:Envelope xmln
00000224 s:soapenv="http://schemas.xmlsoa
00000256 p.org/soap/envelope/" xmlns:xsd=
00000288 "http://www.w3.org/2001/XMLSchem
00000320 a" xmlns:xsi="http://www.w3.org/
00000352 2001/XMLSchema-instance"><soapen
00000384 v:Header><ec:ESBContext soapenv:
00000416 mustUnderstand="1" xmlns:ec="urn
00000448 :aviva:nu:services:schema:messag
00000480 e:common:nuiesbcontext:v01"><ec:
00000512 BusinessContextType>UNKNOWN</ec:
00000544 BusinessContextType><ec:Business
00000576 ContextInstanceId>uuid:a78a20a0-
00000608 d9bc-11de-8b4c-a16e881f3655</ec:
00000640 BusinessContextInstanceId><ec:Se
00000672 rviceRequestId>uuid:a78a20a0-d9b
00000704 c-11de-8b4d-a16e881f3655</ec:Ser
00000736 viceRequestId></ec:ESBContext></
00000768 soapenv:Header><soapenv:Body><fo
00000800 obarbaz>..<foo>foo</foo>..<bar>b
00000832 ar</bar>..<baz>baz</baz>.</fooba
00000864 rbaz></soapenv:Body></soapenv:En
00000896 velope>..------=_Part_8_6789355.
00000928 1259151515578..Content-Type: app
00000960 lication/octet-stream..Content-T
00000992 ransfer-Encoding: binary..Conten
00001024 t-Id: <D65BBC071A5A0876098667931
00001056 29FE518>..Content-Disposition: a
00001088 ttachment;filename=binary0....Th
00001120 is is an attachment..------=_Par
00001152 t_8_6789355.1259151515578--..

The usr folder has this :-

TargetJmsService(xsi:nil='true')=
contentType=multipart/related; type="text/xml"; start="<72311E1919A03C2403E568C05A1A3868>"; .boundary="----=_Part_8_6789355.1259151515578"

MQMD Format is : MQHRF2

RFH :-

Message domain : jms_bytes
Code Page: 1208
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 25, 2009 9:17 am    Post subject: Re: JMS app into MQInput Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

goffinf wrote:
When I set the MQInput parser to MIME I get a Message tree that shows the MIME parser but with a sibling of no name ?


Sounds a lot like I'd expect. You can parse the separate parts with the correct parser; SOAP with XMLNSC, the attachment with whatever's relevant.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
goffinf
PostPosted: Wed Nov 25, 2009 9:32 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Hi Victor,

this is a trace when I set the MQInput node to MIME. As you can see there is no data ?

I was expecting MIME/Parts/Part/BLOB ??


( ['MQROOT' : 0x7b11c68]
(0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0x2d3b390]
(0x03000000:NameValue):MessageSet = '' (CHARACTER)
(0x03000000:NameValue):MessageType = '' (CHARACTER)
(0x03000000:NameValue):MessageFormat = '' (CHARACTER)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Persistence = TRUE (BOOLEAN)
(0x03000000:NameValue):CreationTime = GMTTIMESTAMP '2009-11-25 17:23:19.750' (GMTTIMESTAMP)
(0x03000000:NameValue):ExpirationTime = -1 (INTEGER)
(0x03000000:NameValue):Priority = 4 (INTEGER)
(0x03000000:NameValue):ReplyIdentifier = X'757569643a33396333636536302d643965372d313164652d' (BLOB)
(0x03000000:NameValue):ReplyProtocol = 'MQ' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = 'text/xml; charset=UTF-8' (CHARACTER)
(0x03000000:NameValue):IdentitySourceType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceToken = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedType = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedToken = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
)
(0x01000000:Name):MQMD = ( ['MQHMD' : 0x6cabf90]
(0x03000000:NameValue):SourceQueue = 'AF_IN' (CHARACTER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 437 (INTEGER)
(0x03000000:NameValue):Format = 'MQHRF2 ' (CHARACTER)
(0x03000000:NameValue):Version = 2 (INTEGER)
(0x03000000:NameValue):Report = 0 (INTEGER)
(0x03000000:NameValue):MsgType = 8 (INTEGER)
(0x03000000:NameValue):Expiry = -1 (INTEGER)
(0x03000000:NameValue):Feedback = 0 (INTEGER)
(0x03000000:NameValue):Priority = 4 (INTEGER)
(0x03000000:NameValue):Persistence = 1 (INTEGER)
(0x03000000:NameValue):MsgId = X'414d51205742524b36315f44454641550c4e0d4b20004a03' (BLOB)
(0x03000000:NameValue):CorrelId = X'757569643a33396333636536302d643965372d313164652d' (BLOB)
(0x03000000:NameValue):BackoutCount = 1 (INTEGER)
(0x03000000:NameValue):ReplyToQ = ' ' (CHARACTER)
(0x03000000:NameValue):ReplyToQMgr = 'WBRK61_DEFAULT_QUEUE_MANAGER ' (CHARACTER)
(0x03000000:NameValue):UserIdentifier = 'MUSR_MQADMIN' (CHARACTER)
(0x03000000:NameValue):AccountingToken = X'160105150000003fad1462a9314340828ba628ed03000000000000000000000b' (BLOB)
(0x03000000:NameValue):ApplIdentityData = ' ' (CHARACTER)
(0x03000000:NameValue):PutApplType = 28 (INTEGER)
(0x03000000:NameValue):PutApplName = 'WebSphere MQ Client for Java' (CHARACTER)
(0x03000000:NameValue):PutDate = DATE '2009-11-25' (DATE)
(0x03000000:NameValue):PutTime = GMTTIME '17:23:19.750' (GMTTIME)
(0x03000000:NameValue):ApplOriginData = ' ' (CHARACTER)
(0x03000000:NameValue):GroupId = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):MsgSeqNumber = 1 (INTEGER)
(0x03000000:NameValue):Offset = 0 (INTEGER)
(0x03000000:NameValue):MsgFlags = 0 (INTEGER)
(0x03000000:NameValue):OriginalLength = -1 (INTEGER)
)
(0x01000000:Name):MQRFH2 = ( ['MQHRF2' : 0x7a1cc00]
(0x03000000:NameValue):Version = 2 (INTEGER)
(0x03000000:NameValue):Format = ' ' (CHARACTER)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 1208 (INTEGER)
(0x03000000:NameValue):Flags = 0 (INTEGER)
(0x03000000:NameValue):NameValueCCSID = 1208 (INTEGER)
(0x01000000:Name ):mcd = (
(0x01000000:Name):Msd = (
(0x02000000:Value): = 'jms_bytes' (CHARACTER)
)
)
(0x01000000:Name ):jms = (
(0x01000000:Name):Dst = (
(0x02000000:Value): = 'queue://WBRK61_DEFAULT_QUEUE_MANAGER/AF_IN' (CHARACTER)
)
(0x01000000:Name):Tms = (
(0x02000000:Value): = '1259169799750' (CHARACTER)
)
(0x01000000:Name):Cid = (
(0x02000000:Value): = 'uuid:39c3ce60-d9e7-11de-9e7e-ca81a739039a' (CHARACTER)
)
(0x01000000:Name):Dlv = (
(0x02000000:Value): = '2' (CHARACTER)
)
)
(0x01000000:Name ):usr = (
(0x01000000:Name):TargetJmsService = (
(0x03000000:NameValue):xsi:nil = 'true' (CHARACTER)
(0x02000000:Value ): = '' (CHARACTER)
)
(0x01000000:Name):contentType = (
(0x02000000:Value): = 'multipart/related; type="text/xml"; start="<C24DE786870D3423A588CF57C4E7D5C0>"; boundary="----=_Part_2_33276757.1259169799734"' (CHARACTER)
)
)
)
(0x01000000:Name):MIME =
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 25, 2009 10:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I was rather expecting that as well!

Are you convinced that's a valid MIME format message? By eye it looks ok but have you checked?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
goffinf
PostPosted: Wed Nov 25, 2009 10:16 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Convinced ... no .. but I can say that the application is using the AXIS2 implementation of SwA so it really ought to be. And as you said, by eye, it looks OK.

I noted acouple of things which probably don't matter, but just in case they trigger any other thoughts :-

If I create a multipart/related MIME SwA message in Broker it has an outer Content-Type header:-

Content-Type: multipart/related; boundary=MIME_Boundar
--MIME_Boundary
Content-Type: text/xml

whereas the JMS one starts with the MIME boundary. A quick read of the JMS spec does suggest that this is correct though and that header *does* appear in the usr folder.

The encoding value in the input is set as 273

Don't know it thats significant or not ?

Struggling

Fraser.
Back to top
View user's profile Send private message
goffinf
PostPosted: Wed Nov 25, 2009 10:23 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Ah, just found this. I'll give it a try and post back whether it helps :-


Error message BIP5651 is issued when receiving a SOAP with Attachments message from a WebSphere Application Server client
Scenario: When a WebSphere Application Server client sends a SOAP with Attachments message to the broker over JMS, error message BIP5651 is issued stating that no valid Content-Type header has been found.
Explanation: When a WebSphere Application Server client sends a SOAP with Attachments message to the broker over JMS, the MIME Content-Type value appears in the MQRFH2 header and not in the MIME message body.
Solution: To solve this problem, the Content-Type value needs to be copied from the MQRFH2 header to the beginning of the message as a MIME header before the message is parsed. The following ESQL adds the Content-Type value to the beginning of the WebSphere Application Server message and then invokes the MIME parser on the result.
create procedure parseWAS_JMS(IN InputMessage reference,IN OutputMessage reference)
/***********************************************************************
* convert a WAS/JMS message to the correct format for the MIME parser
***********************************************************************/
begin
-- get the data as a BLOB
declare body BLOB InputMessage.BLOB.BLOB;

-- get the Content-Type value from the RFH2 header. Content-Type is the only
-- header which is critical for the MIME parser, but the same approach can be
-- used for any MIME headers which have been stored under the RFH2 header.
declare contentType char InputMessage.MQRFH2.usr.contentType;

-- add the contentType to the bit stream as part of an RFC822 header block
set body = cast(('Content-Type: '||contentType) as blob ccsid 819)||x'0d0a0d0a'||body;

-- invoke MIME parser on the modified bit stream
CREATE LASTCHILD OF OutputMessage DOMAIN('MIME') PARSE(body);
end;
A message flow can take in the JMS message in the BLOB domain and then invoke the procedure above from a Compute node. The procedure can be called using the following ESQL from a Compute node:
CALL CopyMessageHeaders(); -- standard procedure to copy headers
CALL parseWAS_JMS(InputRoot, OutputRoot); -- parse the ‘body’ as MIME
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 25, 2009 10:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

goffinf wrote:
Explanation: When a WebSphere Application Server client sends a SOAP with Attachments message to the broker over JMS, the MIME Content-Type value appears in the MQRFH2 header and not in the MIME message body.


Now embarassingly I was wondering if that was right in your original post, but couldn't find any of the MIME stuff I was testing n months ago!

I should have the courage of my convictions.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
goffinf
PostPosted: Thu Nov 26, 2009 2:47 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Yep, that worked. The only thing I changed was :

ccsid 819

to

InputProperties.CodedCharSetId

Not sure if I'll leave it like that yet but more testing on AIX will inform that decision.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JMS app into MQInput
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.