|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
HTTPRequest, HTTP-POST of MRM/CWF |
« View previous topic :: View next topic » |
Author |
Message
|
mark.luebinski |
Posted: Wed Dec 13, 2006 2:18 am Post subject: HTTPRequest, HTTP-POST of MRM/CWF |
|
|
Acolyte
Joined: 27 Mar 2006 Posts: 56
|
Dear masters,
I assumed, that if I use CWF and send it with POST-Method I would get key/value-pairs with CWF-fieldNames as keys and Field-values as values.
Also the thing like
Service=ES0016&PartnerNo=12345&P&CustomerNo=001234567&...
But the node seems to make ONLY values, also the stuff like
ES001612345001234567...
The flow is: In-Queue -> compute -> HTTPRequest -> ...
The ESQL in the compute node is:
CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet = 'C3OOLBG002001';
SET OutputRoot.Properties.MessageType = 'msg_InfoScoreES0016';
SET OutputRoot.Properties.MessageFormat = 'CWF';
SET OutputRoot.MRM.ServiceNr ='ES0016';
SET OutputRoot.MRM.PartnerNo = getInfoscorePartnerNo();
SET OutputRoot.MRM.CustomerNo ='001234567';
.... [more fields]
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.Method = 'POST';
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.HTTPVersion = 'HTTP/1.1';
SET OutputLocalEnvironment.Destination.HTTP.RequestLine.RequestURL = 'http://<realExistingAdress>:<realExistingPort>/';
What do i make wrong. Sorry, it could be a RTFM-Question, but I cannot find the FM!!! Any sample source for HTTPRequest and CWF.
Thank you!!
Mark |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 13, 2006 3:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I assumed, that if I use CWF and send it with POST-Method I would get key/value-pairs |
Why did you assume that? CWF is for modelling COBOL and C records. It does not parse/write messages which contain markup.
If you want output in the 'name=value' style then you need to use the TDS physical format with Data Element Separation set to 'Tagged delimited' or 'Tagged Fixed Length'. 'name' is the TDS tag. '=' is the Tag Data Separator. 'value' is the value of the syntax element in the message tree. |
|
Back to top |
|
 |
mark.luebinski |
Posted: Wed Dec 13, 2006 3:55 am Post subject: |
|
|
Acolyte
Joined: 27 Mar 2006 Posts: 56
|
Hallo kimbert,
thank you for the fast answer.
My English is bad, so maybe I wrote my question wrong.
I have a PL/1 CWF copybook from which I use some fields - it is, why I use CWF.
Have I undestood you correct: I have to produce manually the http-Request-String, for example in a while-statement with the REFERENCE to all leafs?
(TDS would have Problems bekause of two delimiters: & and =)
And then? Must I create a simple CWF-Message with only ONE String-field?
I hoped the CWF would work like web-page, which "knows", that it has names and values and POST it up to server. And it would be super generic, I could POST every CWF and the server have to read only attributes, it needs. But it seems to be a wrong compare (CWF and web-page)
Thank you!! And sorry for my bad English.
Mark |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 13, 2006 4:09 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
No problem. I bet your English is better than any language that I speak!
You definitely need CWF to parse your input message.
You should use TDS for your output message. TDS can use a different delimiter for each complex type, so that's no problem at all. In fact, you only have one TDS delimiter ( the &). The '=' is a Tag Data Separator.
So your output message definition should look something like this:
Code: |
PostMessage [Type=PostMessageType]
PostMessageType [Data Element Separation='Tagged Delimited', Delimiter='&', Tag Data Separator='=']
ServiceNr [Tag='Service']
PartnerNo [Tag=PartnerNo]
|
|
|
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
|
|
|
|