Author |
Message
|
mr2kn |
Posted: Fri Mar 04, 2016 6:33 am Post subject: Required any example for HTTPAsync Request - Response |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
Hi,
Im trying to do create an flow for HTTPAsync Request - Response in IIB9 scenario and getting difficult, I check in the info center I did not found and found on SOAPAsyncRequest-Response same way I tried its not working may be some properties need to set not sure,
something like
soap input --- compute ---httpasyncrequest(along with header need to pass some more details to it)
httpasyncresponse --- compute --- soapreply
Please let me know any details I can try and very much appreciated
thank you |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 04, 2016 6:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Have you looked at the Samples? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mr2kn |
Posted: Fri Mar 04, 2016 6:53 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
Yes, I have looked at samples, and I found soapasyncrequest-response not the httpasyncrequest-response and I tried to implement with reference soap but it did not worked,
thank you for looking |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Mar 04, 2016 8:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mr2kn wrote: |
Yes, I have looked at samples, and I found soapasyncrequest-response not the httpasyncrequest-response and I tried to implement with reference soap but it did not worked,
thank you for looking |
What exactly did not work? You realize that you need to check the soap ws-addressing in the SOAP Input Node for it to support SOAP Asynch operations?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 04, 2016 8:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Is the control flow of an asynchronous process any different regardless of the transport used? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mr2kn |
Posted: Fri Mar 04, 2016 8:58 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
sorry, I did not worked much on the async process, and now im trying to implement and I select the ws-addressing option for the soap-input node |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 04, 2016 9:06 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What is the basic control flow of an asynchronous process?
How is that shown in the sample?
How would that change with the transport being used? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mr2kn |
Posted: Fri Mar 04, 2016 9:46 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
for async process is like without for the response and response will coming in different threads and which will be identified by unique identifier from the properties
in the sample they shown soapasync process like
MQinput --- compute -- soap async request
soapsync response -- compute -- mq output
transport being used by HTTP post method |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 04, 2016 10:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mr2kn wrote: |
for async process is like without for the response and response will coming in different threads and which will be identified by unique identifier from the properties
in the sample they shown soapasync process like
MQinput --- compute -- soap async request
soapsync response -- compute -- mq output
transport being used by HTTP post method |
And does that change anything significant? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
mr2kn |
Posted: Fri Mar 04, 2016 11:40 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
between httpasync and soapasync node properties are different and most of same I mean basic details |
|
Back to top |
|
 |
mr2kn |
Posted: Fri Mar 04, 2016 1:53 pm Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
I tried like this flow
soap input --- compute --- soapasyncrequest
soapasyncresponse --- compute1 ---soapreply
in the compute node I have written like this but in the URL specifier its not taking the correct URL path
Compute code:
Code: |
CALL CopyEntireMessage();
SET OutputLocalEnvironment = InputLocalEnvironment;
DECLARE envRef REFERENCE TO Environment.Variables;
SET envRef.userName = InputRoot.XMLNSC.ns12:processRequest.Request.CommonData.userName;
SET envRef.password = InputRoot.XMLNSC.ns12:processRequest.Request.CommonData.password;
SET envRef.Key = InputRoot.XMLNSC.ns12:processRequest.Request.CommonData.Key;
/* Login variable details */
DECLARE finalDestinationUrl CHAR;
DECLARE inputUrl CHAR;
DECLARE requestMethod CHAR;
DECLARE parameters CHAR;
/* Login construct */
SET inputUrl = InputRoot.HTTPInputHeader."X-Original-HTTP-Command";
SET requestMethod = SUBSTRING(inputUrl BEFORE ' http://');
SET inputUrl = SUBSTRING(inputUrl BEFORE ' HTTP/');
SET finalDestinationUrl = HTTPLogin||'Login.json?&userName='||envRef.userName||'&password='||envRef.password|| '&Key='||envRef.appKey|| SUBSTRING(inputUrl AFTER '7080');
SET OutputRoot.HTTPRequestHeader."X-Original-HTTP-URL" = finalDestinationUrl;
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = requestMethod;
RETURN TRUE; |
hope this help me where I went wrong
thank you |
|
Back to top |
|
 |
timber |
Posted: Sat Mar 05, 2016 2:59 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Please edit the previous post ( using the Edit button ) and add code tags around your ESQL ( using the Code button ). It makes the code a lot easier to read. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Mar 05, 2016 6:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So if you put a trace node in front of your request node asking for ${Root} and ${LocalEnvironment}  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mr2kn |
Posted: Mon Mar 07, 2016 6:57 am Post subject: |
|
|
Apprentice
Joined: 26 Jan 2016 Posts: 46
|
I put the trace log with ${Root},${LocalEnvironment} im able to see the proper URL and also while asyncresponse time its getting catch terminal because of reply identifier
not sure where I missed and need to get correct |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Mar 07, 2016 7:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What changes if you replace the soapasynch nodes for httpasynch nodes?
Is it *anything* other than the code in your flow?
Don't you want to use the httpasynch nodes? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|