Hi,
Our java client (webLogic app server) submit multiple documents to webMethods TN. Presently we use the following code to submit xml document.
Context context = null;
context = new Context();
context.connect(server, userName, password);
IData id;
IDataCursor rc;
//Make 3 attempts to invoke webmethod service
for(int count=1; count<=3 ; count++) {
id = context.invoke(packageName, className, inputData);
//READ STATUS OF SUBMISSION TO WEBMETHODS
rc = id.getCursor();
while(rc.next()) {
if(rc.getKey().equals("StatusCode")) statusCode = (String)rc.getValue();
else if(rc.getKey().equals("StatusMsg")) statusMsg = (String)rc.getValue();
}
//NOT SUCCESSFULLY SUBMITTED
if(!statusCode.equals("0"))
throw new wMException("Invoke failed. Message:"+statusMsg);
}
This takes about 9 to 17 seconds. This is very long. We want to reduce it to 3seconds. Is it possible?
Is it better to use URL connection? Will it result in less time to submit document?
Regards,
Krishnan