Author |
Message
|
RaviKrG |
Posted: Mon Mar 09, 2009 11:46 am Post subject: HTTP tech for web service in MB |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Hi I am trying to do a POC for web services for the first time with the help of this link http://download.boulder.ibm.com/ibmdl/pub/software/dw/wes/0311_withers/withers.pdf
This is an old link for WBIMB HTTP tech for web services, but I am implementing in WMB6.1
I tried to use the flow for scenario 1 and 2 as
Consumer flow:
MQInput -> Compute1 -> HTTP Request -> Compute2 -> MQOutput
Provider flow:
HTTP Input -> Compute3 -> HTTP Reply
I am set all the properties for the node as described in the document and have written the esql code also as described. Created the bar file with both the flows included and deployed successfully but when I run the flow the message is transferred to Failure queue which is connected to HTTP Request Node.
During debugging got parsing error and then used the user trace and on running the flow I get error as below
BIP2231E: Error detected whilst processing a message in node 'HTTPRequestflow.HTTP Request'.
The message broker detected an error whilst processing a message in node 'HTTPRequestflow.HTTP Request'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
ParserException BIP5010E: 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.
ParserException BIP5007E: The element with name '''' and field type ''XML.Content'' is not valid as the child of Root. XML or Root.XMLNS A top level item was found that did not have type XML.Element, XML.XmlDecl, XML.DocTypeDecl, XML.Bitstream, XML.Comment, or XML.ProcessingInstruction. Each child of Root.XML or Root.XMLNS must represent a valid XML construct for the top level of an XML document. Expected field types in this position are XML.Element, XML.XmlDecl, XML.DocTypeDecl, XML.Bitstream, XML.Comment, or XML.ProcessingInstruction.
when i searched this forum then I got that there was one link which was discussed about the same POC but the error was different and now I dont remember the link.
Can any body tell whats the matter here (is the version any problem in this case)
Consumer flow:
Mqinput (Message Domain : XML)
HTTP Req (URL : http://www.ibm.com/unknown, Response Msg Parsing Message Domain : XML, Advanced tab as req msg tree as InputRoot.XML.HTTPTest.InputData and res msg tree as InputRoot.XML.HTTPTest.OutputData)
Provider flow:
HTTP Inp (URL : svc1 and Message Domain : XML)
Please let me know if I have missed out some thing which I am not able to make out.
Thanks |
|
Back to top |
|
 |
vairavan |
Posted: Mon Mar 09, 2009 1:31 pm Post subject: |
|
|
Apprentice
Joined: 22 Apr 2008 Posts: 42
|
Please check whether your WebService is running or not.
In compute1 node, what exactly you are setting into the request message...? |
|
Back to top |
|
 |
RaviKrG |
Posted: Mon Mar 09, 2009 4:51 pm Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Regarding web service running : how do I do that
compute1 node : SET OutputLocalEnvironment.Destination.HTTP.RequestURL = InputRoot.XML.HTTPTest.URL; |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Mar 09, 2009 10:24 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
RaviKrG wrote: |
Regarding web service running : how do I do that
compute1 node : SET OutputLocalEnvironment.Destination.HTTP.RequestURL = InputRoot.XML.HTTPTest.URL; |
Before someone else pipe in, why are you using the Depreciated XML parser? It is not Namespace aware and AFAIK, is pretty useless when used with webservices messages. Please recode to use the XMLNSC domain. Yes it does handle XML messages....
 _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
MQEnthu |
Posted: Mon Mar 09, 2009 10:27 pm Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
RaviKrG wrote: |
Regarding web service running : how do I do that |
Use tools like nettol or SOAPUI to ping the web server.. _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri Mar 13, 2009 12:20 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Thanks All, This issue stands closed but I still want to know one query as
In my provider flow as HTTP Input -> Compute3 -> HTTP Reply to get the trace I have put trace nodes as
HTTP Input -> Trace -> Compute3 -> Trace -> HTTP Reply
Now for Compute Node the Compute Mode setting is set to "LocalEnvironment and Message" and Trace node I have set the pattern as {Root} {LocalEnvironment}.
But now I was facing one problem as when the message and Lcaol Env values were passed first trace node then the Loc env was reset to Null.
Then I removed the all trace nodes and then It worked.
Can you please tell how can I pass the local env values from the trace to compute node |
|
Back to top |
|
 |
mgk |
Posted: Fri Mar 13, 2009 1:04 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
Lcaol Env values were passed first trace node then the Loc env was reset to Null |
Something else must have changed to cause this as Trace nodes never change the trees (other than by causing a message to be parsed) _________________ 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 |
|
 |
RaviKrG |
Posted: Fri Mar 13, 2009 1:25 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Infact I am thinking the same way mgk.
what I did now,
1) Removed all the trace nodes from the flow and the flow worked as required. (no problem faced)
2) Now again added the trace nodes in my provider flow as
HTTP Input -> Trace -> Compute3 -> Trace -> HTTP Reply
Set the Pattern as {Root} {LocalEnvironment}
3) Clean up the project 2 times.
4) Deployed the flow
5) Now I got the same result as in step 1.
But I think it I remove {LocalEnvironment} from trace node it should create the problem (I have not tried this). |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri Mar 13, 2009 1:29 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
But also to note here that Trace node was set the Destination as file and when I checked the required file generated then I got this result as
{Root}^M
{LocalEnvironment}
{Root}^M
{LocalEnvironment}
{Root}^M
{LocalEnvironment}
{Root}^M
{LocalEnvironment}
{Root}^M
Please note that there was no trace node in consumer flow(requester flow).
Is this right. |
|
Back to top |
|
 |
RaviKrG |
Posted: Fri Mar 13, 2009 1:41 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
Sorry guys I got that right .
Thanks |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Mar 13, 2009 1:56 am Post subject: Re: HTTP tech for web service in MB |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
RaviKrG wrote: |
TNow for Compute Node the Compute Mode setting is set to "LocalEnvironment and Message" and Trace node I have set the pattern as {Root} {LocalEnvironment}. |
If the compute mode specifies "LocalEnvironment", the ESQL might also need an additional statement similar to:
Code: |
SET OutputLocalEnvironment = InputLocalEnvironment; |
The trace node pattern for message trees requires a '$' character: "${Root}" and "${LocalEnvironment}". |
|
Back to top |
|
 |
|