How to call XAPI functions directly from java ...
Copy the following JARs from SI jars directory to your Java project:
asset.jar
b2b_aee.jar
b2b_base.jar
b2b_oba.jar
ebics.jar
entities.jar
gis.jar
install_foundation.jar
mailbox.jar
maverick-all.jar
perimeter.jar
platform_activemq.jar
platform_activity.jar
platform_afc.jar
platform_afc_security.jar
platform_aop.jar
platform_asi.jar
platform_baseutils.jar
platform_dv.jar
platform_ifcbase.jar
platform_ifcui.jar
platform_osgi.jar
platform_security.jar
platform_services.jar
resources.jar
soap.jar
standards.jar
translator.jar
Add these JARs to your project build path, but not as exported JAR for compilation (they are already loaded by SI runtime, no need to add them to your binary).
Regarding, the XAPI call here is a sample:
import com.yantra.interop.japi.YIFApi;
import com.yantra.interop.japi.YIFClientFactory;
import com.yantra.interop.client.InteropEnvStub;
import com.yantra.yfc.dom.YFCDocument;
import com.yantra.interop.japi.YIFApi;
import com.yantra.interop.japi.YIFClientFactory;
import com.yantra.interop.client.InteropEnvStub;
YIFApi api = YIFClientFactory.getInstance().getLocalApi();
InteropEnvStub envStub = new InteropEnvStub("admin", "My XAPI Interface");
org.w3c.dom.Document xapiOutputDoc = api.invoke(envStub, xApiName, xapiInputDoc);
Note: xapiInputDoc has to be a org.w3c.dom.Document containing API input document
Thanks to fabiengb for this code!