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 » Need return context info exception thrown from a collector n

Post new topic  Reply to topic
 Need return context info exception thrown from a collector n « View previous topic :: View next topic » 
Author Message
benh
PostPosted: Wed Apr 29, 2015 3:44 pm    Post subject: Need return context info exception thrown from a collector n Reply with quote

Newbie

Joined: 29 Apr 2015
Posts: 1

Hello,

I am attempting to create a flow which takes two asynchronous http responses and and uses the collector node to combine the output. Unfortunately I am stuck getting a 'Need return context info' exception. I thought it was an issue of my ReplyIdentifier being different before and after the asynchronous request and response. So I placed it in OutputLocalEnvironment.Destination.HTTP.UserContext before the request and retrieved it once I got my response back, but I am still getting the same exception.

I have placed trace node before and after and included them below. Any help or suggestions for how I could move forward would be much appreciated. Also I am happy to provide any additional info.

Trace before asynchronous request:


Code:


##############ROOT##############
( ['WSRoot' : 0x29377510]
  (0x01000000:Name):Properties      = ( ['WSPROPERTYPARSER' : 0x297ed660]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional          = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2015-04-29 23:08:54.928001' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'SOAP-HTTP' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
  )
  (0x01000000:Name):HTTPInputHeader = ( ['WSINPHDR' : 0x29377ea0]
    (0x03000000:NameValue):X-Original-HTTP-Command = 'GET http://localhost:7080/COLLECT_SES_TEST/1004449 HTTP/1.1' (CHARACTER)
    (0x03000000:NameValue):Accept-Encoding         = 'gzip,deflate' (CHARACTER)
    (0x03000000:NameValue):Host                    = 'localhost:7080' (CHARACTER)
    (0x03000000:NameValue):Connection              = 'Keep-Alive' (CHARACTER)
    (0x03000000:NameValue):User-Agent              = 'Apache-HttpClient/4.1.1 (java 1.5)' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Addr           = '127.0.0.1' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Host           = '127.0.0.1' (CHARACTER)
    (0x03000000:NameValue):X-Server-Name           = 'localhost' (CHARACTER)
    (0x03000000:NameValue):X-Server-Port           = '7080' (CHARACTER)
    (0x03000000:NameValue):X-Scheme                = 'http' (CHARACTER)
    (0x03000000:NameValue):Authorization           = 'Basic SVRNUy1TT0E6RVNCITJTRVMjMQ==' (CHARACTER)
  )
)

##############LOCAL##############
( ['MQROOT' : 0x29377840]
  (0x01000000:Name):Destination = (
    (0x01000000:Name):HTTP = (
      (0x03000000:NameValue):RequestIdentifier = X'414d5120494239514d47522020202020a9db3f5520051102' (BLOB)
      (0x03000000:NameValue):RequestURL        = 'https://ses852dweb1.ci.northwestern.edu:30443/PSIGW/RESTListeningConnector/NW_SR_PERS_BIO_DEMO.v1/Request/1004449' (CHARACTER)
      (0x03000000:NameValue):UserContext       = X'000000000000000000000000000000000000000000000000' (BLOB)
    )
  )
)


Trace after asynchronous response where I have set ReplyIdentifier to what was in OutputLocalEnvironment.Destination.HTTP.UserContext:


Code:

##############ROOT##############
( ['WSRoot' : 0x28ed72e0]
  (0x01000000:Name):Properties         = ( ['WSPROPERTYPARSER' : 0x297f08b0]
    (0x03000000:NameValue):MessageSet             = '' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional          = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2015-04-29 23:08:56.216' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'SOAP-HTTP' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = 'text/xml; encoding="UTF-8"' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
  (0x01000000:Name):HTTPResponseHeader = ( ['WSRSPHDR' : 0x28c6f550]
    (0x03000000:NameValue):X-Original-HTTP-Status-Line = 'HTTP/1.1 200 OK' (CHARACTER)
    (0x03000000:NameValue):X-Original-HTTP-Status-Code = 200 (INTEGER)
    (0x03000000:NameValue):Cache-Control               = 'no-cache, must-revalidate, private' (CHARACTER)
    (0x03000000:NameValue):Connection                  = 'close' (CHARACTER)
    (0x03000000:NameValue):Date                        = 'Wed, 29 Apr 2015 23:08:55 GMT' (CHARACTER)
    (0x03000000:NameValue):Content-Length              = '876' (CHARACTER)
    (0x03000000:NameValue):Content-Type                = 'text/xml; encoding="UTF-8"' (CHARACTER)
    (0x03000000:NameValue):Content-Encoding            = 'gzip' (CHARACTER)
    (0x03000000:NameValue):X-Powered-By                = 'Servlet/2.5 JSP/2.1' (CHARACTER)
  )
  (0x01000000:Name):BLOB               = ( ['none' : 0x28c6f860]
    (0x03000000:NameValue):UnknownParserName = '' (CHARACTER)
    (0x03000000:NameValue):BLOB              =
X'1f8b0800000000000000ed5859739b30107eefaf60f2929718097cc4f1284
a8911292dd77034f113c3a4a4766b430668da9f5f21c4e1c4ee91c44926ad87
b1b5abd5aef47dcb2e069dfc582d859b38cb176972bc2f8970ff0423eb3cf4dc
d021ae179eea76a812937ed95381da26f9f1debc28ae270030494cb3e87219
8b97e90a90a488b3eb6c91c7c04fd3650ef2cb79bc8a72b0c55fe87c3813b7cc
8937d21e7e8388e918ba8a25080783c111025c2e7768119f8e2cdb3d230834
32d288eb28d842a01af0b3588a49bcd00b4e1feb1cbaa5d9e206df6cdfdda0b
b085605219aa6fa588610f6a0dc8387141da641a54de8cf1c82557246b1694
43683f592ee3839f0a3559445c2fbca822f735ca2e91798afaa254d773d9fc5c
6d52a0a6fab42a6aeaa06a904eaae2b2243a9cd785c045a5515d30bb44ecc5a
2aad0247557ddfc4d59a56ea60f1c4604b038a744f3ada00b6e36a77c1d6d29
c866cb04ea34468707854d8d73c6f61a0dacc7d08680fee4be3c9f07002c722
649f1e1c42f872f8e13783bc911ffdd5f2f34b02c0863a55d3a2a8aa4b3c6f67c
5f18eff6e816c267715f4566e483d7a496da1a43fa1e72b7ee06185296b094d
edc0f2dd190e3c3a510b88fbadf2e734f068975953d506121ef5fbc27419655f
05af101b2ba9b190b17d75b5b88c85f44a28e6b1e0c69f1779914559632bd3
4de8fe0c939b28c98b94260d1351b9435a4b0d04aa11726c3a30f008ca708c
0097aa035073500f787e944b5a247c0827ec6a6ee6d1a4733733ffed583d9d6
147f55c957c34ba36a5be4eb206fa67e2f84e7d7e10c7d3c075b7722c8d2549
30d3244b63ca7216c7c581a02db2bc10b4659a661b597f10bd323d17ecff29c
76b05fb6832ecb705fb371cf367aa7f81601ad4fc4ff036826f6b6e370fe79d6d
edac73ac3befb68d6a6627e1aa306cccabbc6e50aa3a8a3aabc2a9ad12dce415
1799211e0f0ec16044b9e90f25be98e6e9854f2c4fb72dbaa8332e9f2588eb1
235d40ce50ccfa8fdbaa666a1dae0b360c03addd36160bd400ca6e49e79204b
726f381ecaaf0103d60def81c178444b95341ebd020caa86f19230009bca650
d0d3115ddd851815ef3ddadcf6c6217c1f893008bcbc05754d32a5f0a358a6a
12175f16576f93342be6dfe3f22f5522c69fbe71c3bf8098db3ff5a9acf3e0e1a7
dade48b83dd8c0629b4db7dfc7e19f677688862a140000' (BLOB)
  )
)

##############LOCAL##############
( ['MQROOT' : 0x28ed7610]
  (0x01000000:Name):HTTP        = (
    (0x01000000:Name):Response = (
      (0x03000000:NameValue):UserContext     = X'000000000000000000000000000000000000000000000000' (BLOB)
      (0x03000000:NameValue):MessageCorrelId = X'484120200100000083fe2b10e5140500540d0000f81b0000' (BLOB)
    )
  )
  (0x01000000:Name):Destination = (
    (0x01000000:Name):HTTP = (
      (0x03000000:NameValue):RequestIdentifier = X'414d5120494239514d47522020202020a9db3f5520051102' (BLOB)
    )
  )
)



The exception thrown by the collector node:


Code:


##############EXCEPTION##############
( ['MQROOT' : 0x28f6a6b0]
  (0x01000000:Name):RecoverableException = (
    (0x03000000:NameValue):File                 = 'F:\build\slot1\S900_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp' (CHARACTER)
    (0x03000000:NameValue):Line                 = 1153 (INTEGER)
    (0x03000000:NameValue):Function             = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
    (0x03000000:NameValue):Type                 = 'ComIbmCollectorNode' (CHARACTER)
    (0x03000000:NameValue):Name                 = 'COLLECT_SES_TEST#FCMComposite_1_9' (CHARACTER)
    (0x03000000:NameValue):Label                = 'COLLECT_SES_TEST.Collector' (CHARACTER)
    (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
    (0x03000000:NameValue):Severity             = 3 (INTEGER)
    (0x03000000:NameValue):Number               = 2230 (INTEGER)
    (0x03000000:NameValue):Text                 = 'Node throwing exception' (CHARACTER)
    (0x01000000:Name     ):Insert               = (
      (0x03000000:NameValue):Type = 14 (INTEGER)
      (0x03000000:NameValue):Text = 'COLLECT_SES_TEST.Collector' (CHARACTER)
    )
    (0x01000000:Name     ):RecoverableException = (
      (0x03000000:NameValue):File                 = 'F:\build\slot1\S900_P\src\WebServices\WSLibrary\ImbWSReplyNode.cpp' (CHARACTER)
      (0x03000000:NameValue):Line                 = 975 (INTEGER)
      (0x03000000:NameValue):Function             = 'ImbWSReplyNode::evaluate' (CHARACTER)
      (0x03000000:NameValue):Type                 = 'ComIbmWSReplyNode' (CHARACTER)
      (0x03000000:NameValue):Name                 = 'COLLECT_SES_TEST#FCMComposite_1_11' (CHARACTER)
      (0x03000000:NameValue):Label                = 'COLLECT_SES_TEST.HTTP Reply' (CHARACTER)
      (0x03000000:NameValue):Catalog              = 'BIPmsgs' (CHARACTER)
      (0x03000000:NameValue):Severity             = 3 (INTEGER)
      (0x03000000:NameValue):Number               = 2230 (INTEGER)
      (0x03000000:NameValue):Text                 = 'Caught exception and rethrowing' (CHARACTER)
      (0x01000000:Name     ):Insert               = (
        (0x03000000:NameValue):Type = 14 (INTEGER)
        (0x03000000:NameValue):Text = 'COLLECT_SES_TEST.HTTP Reply' (CHARACTER)
      )
      (0x01000000:Name     ):RecoverableException = (
        (0x03000000:NameValue):File     = 'F:\build\slot1\S900_P\src\WebServices\WSLibrary\ImbWSReplyNode.cpp' (CHARACTER)
        (0x03000000:NameValue):Line     = 547 (INTEGER)
        (0x03000000:NameValue):Function = 'ImbWSReplyNode::evaluate' (CHARACTER)
        (0x03000000:NameValue):Type     = 'ComIbmWSReplyNode' (CHARACTER)
        (0x03000000:NameValue):Name     = 'COLLECT_SES_TEST#FCMComposite_1_11' (CHARACTER)
        (0x03000000:NameValue):Label    = 'COLLECT_SES_TEST.HTTP Reply' (CHARACTER)
        (0x03000000:NameValue):Catalog  = 'BIPmsgs' (CHARACTER)
        (0x03000000:NameValue):Severity = 3 (INTEGER)
        (0x03000000:NameValue):Number   = 3143 (INTEGER)
        (0x03000000:NameValue):Text     = 'Need return context info' (CHARACTER)
      )
    )
  )
)




Thanks for the help!
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Apr 29, 2015 9:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

If you have not realised it, the output AFTER the collector node is running in a different thread.
Ideally your HTTP reply needs to be done once the data is submitted to the collection UNLESS you can be sure that the infor that the HTTPReply node can survive being passed through a collector node.
Or to put it another way, if there is something in the collection that you need in the reply then you may have to find an alternative method of emulating the Collector Node.
The only sure solution is to raise a PMR with IBM and find out from the horses mouth.

As an aside, we now never use the node because of issues like this and use a DB Table instead. However 99% of all of our collections are open ended (we don't know how many elements will be in the collection when we start it). your use case may well be different.
_________________
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
View user's profile Send private message
vincent.s
PostPosted: Wed Mar 16, 2016 2:25 am    Post subject: Reply with quote

Newbie

Joined: 16 Mar 2016
Posts: 1

Hi benh,

If anyone has similar problem, I solved this by saving the request identifier before calling the Web Services:

Code:

DECLARE RequestId SHARED BLOB;
SET RequestId = InputLocalEnvironment.Destination.HTTP.RequestIdentifier;


And then restoring it after becoming the asynchron response:
Code:

SET InputLocalEnvironment.Destination.HTTP.RequestIdentifier = RequestId;


Hope it helps!
Back to top
View user's profile Send private message
paintpot
PostPosted: Wed Mar 16, 2016 3:38 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

Nice work.

Just to add to this, to add the value back it would be:

Code:
SET OutputLocalEnvironment.Destination.HTTP.RequestIdentifier = RequestId;


So modify the Output
Back to top
View user's profile Send private message
maurito
PostPosted: Wed Mar 16, 2016 4:41 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

vincent.s wrote:
Hi benh,

If anyone has similar problem, I solved this by saving the request identifier before calling the Web Services:

Code:

DECLARE RequestId SHARED BLOB;
SET RequestId = InputLocalEnvironment.Destination.HTTP.RequestIdentifier;


And then restoring it after becoming the asynchron response:
Code:

SET InputLocalEnvironment.Destination.HTTP.RequestIdentifier = RequestId;


Hope it helps!

The original problem was two async http nodes being collected. That means you have two inputs to the collector, which in turn means two different threads. So, which RequesId are you saving ? You may not care, but it could be important, so your solution seems to be faulty.
The solution would be to have 4 inputs to the collector:
1- http response from node1
2- message containing http requestId from node1
3- http response from node2
4- message containing http requestId from node2
So when the collection is complete, you have all the data in your collection and you also know which requestId correspond to each request.
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 » Need return context info exception thrown from a collector n
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.