Monday, 16 September 2013

Calling Java method from jar in soap UI:

1. Put the required jars in soapUI-3.5\bin\ext folder...
2. First restart SOAP UI and then execute the  code snippet....

-- sample  code---
import com.ssh.*

// Class present in the jar which is loaded from ext
GetLogs transactionLog = new GetLogs();

// sample method to call
transactionLog.getLogs("sample string");


When I was calling java method from soap UI.. initially I was getting null pointer exception for few minutes I was wondering how to go forward as there were no logs displayed.. then as we know to debug any application log is the solution..In case if anyone is getting any exception or unexpected response we can always check soapui and soapui-errors files in soapUI-3.5\bin .... Hope it helps....

No comments:

Post a Comment