Thursday, May 31, 2012

Getting connection to WS in connections.xml

To get connection object for the WS specified in the connections.xml, use::

WebServiceConnection wsc = (WebServiceConnection)ADFContext.getCurrent().getConnectionsContext().lookup("Name");

where Name is the reference name generated in connections.xml.

wsc.getJaxWSPort(Service.class);

where Service is the service name pointed by the connection.

No comments:

Post a Comment