AnsweredAssumed Answered

Can't call into the NdStatelessServer with XML input

Question asked by Christopher Matthews on Jul 25, 2017
Latest reply on Jul 26, 2017 by Christopher Matthews



Attempting to upgrade from 6.10 to 7.3


We call into Blaze using the NdStatelessServer:


ruleServer.invokeService("ruleProject", "invocationPoint", null, args);


The operative thing here is 'args'.


args is an Object array (Object[])


In that array, we pass in only a single element:


                    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

                    DocumentBuilder dbl = dbf.newDocumentBuilder();

                    Document doc = dbl.parse(new InputSource(new StringReader(myXMLInput)));

                    args[0] = doc;


...where myXMLInput is a JAXB-marshalled XML String (I would have created my true input object, and then marshalled it to XML).


Let's say it looks like this:





The invocation point calls into a Blaze function, and that function takes exactly one parameter -- that is, the Object type my XML String would become if I unmarshalled it.  Let's call this parameter 'xyz'


Now, this all worked just fine in Blaze 6.10.  In 7.3, it appears that I can call into the invocationPoint, but the problem is the parameter passed into the function doesn't seem to have any data in it.


For instance, if I call this from inside my Blaze function:


print("my value is:" xyz.a); would print:

"my value is: unknown"


...which tells me the contents of the XML I am sending in are not unmarshalled correctly by the engine.


However, if I run a brUnit test from inside the Blaze 7.3 IDE (eclipse):


ruleInput is a string initially "<xyz><a>1</a></xyz>";

execute MyInvocationPoint(ruleInput as a XYZ);


...this works


I suspect I am not sending the XML into the engine correctly.  However, I am doing exactly what I did in blaze 6.10


Thanks for any help