Hi,
I am trying to use the connector framework, rather than creating direct JCO connection to system.
I have consulted the following links (got them here on SDN):
<<https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using sap adapter for connector framework>>
<<https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/connect to sap systems.htm>>
****************************
Bottom line i use:
...
Object connectorservice =
PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
IConnectorGatewayService cgService = (IConnectorGatewayService) connectorservice;
if (cgService == null) {
response.write("Error in get Connector Gateway Service <br>");
}
try {
ConnectionProperties p = new ConnectionProperties(request.getLocale(), request.getUser());
connection = cgService.getConnection(alias, p);
} catch (Exception e) {
}
...
The connection is always null. I have checked and I can, through EP run a transaction using this system and it works.
Thanks,
Azriel
Hi,
I strongly recommend using the following document: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/jca on ep6 building portal applications.zip from the SDN
It also holds the PAR file with the portalapp.xml with the shared reference.
Best Regards,
Ran
Add a comment