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 » Setting Schema & PATH in WBIMB5.0

Post new topic  Reply to topic
 Setting Schema & PATH in WBIMB5.0 « View previous topic :: View next topic » 
Author Message
nu1
PostPosted: Mon Sep 19, 2005 10:19 am    Post subject: Setting Schema & PATH in WBIMB5.0 Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Mon Sep 19, 2005 8:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
nu1
PostPosted: Tue Sep 20, 2005 11:33 am    Post subject: Reply with quote

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
View user's profile Send private message
JT
PostPosted: Tue Sep 20, 2005 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Setting Schema & PATH in WBIMB5.0
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.