|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Setting Schema & PATH in WBIMB5.0 |
« View previous topic :: View next topic » |
Author |
Message
|
nu1 |
Posted: Mon Sep 19, 2005 10:19 am Post subject: Setting Schema & PATH in WBIMB5.0 |
|
|
Apprentice
Joined: 28 Nov 2003 Posts: 26
|
HI
I Created a Message flow project.
I created a message flow(Input Node, Compute Node, Output Node) with default schema.
Then I created a Broker Schema "com.sampleschema"
I created a SampleProcedure in SampleProcedure.esql giving schema name com.sampleschema.
************************************
BROKER SCHEMA com.sampleschema
CREATE PROCEDURE SampleProcedure(INOUT OutRef REFERENCE)
BEGIN
SET OutRef.message='Hello';
END;
************************************
From the message flow (with default Schema) I tried calling this procedure
I have the esql file
****************************************
PATH com.sampleschema;
CREATE COMPUTE MODULE Samplemsgflow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE numHeaders INTEGER CARDINALITY(InputRoot.*[]);
WHILE i < numHeaders DO
SET OutputRoot.*[i] = InputRoot.*[i];
SET i = i+1;
END WHILE;
CREATE FIELD OutputRoot.XML."Outgoing";
DECLARE OutRef REFERENCE TO OutputRoot.XML."Outgoing";
CALL SampleProcedure(OutRef );
RETURN TRUE;
END;
END MODULE;
************************************************
I am receiving this error when I tried to depoly the msg flow project
BIP2402E: Syntax error: 'keyword Create'
BIP4121E: The State text was'CREATE SCHEMA ""PATH com.sampleschema;
CREATE COMPUTE MODULE ......
Though I have coded anything like was'CREATE SCHEMA ""PATH com.sampleschema I am repeatedly getting the error pointing to this.
How should I call a procedure in different schema?
WHat should I set for this in my main esql file?
Please let me know if you have ideas to resolve this error.
Appreciate your help in advance.
Regards
-nu1 _________________ -nu1 |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon Sep 19, 2005 8:36 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
You should have "BROKER SCHEMA <schema name>" as the first line of your schema ESQL file....
When referencing from your compute, first go to project Properties-->Project References and add the schema set.
Then on using CALL.... on doing a Ctrl+Space you should find the <schema name> in the list....So your CALL should be something like
CALL <schema name>.SampleProcedure(OutRef );
Try and let us know.
Regards. |
|
Back to top |
|
 |
nu1 |
Posted: Tue Sep 20, 2005 11:33 am Post subject: |
|
|
Apprentice
Joined: 28 Nov 2003 Posts: 26
|
Properties-->Project References and added the project that has the schema to the present project
In the compute node esql, after CALL on doing a Ctrl+Space I was able to find the <schema name> in the list.
But when I tried to deploy
I tried it but still getting the same errors when deploying
BIP2402E: Syntax error: keyword Create
BIP4121E:
configuration of the copute node failed due to errors in SQL expression.
The Statement text was CREATE SCHEMA ""PATH com.sampleschema
when deploy the message flow and procedure. _________________ -nu1 |
|
Back to top |
|
 |
JT |
Posted: Tue Sep 20, 2005 12:10 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
'PATH' is a clause on the BROKER SCHEMA statement, so I think your code should be:
Quote: |
SCHEMA com.sampleschema
CREATE PROCEDURE SampleProcedure(INOUT OutRef REFERENCE)
BEGIN
SET OutRef.message='Hello';
END;
************************************
From the message flow (with default Schema) I tried calling this procedure
I have the esql file
****************************************
BROKER SCHEMA com.whatever.name.you.want PATH com.sampleschema;
CREATE COMPUTE MODULE Samplemsgflow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE numHeaders INTEGER CARDINALITY(InputRoot.*[]);
WHILE i < numHeaders DO
SET OutputRoot.*[i] = InputRoot.*[i];
SET i = i+1;
END WHILE;
CREATE FIELD OutputRoot.XML."Outgoing";
DECLARE OutRef REFERENCE TO OutputRoot.XML."Outgoing";
CALL SampleProcedure(OutRef );
RETURN TRUE;
END;
END MODULE; |
|
|
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
|
|
|
|