I am trying to call a java service(JS2) from the java service (JS1). I am able to call the service but the parameter passed while calling are not received in the called service. Below is my code.
It seems that in Java Service 1 you created an IData object and sent it as the input pipeline to Java Service 2 but in the later you are expecting that IData as an object in the input pipeline.
Maybe you should use:
Java Service 2 Code
String i ="";
IDataCursor pipelineCursor = pipeline.getCursor();
//IData parentDoc = IDataUtil.getIData(pipelineCursor, "parentDoc");
//if (parentDoc != null){
//IDataCursor tvCursor = parentDoc.getCursor();
i = IDataUtil.getString(pipelineCursor , "Test"); // "Test" is already in the service pipeline
pipelineCursor.destroy();
//}
As I said: if you specify a document as the parameter when calling doInvoke, then it will be available as “pipeline” in the called service. If you want to pass the document “parentDoc” in the pipeline, then create another IData, say “callPipeline”, put parentDoc there and then specify callPipeline as the parameter.