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 » Again, SOAP with attachments

Post new topic  Reply to topic
 Again, SOAP with attachments « View previous topic :: View next topic » 
Author Message
accosun
PostPosted: Tue Oct 03, 2006 12:20 pm    Post subject: Again, SOAP with attachments Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Hi!

It's the first time I'm dealing with SOAP attachments, so my questions may be a little bit "dummy"

So, I build testing WBIMB environment and i need to get MQ message with SOAP envelope and attachment in it's body from queue and parse this message in the message flow. Also I need to extract attachments.

MF might be very simple, something like: MQInput ->Compute (or JavaCompute)->MQOutput.

In Default-MessageDomain property of MQInput I select MIME. When I put message to the input queue, in Debugger I see no error, but message tree looks like strange to me (in the Variables window):

Root
Properties
MQMD
MIME
Invalid Content-Type - 1

Full message is:

(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'Multipart/Related;boundary=MIME_boundary;type="application/xop+xml";start="<mymessage.xml@example.org>";startinfo="application/soap+xml;action=\"addGuarantorStamp\""'
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'INPUT.QUEUE'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d5120514d202020202020202020206c9f224520001510'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'QM '
(0x03000000):UserIdentifier = 'db2admin '
(0x03000000):AccountingToken = X'160105150000009b0bc11ee1922475828ba628f103000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'E:\IBM\RFHUTIL\rfhutil.exe '
(0x03000000):PutDate = DATE '2006-10-03'
(0x03000000):PutTime = GMTTIME '20:04:15.760'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MIME = (

I

Is it OK? Where is the body of the message? Should I use another parsers to get it?

Thank you in advance, Alex

Test message is posted below:

MIME-Version: 1.0
Content-Type: Multipart/Related;boundary=MIME_boundary;type="application/xop+xml";
start="<mymessage.xml@example.org>";
startinfo="application/soap+xml; action=\"addGuarantorStamp\""
Content-Description: SOAP message with image
--MIME_boundary
Content-Type: application/xop+xml;charset=UTF-8; type "application/soap+xml; action=\"addGuarantorStamp\""
Content-Transfer-Encoding: 8bit
Content-ID: <mymessage.xml@example.org>
<SOAP-ENV:Body>
<m:addGuarantorStamp xmlns:m="http://ws.test.org/">
<stamp>
<m0:nullVal>true</m0:nullVal>
<m1:signTypeId>
<m0:nullVal>true</m0:nullVal>
<m0:value>2147483647</m0:value>
</m1:signTypeId>
<m1:beginDate>
<m0:nullVal>true</m0:nullVal>
<m0:value>2001-12-17T09:30:47.0Z</m0:value>
</m1:beginDate>
<m1:guarantorId>
<m0:nullVal>true</m0:nullVal>
<m0:value>2147483647</m0:value>
</m1:guarantorId>
<m1:creationDate>
<m0:nullVal>true</m0:nullVal>
<m0:value>2001-12-17T09:30:47.0Z</m0:value>
</m1:creationDate>
<m1:endDate>
<m0:nullVal>true</m0:nullVal>
<m0:value>2001-12-17T09:30:47.0Z</m0:value>
</m1:endDate>
<m1:id>
<m0:nullVal>true</m0:nullVal>
<m0:value>2147483647</m0:value>
</m1:id>
</stamp>
<stampImage>
<m0:nullVal>true</m0:nullVal>
<m1:image>
<m0:nullVal>true</m0:nullVal>
<m0:value><xop:Include
xmlns:xop='http://www.w3.org/2004/08/xop/include'
href='cid:http://example.org/me.jpg'/></m0:value>
</m1:image>
<m1:id>
<m0:nullVal>true</m0:nullVal>
<m0:value><http://example.org/me.jpg></m0:value>
</m1:id>
</stampImage>
</m:addGuarantorStamp>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--MIME_boundary
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <http://example.org/me.jpg>
ÚüÚÞ

 $.' ",#(7),01444'9=82<.342Úø
2!!22222222222222222222222222222222222222222222222222Úþ
Úä
--MIME_boundary
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kimbert
PostPosted: Wed Oct 04, 2006 2:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

From a contact at Hursley:
Quote:
input message looks a bit broken to me - header block shpuld be terminated by CRLFCRLF and final boundary needs a trailing '--'.

Are you sure that you have actually parsed the message at this point? Message Broker parsing is 'on-demand', so if your flow has not accessed any fields, no parsing will be triggered. Try setting Parse Timing to 'Immediate' on the General Message Options page.
Back to top
View user's profile Send private message
accosun
PostPosted: Wed Oct 04, 2006 2:56 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Thank you for your reply!

I'll check the message!

Quote:
Are you sure that you have actually parsed the message at this point? Message Broker parsing is 'on-demand', so if your flow has not accessed any fields, no parsing will be triggered. Try setting Parse Timing to 'Immediate' on the General Message Options page.

But when debugger is used, it forses parsing isn't it?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mgk
PostPosted: Wed Oct 04, 2006 3:27 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Also, what you posted is missing the SOAPEnvelope start tag, as it starts with SOAPBody, but has an envelope closing tag at the end. I assume this was a cut and paste error?
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
accosun
PostPosted: Wed Oct 04, 2006 1:36 pm    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

Thank you for your help guys, but it still doesn't work, seems to me.

I've added SOAP envelope tag, I've fixed all nessessery end of lines, I've set Parse Timing to 'Immediate' in the InputNode... The message now look like that:

MIME-Version: 1.0
Content-Type: Multipart/Related;boundary=MIME_boundary;type="application/xop+xml";start="<mymessage.xml@example.org>";startinfo="application/soap+xml; action=\"addGuarantorStamp\""
Content-Description: SOAP message with image

--MIME_boundary
Content-Type: application/xop+xml;charset=UTF-8;type="application/soap+xml; action=\"addGuarantorStamp\""
Content-Transfer-Encoding: 8bit
Content-ID: <mymessage.xml@example.org>
<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body>
<m:addGuarantorStamp xmlns:m="http://ws.test.org/">
<stamp>
<m1:id>
<m0:nullVal>true</m0:nullVal>
<m0:value>2147483647</m0:value>
</m1:id>
</stamp>
<stampImage>
<m0:nullVal>true</m0:nullVal>
<m1:image>
<m0:nullVal>true</m0:nullVal>
<m0:value><xop:Include
xmlns:xop='http://www.w3.org/2004/08/xop/include'
href='cid:http://example.org/me.jpg'/></m0:value>
</m1:image>
<m1:id>
<m0:nullVal>true</m0:nullVal>
<m0:value><http://example.org/me.jpg></m0:value>
</m1:id>
</stampImage>
</m:addGuarantorStamp>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: <http://example.org/me.jpg>
ÚüÚÞ

 $.' ",#(7),01444'9=82<.342Úø
2!!22222222222222222222222222222222222222222222222222Úþ
Úä
--MIME_boundary--

Again, in Debugger I see no error, and message tree looks like that:

Root
Properties
MQMD
MIME
Empty or invalid header found at position: &1.

In Windows Event Viewer I ve found the following message:

" An error was found whilst parsing 'MIME' header data. A 'MIME' header name is empty or contains invalid characters at position: 180.

A 'MIME' header name cannot be empty or contain invalid characters. "


If I add CRLF before SOAP Envelope, Debugger shows message tree as:

Root
Properties
MQMD
MIME
Invalid index

Something wrong with message again? May be I use any unsuppported format?

Thank you in advance, Alex
Back to top
View user's profile Send private message Send e-mail Visit poster's website
accosun
PostPosted: Thu Oct 12, 2006 7:08 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2001
Posts: 45
Location: Moscow

I've managed to do it!!! Problem was in CR/LF after final boundary "--". I put it there and got right result!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Again, SOAP with attachments
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.