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 » MIME + XML in HTTP Request node

Post new topic  Reply to topic
 MIME + XML in HTTP Request node « View previous topic :: View next topic » 
Author Message
Rajat
PostPosted: Mon Jul 09, 2012 3:45 am    Post subject: MIME + XML in HTTP Request node Reply with quote

Novice

Joined: 26 Nov 2009
Posts: 15

Hello Guys,

I have a requirement where I need to expose a service(single URL) which can accept both MIME and XML messages i.e either we will receive a XML or MIME.

Example : Document service, where you can receive a insert document request(MIME) or search document request(XML). This needs to be exposed via same URL.

Input(MIME) -> INSERT -> Output(XML)
Input(XML) ->SEARCH -> Output(XML)
Input(XML) -> RETREIVE -> Output(MIME)

Thanks in advance
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jul 09, 2012 5:00 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Thats a great requirement. Let us know how you implement it. Should be very easy with WebSphere Message Broker.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Rajat
PostPosted: Mon Jul 09, 2012 5:11 am    Post subject: Reply with quote

Novice

Joined: 26 Nov 2009
Posts: 15

Actually I have to implement in Message Broker only. Could you suggest what are the possible ways of doing it. I am really sorry If I am asking something very basic.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 09, 2012 5:15 am    Post subject: Reply with quote

Grand High Poobah

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

Rajat wrote:
Could you suggest what are the possible ways of doing it.


I'd suggest writing a message flow.

Rajat wrote:
I am really sorry If I am asking something very basic.


It's so basic I don't understand the problem. You're receiving something via a URL (http or SOAP). You process this and output a result. And?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jul 09, 2012 5:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Rajat wrote:
Actually I have to implement in Message Broker only. Could you suggest what are the possible ways of doing it. I am really sorry If I am asking something very basic.


You learn basic things in different ways. Here are some ways to learn basic things:

[1] Read the InfoCentre:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fac56170_.htm

[2] Take the Developers Training Class:

https://www-304.ibm.com/jct03001c/services/learning/ites.wss/us/en?pageType=course_description&courseCode=WM664

[3] Get a mentor or coach.

[4] Hire a consultant.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Rajat
PostPosted: Mon Jul 09, 2012 5:22 am    Post subject: Reply with quote

Novice

Joined: 26 Nov 2009
Posts: 15

I want to use a HttpInputNode but if I configure it for MIME then it is not parsing just XML messages and as explained above I have requirement like this

Input(MIME) -> INSERT -> Output(XML)
Input(XML) -> SEARCH-> Output(XML)
Input(XML) -> RETREIVE -> Output(MIME)

Hope this makes more sense. Please let me know If I am still not clear.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Jul 09, 2012 5:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Have you attended the training class? have you read the InfoCentre? If you have done both of these things, which one is unclear?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Jul 09, 2012 5:47 am    Post subject: Reply with quote

Grand High Poobah

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

Rajat wrote:
I want to use a HttpInputNode but if I configure it for MIME then it is not parsing just XML messages


So you have 2 difference possible input formats, and you can only set 1 format on the input node. We know that & you've discovered it. So you'll need to come up with some means of accepting a generic format message, discovering which of the possible types it is and then handling it.

We call that "development", or more loosely "working for a living".

1 viable alternative is to push back on the requirement. It's certainly questionable to have 3 operations (insert, search, retrieve) on a single URL as an http POST. Another would be to use SOAP rather than http, have the 3 operations litterally as 3 operations in the WSDL and make all your problems disappear as WMB will then work it out for you.

As it is, you'll just have to code for it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Rajat
PostPosted: Mon Jul 09, 2012 8:39 am    Post subject: Reply with quote

Novice

Joined: 26 Nov 2009
Posts: 15

Thanks Vitor..

Is it a good idea to accept messages as BLOB and later parse it in MIME or XML formats depending on the opeartion invoked in case I am using HTTPInputNode ?
Back to top
View user's profile Send private message
MBMQDeveloper
PostPosted: Mon Jul 09, 2012 9:36 pm    Post subject: Reply with quote

Novice

Joined: 02 Jul 2012
Posts: 19

Accepting as BLOB would require you to convert the message back to MIME/XML for further processing which would affect your performance.

What about using a message set that can accept both XML and MIME?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 10, 2012 4:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

MBMQDeveloper wrote:
Accepting as BLOB would require you to convert the message back to MIME/XML for further processing which would affect your performance.

Not significantly.

MBMQDeveloper wrote:
What about using a message set that can accept both XML and MIME?

You mean code a DFDL message set that determines if the first character of the message is "<" or not?

That's a *terrible* idea.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 10, 2012 5:05 am    Post subject: Reply with quote

Grand High Poobah

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

Rajat wrote:
Is it a good idea to accept messages as BLOB and later parse it in MIME or XML formats depending on the opeartion invoked in case I am using HTTPInputNode ?


It's an idea, I'm unconvinced it's a good idea or the best idea.

Are you using the HTTPInputNode for a valid reason or just because you've been told to?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 10, 2012 5:07 am    Post subject: Reply with quote

Grand High Poobah

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

MBMQDeveloper wrote:
What about using a message set that can accept both XML and MIME?


That's like cutting your hair with a chain saw; there's a good chance you can achieve something in the direction of hair cutting but there are a number of issues to overcome and the odds of a serious problem are high....
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » MIME + XML in HTTP Request node
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.