Author |
Message
|
ameya_nayak |
Posted: Wed Jul 10, 2013 6:05 am Post subject: Calling Two webs ervice and aggregating the response in WMB |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
HI
I am planning to call two different web service and aggregating the response in WMB
Here is my current flows
Flow1 : CompositeFanoutFlow:
HTTPInput--Mapping1---AggregateControl-MQOutput-AggregateRequest
In above flow,I have two Mapping files .I will be sending Combine .XML file containing the request for both web service in simple .XML file and pass it to HTTP input node then I am using two mapping files for two different .wsdl and passing it to Aggregate Control
Flow2 : CompositeMQtoSOAPFlow:
MQinput-- Comput Node->SOAPAsynchRequest
Flow3 : CompositeSOAPtoMQFlow:
SOAPAsynchResponse---ComputNode--MQOutput
Flow4 : CompositeFanInFlow:
MQinput-- AggregateReply--HTTPInout
In above flow 2,3,4 ther are two intances of SOAPAsynchRequest,SOAPAsynchResponse and MQOutput and MQInput
but I am geeting error in CompositeMQtoSOAPFlow.MQInout node set to listen to MQOutput node of CompositeFanoutFlow is returning nulll body even though I ahve set the node correctly
Can anybody help me in this regard
Thanks |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 10, 2013 6:31 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There's a Sample for Asynchronous Web Service aggregation.
It's pretty complete, and it's a fairly complex problem. So you might at least review the sample and validate your own implementation against it. |
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 6:46 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Hi
Thanks for replying .
I have used the sample example itself and designed my flow on that basis
I am not facing any problem in first flow i.e CompositeFanoutFlow
I am able to put the value in MQOutput node and read the value also from the same MQOutput queue but in second flow i.e CompositeMQtoSOAPFlow,
I have two different MQInput node which is listening to same queue configured as MQOutput node in first flow
I am not able to get any value from this MQInput queue in second flow i. e
CompositeMQtoSOAPFlow |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jul 10, 2013 6:47 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 7:00 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Tried with Transaction mode but still no luck |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 10, 2013 7:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
Set transaction mode to 'NO' in all nodes. |
And completely break the very intentional transaction model choices made by the aggregate fan out process? Excellent suggestion.
this pattern is complicated, and it makes sophisticated use of MQ transactions to ensure that all requests are produced correctly before any web services are invoked.
This means, for example, that if any single request fails to be propagated correctly, and any error at all occurs in the fan out, then no messages will be sent to any of the fanout queues.
Again, on purpose, and for very very good reason. |
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 7:04 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Can anybody provide me live tutorial or Step by Step approach to implement the same thing?? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 10, 2013 7:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ameya_nayak wrote: |
Can anybody provide me live tutorial or Step by Step approach to implement the same thing?? |
If you've taken and imported the sample and then modified it to match your specific situation, you've done the right thing and merely now need to troubleshoot your implementation.
First thing to make sure is that all MQOutput nodes in the fan out flow are actually called with the correct data, and that the fanout flow completes without throwing any errors.
Until you get that working correctly, none of the fan out messages will go to the respective webservice request flows. This is, again, on purpose. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jul 10, 2013 8:29 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqjeff wrote: |
lancelotlinc wrote: |
Set transaction mode to 'NO' in all nodes. |
And completely break the very intentional transaction model choices made by the aggregate fan out process? Excellent suggestion.
this pattern is complicated, and it makes sophisticated use of MQ transactions to ensure that all requests are produced correctly before any web services are invoked.
This means, for example, that if any single request fails to be propagated correctly, and any error at all occurs in the fan out, then no messages will be sent to any of the fanout queues.
Again, on purpose, and for very very good reason. |
Setting transaction mode to no is a valid troubleshooting technique as it will identify if a rollback preventing the messages from being sent. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 10, 2013 8:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
mqjeff wrote: |
lancelotlinc wrote: |
Set transaction mode to 'NO' in all nodes. |
And completely break the very intentional transaction model choices made by the aggregate fan out process? Excellent suggestion.
this pattern is complicated, and it makes sophisticated use of MQ transactions to ensure that all requests are produced correctly before any web services are invoked.
This means, for example, that if any single request fails to be propagated correctly, and any error at all occurs in the fan out, then no messages will be sent to any of the fanout queues.
Again, on purpose, and for very very good reason. |
Setting transaction mode to no is a valid troubleshooting technique as it will identify if a rollback preventing the messages from being sent. |
In much the same way that disabling chlauth on a qmgr will identify that chlauth is preventing a qmgr.
Doesn't mean that it's a good idea, and doesn't mean that it helps you actually solve the real problem.
A rollback preventing messages from being sent would also be generating error messages from the fan out flow, in the same way that a chlauth failure should be generating authorization messages in the mq log.
You should troubleshoot the error messages, rather than throwing out the baby with the bathwater. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jul 10, 2013 9:17 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Poor flows have no Trace nodes. Adding Trace nodes would help narrow the root cause and help the developer understand what the flow is actually doing.
I would venture to say that some nodes' terminals are left unconnected also. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 9:48 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Thanks for the reply
It seems that ther is some issue in my Compositefanoutflow.
I tried my Compositefanoutflow using the same request given is SAMPLE aggregation flow and its working but it seems that I am doing something wrong while sending .XML file.
Here is what I am trying
XML file structure
<CompositeRequest>
<ssaCompositeRequest>
</ssaCompositeRequest>
<ReverifyAgency3InitVerifRequest>
</ReverifyAgency3InitVerifRequest>
</CompositeRequest>
<ssaCompositeRequest> will have request parameter for ssaComposite web service and <ReverifyAgency3InitVerifRequest> will have request parameter for verifyAgency Web service
I will be passing this .XML file to HTTPInput node which will have connection to AggregateControl node in Compositefanoutflow flow
After that I have created two different mapping file
One Mapping file will ahve mapping from ssaCompositeRequest to <SSACompositeRequest> tag .
Note: SSACompositeRequest tag is cretaed using messageModel for WSDL file.
Same I ahve done for another mapping and both Mapping have coonection to two different MQOutput node
but ther are some issues here
Can anybody tell me whats the right approach if you want to implement the same
One Mapping file will ahve map from |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 10, 2013 9:55 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Put trace nodes in your flow before the fanout mqoutputs.
Enable debugger, watch your flow. Look for errors. |
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 9:57 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
Here is waht I am getting
ExceptionList
RecoverableException
File:CHARACTER:F:\build\slot2\S800_P\src\DataFlowEngine\ImbDataFlowNode.cpp
Line:INTEGER:1154
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:CompositeMQtoSAOP#FCMComposite_1_9
Label:CHARACTER:CompositeMQtoSAOP.Queue: WSAGGREGATIONSAMPLE.OUT
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\slot2\S800_P\src\DataFlowEngine\ImbTraceNode.cpp
Line:INTEGER:362
Function:CHARACTER:ImbTraceNode::evaluate
Type:CHARACTER:ComIbmTraceNode
Name:CHARACTER:CompositeMQtoSAOP#FCMComposite_1_2
Label:CHARACTER:CompositeMQtoSAOP.Trace1
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
ParserException
File:CHARACTER:F:\build\slot2\S800_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCParser.cpp
Line:INTEGER:1005
Function:CHARACTER:ImbXMLNSCParser::parseFirstChild
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5009
Text:CHARACTER:XML Parsing Errors have occurred
ParserException
File:CHARACTER:F:\build\slot2\S800_P\src\MTI\MTIforBroker\GenXmlParser4\ImbXMLNSCDocHandler.cpp
Line:INTEGER:702
Function:CHARACTER:ImbXMLNSCDocHandler::handleParseErrors
Type:CHARACTER:ComIbmMQInputNode
Name:CHARACTER:CompositeMQtoSAOP#FCMComposite_1_9
Label:CHARACTER:CompositeMQtoSAOP.Queue: WSAGGREGATIONSAMPLE.OUT
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5004
Text:CHARACTER:An XML parsing error has occurred while parsing the XML document
Insert
Type:INTEGER:2
Text:CHARACTER:1504
Insert
Type:INTEGER:2
Text:CHARACTER:2
Insert
Type:INTEGER:2
Text:CHARACTER:1
Insert
Type:INTEGER:2
Text:CHARACTER:1
Insert
Type:INTEGER:5
Text:CHARACTER:An invalid XML character (Unicode: 0x50) was found in the prolog of the document.
Insert
Type:INTEGER:5
Text:CHARACTER:/Root/XMLNSC |
|
Back to top |
|
 |
ameya_nayak |
Posted: Wed Jul 10, 2013 10:04 am Post subject: |
|
|
Apprentice
Joined: 10 Jul 2013 Posts: 26
|
This is result of one trace after One mapping
( ['xmlnsc' : 0x145fd630]
(0x01000000:Folder)http://vilpsav.ee.sim.dsh.cms.hhs.gov:ReverifyAgency3InitVerifRequest = (
(0x01000000:Folder )http://vilpsav.ee.sim.dsh.cms.hhs.gov:CaseNumber =
(0x01000000:Folder )http://vilpsav.ee.sim.dsh.cms.hhs.gov:RequestedCoverageStartDate = (
(0x03000100:Attribute )http://www.w3.org/2001/XMLSchema-instance:type = 'xs4xs:string' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
)
(0x01000000:Folder )http://vilpsav.ee.sim.dsh.cms.hhs.gov:FiveYearBarApplicabilityIndicator =
(0x01000000:Folder )http://vilpsav.ee.sim.dsh.cms.hhs.gov:RequesterCommentsForHub =
(0x01000000:Folder )http://vilpsav.ee.sim.dsh.cms.hhs.gov:CategoryCode =
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:out = 'http://vilpsav.ee.sim.dsh.cms.hhs.gov' (CHARACTER)
)
)
This is result of another trace after another mapping
(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x145fdd10]
(0x01000000:Folder)http://ssac.ee.sim.dsh.cms.hhs.gov:SSACompositeRequest = (
(0x01000000:Folder )http://extn.ssac.ee.sim.dsh.cms.hhs.gov:SSACompositeIndividualRequest = (
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:Person = (
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:PersonName = (
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:PersonGivenName =
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:PersonMiddleName =
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:PersonSurName =
)
)
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:RequestCitizenshipVerificationIndicator =
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:RequestIncarcerationVerificationIndicator =
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:RequestTitleIIMonthlyIncomeVerificationIndicator =
(0x01000000:Folder)http://extn.ssac.ee.sim.dsh.cms.hhs.gov:RequestTitleIIAnnualIncomeVerificationIndicator =
)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:out = 'http://extn.ssac.ee.sim.dsh.cms.hhs.gov' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:out6 = 'http://ssac.ee.sim.dsh.cms.hhs.gov' (CHARACTER)
)
) |
|
Back to top |
|
 |
|