Author |
Message
|
Paul D |
Posted: Tue Sep 21, 2004 7:33 pm Post subject: Web Services as HTTP SOAP Request w/ MIME attachment in MBv5 |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
I'm trying to figure out if Broker v5 is capable of supporting an HTTP request that uses MIME attachments. This would be attachments outside the message body. This is in contrast to inside the XML in base64 format. I'm a bit new to this, so hopefully I explained that correctly. Some of my questions are:
1 - Will the attachments be visible within broker?
2 - Will they be visible as part of the message tree somewhere?
3 - Could a custom Java node reference them?
4 - What would you suggest for dealing with this to supplement any missing broker functionality?
Thanks for your help!!! Paul _________________ Thanks!!!
Paul D |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Sep 22, 2004 12:40 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You could try modelling a SOAP message with attachments using MRM & TDS, I don't think it's possible to have the XML parser only parse part of a message (the XML bit), and BLOB for the rest (attachment).
The alternative is to write a java node and treat the message as a BLOB, look at the SAAJ API to build a soap message and serialize it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 22, 2004 4:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm not sure if the MRM is fully capable of modelling MIME, because I don't think it can handle dynamically declared delimiters. I imagine this would be a bit of a pain to add to a parser.
Your best bet is to treat it as BLOB data and either call a static Java method (new in FP4) that handles the MIME unpacking, or call a custom node that does the MIME unpacking. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shanson |
Posted: Wed Sep 22, 2004 4:47 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Jeff is correct - the V5 broker can't handle SOAP with attachments without a custom plugin MIME parser. If you write one, beware of one point - if the transport is HTTP (likely) then the HTTP header parser will consume any MIME statements that occur before the <CR><LF><CR><LF>. This says to me that you need to parse as a BLOB, then examine the contents of the HTTP header, before you invoke a custom parse of the BLOB. |
|
Back to top |
|
 |
Paul D |
Posted: Wed Sep 22, 2004 5:31 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
Thanks Shanson. I was suspecting this would be the case. I was going to open a PMR just to make sure but since you are from Hursley I take it you have a good understanding about this. We are about to apply CSD#4 and take a look at the Java capabilities. We have other Java plugin's and given the purpose of this (enterprise reusable), that might be better to write the full plug-in. I've yet to view a request to see the headers, but I suspect you are correct. Jlrowe, what is the SAAJ API? _________________ Thanks!!!
Paul D |
|
Back to top |
|
 |
shanson |
Posted: Wed Sep 22, 2004 8:21 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Paul, you can only write plugin nodes in Java, a plugin parser must be written in C. |
|
Back to top |
|
 |
RocknRambo |
Posted: Wed Sep 22, 2004 8:26 am Post subject: |
|
|
Partisan
Joined: 24 Sep 2003 Posts: 355
|
Wanna look @ HTTP Adapter
this is can be easily implemented in that...using meta objects. IF ur firm has already been involved in WBIA ..then it wud be very ease to startoff..
If ur not..into WBIA..
then definitely worth a shot for Proof of concept.
-sanu |
|
Back to top |
|
 |
Paul D |
Posted: Wed Sep 22, 2004 9:52 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
While we do have some ICS and adapters, although we are primarily a Message Broker shop. From checking on the Web Services adapter functionality, it looks like we'd need to add in functionality for handling the attachments. If that's the case, they I'd rather go with the custom Java node. I also understand we can we build our own WBI Adapter, and also that you can use the adapter with the broker. We'd still rather just stick with the broker whenever possible.
UPDATE - 3-25-2005 - We ended up writing a java plugin to pull off the binary attachments and write them to the file system. The remaining XML SOAP envelope and XML document attachment we put a "super tag" around and passed that forward for the rest of the flow to consume. This has worked fine. _________________ Thanks!!!
Paul D |
|
Back to top |
|
 |
|