Author |
Message
|
lequimm |
Posted: Fri Aug 19, 2005 1:14 am Post subject: [message flow] problem with short test for HTTP Nnodes |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
Hellow,...
I have a simple JSP page that and a short message flow.
The message flow contain two nodes : HTTPInput node and MQOutput node.
The HTTPInput node is configured like that :
Code: |
URL= http://20.111.222.3:9080/LogginProject/TestHTTPNode1.jsp
|
the output node is configured with a correct queue manager name and queue name.
and here is the JSP page :
Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="Master.css" rel="stylesheet"
type="text/css">
<TITLE>TestHTTPNode1.jsp</TITLE>
</HEAD>
<BODY>
<H1>this page test the use of the http nodes</H1>
<FORM name="form1" method ="post"><INPUT type="text" name="blabla" size="45"><BR>
<INPUT type="submit" name="Send" value="Send"></FORM>
</BODY>
</HTML>
|
it contains only a form with a textfield and the method is "post". Then when I type something and I click on submit I see no message send in the HTTPInputnode,...
I am new with this nodes, someone can tell me If I have forgot something or if I use them in a bad manner ?  |
|
Back to top |
|
 |
lequimm |
Posted: Fri Aug 19, 2005 2:01 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
I forgot to say that the domain message for the HTTPInput node is "BLOB" and the message I send is trough the html form in the JSP page is "BLABLABLA" |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 19, 2005 3:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You will need to configure your JSP page to forward the request to the broker HTTP service.
The broker HTTP Service itself is not capable of serving up JSP pages, so that "post" action won't work.
You will therefore have to use different URLS for the JSP page and the broker input node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kishoreraju |
Posted: Fri Aug 19, 2005 3:39 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
The url that u have given is not correct .
by default message broker by is listening on hhtp:\\mechinename\7080\
in node u have give the remaining url in the node.
second thing is that the jsp application should be able to post that message to the url that u have specified. |
|
Back to top |
|
 |
lequimm |
Posted: Fri Aug 19, 2005 4:00 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
Hello,
thank's for responding jefflowrey and kishoreraju,
kishoreraju,
the URL I have given is not the correct because I can't give the good one. It was only for illustration purpose. If I understand well I have to put the page in the directory \7080\ and then give as url name something like "thepage.html" and that's "thepage.html" that do the "post" ?
or would you say that the port must be 7080 and that html could be anywhere and I have then to use an url like :
Code: |
URL= http://20.111.222.3:7080/LogginProject/TestHTTPNode1.jsp
|
jefflowrey,
how can I configure the JSP page to forward the request to the broker HTTP service ? you propose that I have one html page that comunicate with the HTTPinputnode and then the JSP processing done by another page ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 19, 2005 4:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Okay, you have basically two choices.
You can either directly put requests directly to the HTTPInput node, using the broker HTTP listener service address and port followed by the partial URL that the HTTPInput node is configured for.
So, if the broker is running on machineBroker, and configured to listen to port 7080, and the HTTPInput node is configured for a url of "/HTTPTest", then you can use something to execute a POST to "http://machineBroker:7080/HTTPTest".
Or you can use a different server that processes JSPs, and build JSP pages that will accept input from users, forward the results of that input to the Broker http service (using properly configured URLs), receives replies (sent using the HTTPRequestNode) from the broker, and then displays the results to the user.
I do not believe, although I could very well be wrong, that you can use a form action to post a request from one server to another. I think you have to explicitly forward or redirect the request. The mechanisms for doing that from JSP are straight forward, and any JSP developer can tell you how. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
lequimm |
Posted: Fri Aug 19, 2005 5:21 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
thank's,
I have tried. I have put /HTTPTest in the HTTPInputnode and I post to http://machinebroker:7080/HTTPTest
submit button :method="post"
Code: |
action="http://machinebroker:7080/HTTPTest"
|
Now in debug it seems that a message in blob is arrive in the HTTPInput node,...
but when the message arrive to the MQOutput node it returns me an error in SOAP.
Code: |
<?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" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.Exception</faultcode>
<faultstring>BIP3113E: Exception detected in message flow HTTP Input (broker MBNTDI31)</faultstring>
<faultactor>/HTTPTest</faultactor>
<detail>BIP2230E: Error detected whilst processing a message in node 'HttpNodeTest.MQOutput'. : F:\build\S500_P\src\DataFlowEngine\ImbMqOutputNode.cpp: 751: ImbMqOutputNode::evaluate: ComIbmMQOutputNode: HttpNodeTest#FCMComposite_1_4 BIP2620E: Unable to write message to queue 'MB.STD.MQSI.TESTHTTP.OUT' on queue manager 'XXXXXXXX'. MQPUT failed: MQCC=2; MQRC=2097; message flow node 'HttpNodeTest.MQOutput'. : F:\build\S500_P\src\DataFlowEngine\ImbMqOutputNode.cpp: 1997: ImbMqOutputNode::putMessage: ComIbmMQOutputNode: HttpNodeTest#FCMComposite_1_4</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
|
|
Back to top |
|
 |
lequimm |
Posted: Fri Aug 19, 2005 5:28 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
maybe I got the error because I send not a SOAP message ? I have sent the string "AA" with the help of a textfield in a form. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 19, 2005 5:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
lequimm wrote: |
maybe I got the error because I send not a SOAP message ? I have sent the string "AA" with the help of a textfield in a form. |
No.
This is your error:
lequimm wrote: |
BIP2620E: Unable to write message to queue 'MB.STD.MQSI.TESTHTTP.OUT' on queue manager 'XXXXXXXX'. MQPUT failed: MQCC=2; MQRC=2097; message flow node 'HttpNodeTest.MQOutput'. |
You have to create an MQMD for the message when you receive data from something other than the MQInput node. I don't know why this is giving you a 2097, though.
There is, if I recall correctly, clear examples of how to create a good MQMD in the documentation on the HTTPInput node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
lequimm |
Posted: Fri Aug 19, 2005 5:49 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
thank's for all jefflowrey and kishoreraju, I have I think all the informations to work with theses nodes .
I will now seek on the documentation for the construction of the MQMD for http nodes and.
nice WE for all  |
|
Back to top |
|
 |
recallsunny |
Posted: Fri Aug 19, 2005 7:59 am Post subject: |
|
|
 Disciple
Joined: 15 Jun 2005 Posts: 163 Location: Massachusetts
|
To generate MQMD:
1.
Just delete the HTTP header portion from your OutputRoot (before you send it to MQoutput).
2. Open the MQOutput Advanced Properties and
Check the "New Message ID"
Check the "New Correl ID"
Select Message Contect as "Set All"
Cheers |
|
Back to top |
|
 |
kishoreraju |
Posted: Sun Aug 21, 2005 8:23 pm Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
u have to do the following on that
clear all headers in the output message
add the following code
set OutputRoot.Properties>messageDomain='XML'
set OutputRoot.MQMD.Format='MQSTR';
I hope this will work for u. |
|
Back to top |
|
 |
lequimm |
Posted: Mon Aug 22, 2005 1:38 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2005 Posts: 26
|
hellow, thank's, I have just see your new explanations and they are usefull  |
|
Back to top |
|
 |
|