|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problems with HTTPRequest node in v6.0 |
« View previous topic :: View next topic » |
Author |
Message
|
moogoo |
Posted: Tue Feb 21, 2006 1:48 pm Post subject: Problems with HTTPRequest node in v6.0 |
|
|
Acolyte
Joined: 20 Sep 2002 Posts: 54 Location: US
|
Hi,
I'm attempting to send a HTTP request to a web server using XML data that contains a name/value pair for a simple query. I've read the following thread to get me started, but am still running into some problems:
http://www.mqseries.net/phpBB2/viewtopic.php?t=23737&postdays=0&postorder=asc&highlight=httprequest&start=0
Basically, the following URL can be used to make the request which in turn returns the desired response. It works perfectly when invoked from a web browser:
http://mif-uat.pc.ml.com:9010/HTTPClientProduct/MVHttpClientServlet?xmlMessage=<?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > <SOAP-ENV:Header> <EDSI-HDR:EDSIHeader xmlns:EDSI-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/EDSIHeader_2_0/" > <EDSI-HDR:MessageType>ProductDataServiceRequestSingleMessage</EDSI-HDR:MessageType> <EDSI-HDR:MessageTypeVersion>1.0</EDSI-HDR:MessageTypeVersion> <EDSI-HDR:TimeStamp>2006-02-10T10:16:24</EDSI-HDR:TimeStamp> </EDSI-HDR:EDSIHeader> <PRO-HDR:RequestResponseHeader xmlns:PRO-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/ProtocolHeaders_1_0/" SOAP-ENV:mustUnderstand = "1"> <PRO-HDR:CorrelationID>WebDemo123</PRO-HDR:CorrelationID> </PRO-HDR:RequestResponseHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <getproduct:ProductDataServiceLiteRequestMessage xmlns:getproduct = "http://namespace.worldnet.ml.com/EDSI/Product/Services/GetProductDataLite_v1_1/" > <getproduct:SecurityIDType>CUSIP</getproduct:SecurityIDType> <getproduct:SecurityID>459200101</getproduct:SecurityID> </getproduct:ProductDataServiceLiteRequestMessage> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
However, what I've set up as a message flow does not seem to be working correctly. Here's an overview of my flow (same as from the above link):
Input Node --> Compute1 --> HTTPRequest --> Compute2 --> Output node
Here's the code from Compute1:
DECLARE QRY CHAR '';
SET QRY = 'xmlMessage=<?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > <SOAP-ENV:Header> <EDSI-HDR:EDSIHeader xmlns:EDSI-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/EDSIHeader_2_0/" > <EDSI-HDR:MessageType>ProductDataServiceRequestSingleMessage</EDSI-HDR:MessageType> <EDSI-HDR:MessageTypeVersion>1.0</EDSI-HDR:MessageTypeVersion> <EDSI-HDR:TimeStamp>2006-02-10T10:16:24</EDSI-HDR:TimeStamp> </EDSI-HDR:EDSIHeader> <PRO-HDR:RequestResponseHeader xmlns:PRO-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/ProtocolHeaders_1_0/" SOAP-ENV:mustUnderstand = "1"> <PRO-HDR:CorrelationID>WebDemo123</PRO-HDR:CorrelationID> </PRO-HDR:RequestResponseHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <getproduct:ProductDataServiceLiteRequestMessage xmlns:getproduct = "http://namespace.worldnet.ml.com/EDSI/Product/Services/GetProductDataLite_v1_1/" > <getproduct:SecurityIDType>CUSIP</getproduct:SecurityIDType> <getproduct:SecurityID>459200101</getproduct:SecurityID> </getproduct:ProductDataServiceLiteRequestMessage> </SOAP-ENV:Body> </SOAP-ENV:Envelope>';
SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/xml';
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = 'http://mif-uat.pc.ml.com:9010/HTTPClientProduct/MVHttpClientServlet';
SET OutputRoot.XML.XML = CAST (QRY AS CHAR);
HTTPRequest node configuration:
- WebService URL: http://dummy (not used as am using the LocalEnvironment variable
- Request Timeout: 120
- Http Version: 1.1
- Message Domain: XML
Now, when I have the "Use Whole Input Message As Request" option checked, the web server complains that the inbound message on their end is empty even though OutputRoot.XML.XML is the last child of Root, after the HTTPRequest headers. When I uncheck that box and hardcode the location as "OutputRoot.XML.XML", it throws the following error:
(0x01000000):MYMQMD = (
(0x03000000):SourceQueue = 'GPB.JAMES.INPUT'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'MQSTR '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51204e59434c55533144202020206d1af44320009101'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'NYCLUS1D '
(0x03000000):UserIdentifier = 'mqmuser '
(0x03000000):AccountingToken = X'160105150000006d350c09842bf41965105a331704000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 6
(0x03000000):PutApplName = 'appwatch'
(0x03000000):PutDate = DATE '2006-02-21'
(0x03000000):PutTime = GMTTIME '21:25:11.480'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
)
(
(0x01000000):Destination = (
(0x01000000):HTTP = (
(0x03000000):RequestURL = 'http://mif-uat.pc.ml.com:9010/HTTPClientProduct/MVHttpClientServlet'
)
)
)
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-02-21 21:25:11.480'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml'
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'GPB.JAMES.INPUT'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'WSREQHDR'
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51204e59434c55533144202020206d1af44320009101'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'NYCLUS1D '
(0x03000000):UserIdentifier = 'mqmuser '
(0x03000000):AccountingToken = X'160105150000006d350c09842bf41965105a331704000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 6
(0x03000000):PutApplName = 'appwatch'
(0x03000000):PutDate = DATE '2006-02-21'
(0x03000000):PutTime = GMTTIME '21:25:11.480'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):HTTPRequestHeader = (
(0x03000000):Content-Type = 'text/xml'
)
(0x01000010):XML = (
(0x01000000):XML = (
(0x02000000): = 'xmlMessage=<?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > <SOAP-ENV:Header> <EDSI-HDR:EDSIHeader xmlns:EDSI-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/EDSIHeader_2_0/" > <EDSI-HDR:MessageType>ProductDataServiceRequestSingleMessage</EDSI-HDR:MessageType> <EDSI-HDR:MessageTypeVersion>1.0</EDSI-HDR:MessageTypeVersion> <EDSI-HDR:TimeStamp>2006-02-10T10:16:24</EDSI-HDR:TimeStamp> </EDSI-HDR:EDSIHeader> <PRO-HDR:RequestResponseHeader xmlns:PRO-HDR = "http://namespace.worldnet.ml.com/EDSI/Standards/Headers/ProtocolHeaders_1_0/" SOAP-ENV:mustUnderstand = "1"> <PRO-HDR:CorrelationID>WebDemo123</PRO-HDR:CorrelationID> </PRO-HDR:RequestResponseHeader> </SOAP-ENV:Header> <SOAP-ENV:Body> <getproduct:ProductDataServiceLiteRequestMessage xmlns:getproduct = "http://namespace.worldnet.ml.com/EDSI/Product/Services/GetProductDataLite_v1_1/" > <getproduct:SecurityIDType>CUSIP</getproduct:SecurityIDType> <getproduct:SecurityID>459200101</getproduct:SecurityID> </getproduct:ProductDataServiceLiteRequestMessage> </SOAP-ENV:Body> </SOAP-ENV:Envelope>'
)
)
)
(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S000_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 616
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmWSRequestNode'
(0x03000000):Name = 'Routing/HTTP_node_test#FCMComposite_1_3'
(0x03000000):Label = 'Routing.HTTP_node_test.HTTP Request'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x03000000):Text = 'Node throwing exception'
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S000_P\src\WebServices\WSLibrary\ImbWSRequestNode.cpp'
(0x03000000):Line = 747
(0x03000000):Function = 'ImbWSRequestNode::evaluate'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 3162
(0x03000000):Text = 'WebService Request Exception'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = ''
)
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S000_P\src\WebServices\WSLibrary\ImbWSRequestNode.cpp'
(0x03000000):Line = 596
(0x03000000):Function = 'ImbWSRequestNode::evaluate'
(0x03000000):Type = 'ComIbmWSRequestNode'
(0x03000000):Name = 'Routing/HTTP_node_test#FCMComposite_1_3'
(0x03000000):Label = 'Routing.HTTP_node_test.HTTP Request'
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 3164
(0x03000000):Text = 'Navigation to requested message location failed. Location specified was: '&1'.'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'OutputRoot.XML.XML'
)
)
)
)
)
Am I screwing something up here when referencing what should be sent to the web server? This has been driving me insane that I have not been able to get this to work when it looks relatively straight forward.
Any assistance on this would be greatly appreciated!
Thanks,
Jim |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Feb 21, 2006 2:01 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It looks to me like your servlet is expecting the entire XML in the Request URL, and you are trying to pass the XML in the Request body instead. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
moogoo |
Posted: Tue Feb 21, 2006 2:37 pm Post subject: |
|
|
Acolyte
Joined: 20 Sep 2002 Posts: 54 Location: US
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|