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 » Http state message

Post new topic  Reply to topic Goto page 1, 2  Next
 Http state message « View previous topic :: View next topic » 
Author Message
sivaram
PostPosted: Sat May 20, 2006 4:14 am    Post subject: Http state message Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

I searched for http on this web and got more helpfull information. I used IA81 nettool to post the messages. If it is request and reply then i have no issues.

But i am trying to implement in the following scenario,

HttpInput --> Compute (XML formatting) --> MQ Out1/MQOut 2

MQ Out1 to maintain the state and out2 for actual backend processing.

MQ Input (backend send the responce) --> MQget (get the state message) -->compute (xml formatting) --> Http Reply

How to send the state info to MQ Out1 and how can we send the formatted message to MQ Out2?

I am looking the document. Mean while if you have any suggestion will be appriciated.

thanks,
Siva
Back to top
View user's profile Send private message
sivaram
PostPosted: Sat May 20, 2006 4:26 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

I am sorry..I saw that sample again.

I need to use compute node twice, one for service and other for state. Let me try.

Thanks,
Siva
Back to top
View user's profile Send private message
sivaram
PostPosted: Sat May 20, 2006 5:59 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

<I do not want to waste your time>

Last edited by sivaram on Sun May 21, 2006 2:21 pm; edited 2 times in total
Back to top
View user's profile Send private message
mgk
PostPosted: Sat May 20, 2006 6:22 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Have you posted all your ESQL, as the error message is generated because a datasource name was not found when used in a compute node, and I didn't notice any DB operation in your ESQL. Have you specified a DataSource that is invalid on your compute node?


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
sivaram
PostPosted: Sat May 20, 2006 6:51 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

Hi MGK,

Yes that's all my esql.
I did not specify datasource with in the compute node properties. Do i need to include any thing in the ESQL?

I am just sending an xml message and receive same xml (in feature i can use first compute1 for formatting). Please help me out what i need to setup.

thanks,
Siva
Back to top
View user's profile Send private message
sivaram
PostPosted: Sat May 20, 2006 7:00 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

<deleted all My Junk>

Last edited by sivaram on Sun May 21, 2006 2:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
sivaram
PostPosted: Sun May 21, 2006 2:17 pm    Post subject: HttpInput to legacy application to Httpreply Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

Sorry for too many posts...

As an Admin it is very difficult to go through all development documnet for our http pilot. I spent two full days to get minimum skill set to develop a flow.

We are doing Http Pilot testing for legacy systems.

Flow1:
HttpInput --> Compute --> MQOutput (Qmgr and queue names are empty, "Advanced" select messageid, Corr ID,Message context to setall and select request option with reply to Q as HTTP.LEGACY)

MQInput(HTTPOUT) --> Compute1 --> HttpReplay

Flow2 (for legacy):

MQInput (HTTP.LEGACY)-->Compute(LegacyWMQIFlow_compute1)-->MQOut (HTTPOUT).

Message Domain for MQInput node is XML.

Here is the ESQL for all 3 compute nodes,

CREATE COMPUTE MODULE WebServiceInputTestFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();
RETURN TRUE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
SET OutputRoot.HTTPInputHeader = null;
CREATE NEXTSIBLING OF OutputRoot.Properties domain 'MQMD';
SET OutputRoot.MQMD.StructID = MQMD_STRUC_ID;
SET OutputRoot.MQMD.Version = MQMD_CURRENT_VERSION;
SET OutputRoot.XML.Data.HTTPContext =
CAST(InputLocalEnvironment.Destination.HTTP.RequestIdentifier AS CHARACTER);
END;
END MODULE;


CREATE COMPUTE MODULE WebServiceInputTestFlow_Compute1
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();
RETURN TRUE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
SET OutputLocalEnvironment.Destination.HTTP.RequestIdentifier =
CAST(InputRoot.XML.Data.HTTPContext AS BLOB);
SET OutputRoot.MQMD = null;
END;
END MODULE;

CREATE COMPUTE MODULE LegacyWMQFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();
RETURN TRUE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
SET OutputRoot.XML.Data = 'NewData';
END;
END MODULE;





Using NetTool to post the message.

XML message as shown below,

<HTTPTest>
<URL>http://localhost:7080/httppost</URL>
<InputData>
<Data>Test</Data>
</InputData>
<OutputData>
<Data/>
</OutputData>
</HTTPTest>


Error getting on Nettool:

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml;charset=utf-8
Content-Length: 1169
Date: Sun, 21 May 2006 21:33:43 GMT
Server: Apache-Coyote/1.1
Connection: close

<?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</faultcode>
<faultstring>BIP3113E: Exception detected in message flow HTTP Input (broker WMB_BK) </faultstring>
<faultactor>HTTP:/httppost</faultactor>
<detail><text>Exception. BIP2230E: Error detected whilst processing a message in node 'WebServiceInputTestFlow.MQOutput'. : F:\build\S600_P\src\DataFlowEngine\ImbMqOutputNode.cpp: 782: ImbMqOutputNode::evaluate: ComIbmMQOutputNode: WebServiceInputTestFlow#FCMComposite_1_1
BIP5010E: XML Writing Errors have occurred. : F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp: 377: XmlImbParser::refreshBitStreamFromElements: ComIbmComputeNode: WebServiceInputTestFlow#FCMComposite_1_10
BIP5005E: No valid body of the document could be found. : F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp: 831: XmlImbParser::checkForBodyElement: : </text></detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Event Viewer Application Log Errors:

( WMB_BK.WebServiceInput ) No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root.


( WMB_BK.WebServiceInput ) XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.

( WMB_BK.WebServiceInput ) Error detected whilst processing a message in node 'WebServiceInputTestFlow.MQOutput'.
The message broker detected an error whilst processing a message in node 'WebServiceInputTestFlow.MQOutput'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.


( WMB_BK.WebServiceInput ) Exception condition detected on input node 'WebServiceInputTestFlow.HTTP Input'.
The input node 'WebServiceInputTestFlow.HTTP Input' detected an error whilst processing a message. The message flow has been rolled-back and a fault message returned to the requesting client. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.


I am not sure is it a problem with the nettool or my code/node properties. Please let me know if you find any thing wrong. Can i get any samples for this type of application(not MRM)?

Thanks,
Siva
Back to top
View user's profile Send private message
sivaram
PostPosted: Sun May 21, 2006 8:33 pm    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

Trace for the First flow...

HttpInput-->trace1-->Compute -->trace2 -->MQoutput

The message not going to second flow(legacy).

trace1:

(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-05-22 04:22:05.289'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'SOAP-HTTP'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml'
)
(0x01000000):HTTPInputHeader = (
(0x03000000):X-Original-HTTP-Command = 'POST http://localhost/httppost HTTP/1.1'
(0x03000000):Host = 'localhost'
(0x03000000):Content-Length = '159'
(0x03000000):Content-Type = 'text/xml'
(0x03000000):Connection = 'close'
)
(0x01000010):XML = (
(0x01000000):HTTPTest = (
(0x02000000): = '
'
(0x01000000):URL = (
(0x02000000): = 'http://localhost:7080/httppost'
)
(0x02000000): = '
'
(0x01000000):InputData = (
(0x02000000): = '
'
(0x01000000):Data = (
(0x02000000): = 'Test'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
(0x01000000):OutputData = (
(0x02000000): = '
'
(0x01000000):Data =
(0x02000000): = '
'
)
(0x02000000): = '
'
)
)
)



Trace2:

(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = FALSE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2006-05-22 04:22:05.289'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'SOAP-HTTP'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml'
)
(0x01000000):MQMD = (
(0x03000000):StructID = 'MD '
(0x03000000):Version = 2
(0x03000000):Format = ''
)
(0x01000010):XML = (
(0x01000000):HTTPTest = (
(0x02000000): = '
'
(0x01000000):URL = (
(0x02000000): = 'http://localhost:7080/httppost'
)
(0x02000000): = '
'
(0x01000000):InputData = (
(0x02000000): = '
'
(0x01000000):Data = (
(0x02000000): = 'Test'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
(0x01000000):OutputData = (
(0x02000000): = '
'
(0x01000000):Data =
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x01000000):Data = (
(0x01000000):HTTPContext = (
(0x02000000): = 'X'414d51205346425f574d422020202020375e70442000ea13''
)
)
)
)
Back to top
View user's profile Send private message
mgk
PostPosted: Mon May 22, 2006 1:20 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

The key part of the error message is:
Quote:
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.


This is caused by the lines:
Code:
SET OutputRoot = InputRoot;
SET OutputRoot.XML.Data = 'NewData';


and:
Code:
SET OutputRoot.XML.Data.HTTPContext = ...


According to your input message you posted it should be:
Code:
SET OutputRoot = InputRoot;
SET OutputRoot.XML.HTTPTest.Data = 'NewData';


and:
Code:
SET OutputRoot.XML.HTTPTest.Data.HTTPContext = ...


Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
sivaram
PostPosted: Mon May 22, 2006 6:55 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

Hi MGK,

Thank you very much. Now i can see the responce.

You save my weekend effort.

Thanks again,
Siva
Back to top
View user's profile Send private message
sivaram
PostPosted: Wed May 24, 2006 8:34 pm    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

How to remove http Identifier from the http reply?

Input: <HTTPTest>
<URL>http://localhost:7080/httppost</URL>
<InputData>
<Data>Test</Data>
</InputData>
<OutputData>
<Data/>
</OutputData>
</HTTPTest>

OutPut:

HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Content-Length: 252
Date: Thu, 25 May 2006 04:24:45 GMT
Server: Apache-Coyote/1.1
Connection: close

<HTTPTest>
<URL>http://localhost:7080/httppost</URL>
<InputData>
<Data>Test</Data>
</InputData>
<OutputData>
<Data/>
</OutputData>
<Data><HTTPContext>X&apos;414d51205346425f574d4220202020205341744420001e0c&apos;</HTTPContext></Data></HTTPTest>

But i am looking for the output,
<HTTPTest>
<URL>http://localhost:7080/httppost</URL>
<InputData>
<Data>Test</Data>
</InputData>
<OutputData>
<Data/>
</OutputData>
</HTTPTest>




Also i tried different xml with the following esql,

SET OutputRoot.XML.SEC.MESSAGEID = InputRoot.XML.SEC.MESSAGEID;
SET OutputRoot.XML.SEC.OPERATORID = InputRoot.XML.SEC.OPERATORID;
SET OutputRoot.XML.SEC.PASSWORD = InputRoot.XML.SEC.PASSWORD;

i couldn't make it here.

If you use i/p -->compute-->o/p then it works.
Back to top
View user's profile Send private message
sourdas2
PostPosted: Wed May 24, 2006 11:45 pm    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Hi,
Instead of solving the previous problem by reconstructing the ESQL as said by mgk, alternative method is to modify HttpRequest node advance property..

set request message location in tree = InputRoot.XML.HTTPTest.InputData
set response message location in tree = OutputRoot.XML.HTTPTest.OutputData

Uncheck the the boxes "use whole input mesaage as request" and "Replace input message with webservice response" and check the rest boxes.
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
sivaram
PostPosted: Thu May 25, 2006 4:00 am    Post subject: Reply with quote

Novice

Joined: 20 May 2006
Posts: 15

Hi,

Do i need to use httpRequest for that?

I have ony HttpInput and HttpRepy in the picture.

Some reason the output come up with httpcontext info.

Do i need to use Copy header instead of copy entire message.

You can see my Esql and fow logic from the above post.
Back to top
View user's profile Send private message
sourdas2
PostPosted: Thu May 25, 2006 6:10 am    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

yes for implementing that you need a Httprequest node. I thought you are also using MB for webservice client. You can ignore the part.

If you don't want to include that in your out put xml ,set it to null.
Code:

SET InputRoot.XML.HTTPTEST.Data.HTTPContext = NULL;

_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
sourdas2
PostPosted: Thu May 25, 2006 6:13 am    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Sorry, typing mistake...the esql will be SET OutputRoot..... rather than InputRoot.
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Http state message
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.