Author |
Message
|
er.gursharan |
Posted: Thu Jul 28, 2011 9:48 pm Post subject: How to call HTTP GET using WMB |
|
|
Newbie
Joined: 28 Jul 2011 Posts: 7
|
Hi,
I am working on a code. And I am sending data to an application using the SOAP request node. The data sent is a bulk message of size 25 Mb.
After sending the data. I have to enquire the status of data (whether posted successfully or not). To enquire the status I need to send HTTP GET request to batch URL: -
GET /bat/EXAMPLE/100 HTTP/1.1
Host: Example. com
Please help me as to how to send this HTTP GET request using WMB.
Thanks,
Guru
IBM Certified WMB solution developer 6.1
IBM Certified System Admin WMQ v6.0 |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 28, 2011 10:51 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Eh?
You are sending a SOAP message and then want to poke the recipient to see if your message was received?
IMHO, you are missing the point of SOAP.
As you are send in SOAP message there will be several ack's under the hood that will take care of what you want.
firstly, if the target is down you will get an error.
then if the WSDL don't match you will get an error.
then if the data isn't sent propely (due to network issues) you will get an error.
Finally, when the webservice has done whatever it was supposed to do it will send a SOAP reply back to you.
If the webservice timesout you will get an error.
Given all that why do you want to do this other thing? Unless you can code the other end specifically to handle this request AND yours is the only things that will ever ever connect to the webservice, I can't see exactly what it will give you.
For example, how do you know that the response to your GET will be related to your request on the webservice? A webservice is exactly that, a SERVICE. other things could be using it at the same time as you. The GET response could very well be for some other request.
Finally, are you using a SOAP request Node? if so the request/reply is done inside that node so you can't do the HTTP Get anyway.
If I have got the wrong idea about what and how you are doing things please give give us a whole load more details of your flow etc. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
er.gursharan |
Posted: Thu Jul 28, 2011 11:37 pm Post subject: @smdavies99 |
|
|
Newbie
Joined: 28 Jul 2011 Posts: 7
|
Hi
The reason as to why I need to hit the webservice again and look for response is -
The webservice which I am hitting thru SOAP request node will reply me for sure immediately. But it will take time to process long data (25MB). And SOAP request node will provide me the status as DATA PROCESSING not COMPLETE.
And have to wait till I get response that data processed successfully(COMPLETE).
So in my flow I have a timeoutcontrol and timeoutnotification node in place to enquire about the status again after 10 mins. And as per requirement to enquire the status again I just need to send HTTP GET request in the format mentioned in my previous post.
Hope this provides a better picture of problem now. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jul 29, 2011 2:03 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Ok,
There is an option on the HTTPRequest node to send a GET.
What I have done in the past is to
- Use SOAP/UI to get the get request right.
- then configure the HTTP node to do the same.(HTTP Settings->HTTP Method _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jul 29, 2011 4:13 am Post subject: Re: @smdavies99 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
er.gursharan wrote: |
Hi
The reason as to why I need to hit the webservice again and look for response is -
The webservice which I am hitting thru SOAP request node will reply me for sure immediately. But it will take time to process long data (25MB). And SOAP request node will provide me the status as DATA PROCESSING not COMPLETE.
And have to wait till I get response that data processed successfully(COMPLETE).
So in my flow I have a timeoutcontrol and timeoutnotification node in place to enquire about the status again after 10 mins. And as per requirement to enquire the status again I just need to send HTTP GET request in the format mentioned in my previous post.
Hope this provides a better picture of problem now. |
I would think you would use the Asynchronous SOAP nodes for this, rather than trying to deal with it yourself. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jul 29, 2011 5:52 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
But he didn't say that he was using V7... _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|