Author |
Message
|
CAONIMA |
Posted: Tue Apr 07, 2015 10:56 am Post subject: HTTP Web Service |
|
|
Acolyte
Joined: 03 Dec 2014 Posts: 65
|
Hi All,
I think I have one sample question for you guys, because you are so powerful.
My requirement is: The message comes from a MQ Input Node,
and put the message to web service(using http), So which node should I use?
How can I set the property?
For right now, I am using the http request node, but it will throw an exception, because I don't have the response. Also, I don't need the response too, my purpose is only to put the message to web service.
Thank you very much. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 07, 2015 11:37 am Post subject: Re: HTTP Web Service |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
CAONIMA wrote: |
Hi All,
I think I have one sample question for you guys, because you are so powerful.
My requirement is: The message comes from a MQ Input Node,
and put the message to web service(using http), So which node should I use?
How can I set the property?
For right now, I am using the http request node, but it will throw an exception, because I don't have the response. Also, I don't need the response too, my purpose is only to put the message to web service.
Thank you very much. |
You have to inspect the return code of the http call. The webservice is supposed to send a 204 (checkit) if this is a one way call...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 07, 2015 12:11 pm Post subject: Re: HTTP Web Service |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
CAONIMA wrote: |
For right now, I am using the http request node, but it will throw an exception, because I don't have the response. Also, I don't need the response too, my purpose is only to put the message to web service. |
If it's throwing an exception it's because the web service is telling it to. The HTTPRequest (or the SOAPRequest for that matter) is perfectly capable of communicating with a one way web service. Or ignoring the response from a web service.
Are you sure what you're sending the web service matches what they're expecting, and the reason you're getting a failure back is nothing to do with the response (or lack thereof) but everything to do with your request? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
CAONIMA |
Posted: Wed Apr 08, 2015 4:47 am Post subject: |
|
|
Acolyte
Joined: 03 Dec 2014 Posts: 65
|
Thank you for all your suggestions.
I am sure there is nothing to do with the response, I only put the message to web service, that's it.
So what is the code before the http node? How can I write it so that it can go one way without exception/
Thank you very much! |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 08, 2015 5:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
CAONIMA wrote: |
So what is the code before the http node? How can I write it so that it can go one way without exception/ |
There is no code. To use a one way operation you send a request and don't look for a response. The exception you're getting is because the web service you're calling is sending it.
What, exactly, is the exception (HTTP reason code and any text)? What about the exception leads you to think it's because you have no response associated with the operation? How, exactly, have you associated the request with the HTTP Request node? Do you absolutely mean the HTTP Request node or do you mean the SOAP Request node, because they work in different ways. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 08, 2015 5:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
CAONIMA wrote: |
Thank you for all your suggestions.
I am sure there is nothing to do with the response, I only put the message to web service, that's it.
So what is the code before the http node? How can I write it so that it can go one way without exception/
Thank you very much! |
If the called webservice responds with an HTTP return code of 200, the broker expects a reply. Check your HTTP and webservices specs.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Apr 08, 2015 6:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
IF the webservice produces absolutely no reply of any kind, then it is not following the HTTP protocol, much less the SOAP protocol. |
|
Back to top |
|
 |
CAONIMA |
Posted: Wed Apr 08, 2015 6:23 am Post subject: |
|
|
Acolyte
Joined: 03 Dec 2014 Posts: 65
|
mqjeff wrote: |
IF the webservice produces absolutely no reply of any kind, then it is not following the HTTP protocol, much less the SOAP protocol. |
So you mean I have to use the soaprequest node? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Apr 08, 2015 6:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
CAONIMA wrote: |
mqjeff wrote: |
IF the webservice produces absolutely no reply of any kind, then it is not following the HTTP protocol, much less the SOAP protocol. |
So you mean I have to use the soaprequest node? |
No, you need to read what's being posted!
My most worthy associate pointed out that a web service with no response isn't following either basic or SOAP protocols.
This is broadly the same advice as you've been given through this thread. Put simply:
You need to look at the web service you're calling. You can't fix this in your code. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
CAONIMA |
Posted: Wed Apr 08, 2015 7:28 am Post subject: |
|
|
Acolyte
Joined: 03 Dec 2014 Posts: 65
|
Vitor wrote: |
CAONIMA wrote: |
mqjeff wrote: |
IF the webservice produces absolutely no reply of any kind, then it is not following the HTTP protocol, much less the SOAP protocol. |
So you mean I have to use the soaprequest node? |
No, you need to read what's being posted!
My most worthy associate pointed out that a web service with no response isn't following either basic or SOAP protocols.
This is broadly the same advice as you've been given through this thread. Put simply:
You need to look at the web service you're calling. You can't fix this in your code. |
Ok, Thank you Vitor.
I will talk to the other side.
Thank you for your response. |
|
Back to top |
|
 |
ganesh |
Posted: Wed Apr 08, 2015 9:49 am Post subject: Re: HTTP Web Service |
|
|
Master
Joined: 18 Jul 2010 Posts: 294
|
CAONIMA wrote: |
Hi All,
For right now, I am using the http request node, but it will throw an exception, because I don't have the response.
Thank you very much. |
What do you have between a MQINPUT NODE and HTTP request node? |
|
Back to top |
|
 |
MB Developer |
Posted: Wed Apr 08, 2015 11:27 am Post subject: Re: HTTP Web Service |
|
|
 Disciple
Joined: 03 Feb 2014 Posts: 179
|
ganesh wrote: |
CAONIMA wrote: |
Hi All,
For right now, I am using the http request node, but it will throw an exception, because I don't have the response.
Thank you very much. |
What do you have between a MQINPUT NODE and HTTP request node? |
Use Compute node between MQINPUT NODE and HTTP request node _________________ Thanks.... |
|
Back to top |
|
 |
|