Try to use casStubs.jar classes and get the parameters of the analysis

I went into class files available in casStubs.jar and was trying to come up with a script in the AppConfig.xml to connect to the CAS server and get the State of analysis and measures. I tried this option because the com.endeca.eac.toolkit.component.cas.ContentAcquisitionServerComponent class gives me these features.

+ < id script = "CheckCrawlStatus" > +.
+ < bean-shell-script > <! [CDATA [+]

Import javax.xml.namespace.QName;
com.endeca.cas.wsdl import. *;


final String wsdlUrl = "http://" "${cas.host} '+': ' + ' ${cas.port} ' + ' / case? WSDL "; +
final name of QName = new QName ("http://endeca.com/itl/cas/2010-07", "CasCrawlerService");
CasCrawlerServiceLocator service = new CasCrawlerServiceLocator (wsdlUrl, name);
CasCrawler robot = service.getCasCrawlerPort ();

String crawlName = "myFirstCrawl";
CrawlId crawlId = new CrawlId (crawlName);

Metric [] metricArray = crawler.getMetrics (crawlId);
+ / / rest of the code to retrieve the crawl settings.

+] > < / bean-shell-script > +.
+ < /script > +.

Unfortunately, I still get connection refused to exception: ' java.net.ConnectException: connection refused ". My wsdl case load properly in my browser.
Any ideas on gaps in the code or the missing configuration in the CASE or DT or platformservices?

Thank you
Dev

Try to explicitly set endpoint to service before obtaining the port. So, if you connect to localhost:8500:

service.setCasCrawlerPortEndpointAddress ("http://localhost:8500/AR"); ")

You can substitute your host/port settings. This call is normally done through the box tool component wrappers, but since you are directly using the stubs of service, you will need to set the end point. Without this, the stubs use a test port that do not match your.

Best
Brett

Tags: Oracle Applications

Similar Questions

Maybe you are looking for