Showing results for 
Search instead for 
Did you mean: 

Establishing an HTTP Connection Using an Existing Destination

Former Member
0 Kudos

Hi Experts,

I have created a destination in the Visual Admin say 'MyDestination'. I have tried to establish the HTTP Connection for the created Destination.

The following is my code

IWDMessageManager manager = wdComponentAPI.getMessageManager();

InitialContext ctx ;

Object obj;

DestinationService dstService;

Destination destination;

HTTPDestination httpDestination ;

HttpURLConnection httpurlconnection = null;

Properties destprop = null;

String url = "";

String username = "";

String password = "";


ctx = new InitialContext();

obj = ctx.lookup(DestinationService.JNDI_KEY);

dstService = (DestinationService) obj;

destination = dstService.getDestination("HTTP","MyDestination");

destprop = destination.getDestinationProperties();

httpDestination = (HTTPDestination) destination;

url = httpDestination.getUrl();

httpurlconnection = httpDestination.getURLConnection();


username = httpDestination.getName();


catch(Exception ce){

//manager.reportException(ce.getMessage(), false);


if (destprop == null){

url = "http://mycomp:50000/xyz.wsdl";

username = "username";

password = "password";




username = destprop.getProperty("USERNAME");

password = destprop.getProperty("PASSWORD");

wdComponentAPI.getMessageManager().reportSuccess("UserName: "username" ""Password: "password);


I end up in the following error

java.lang.NoClassDefFoundError: com/sap/security/core/server/destinations/api/Destination

at com.arteriatech.xiaddresscomp.comp.wdp.InternalXiAddressComp.<init>(

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(

at java.lang.reflect.Constructor.newInstance(

I have referred to the following Link

/message/1362119#1362119 [original link is broken]

and I am not clear of where to check; if the Jar is of Older Version and what is the newer version jar so that I need to replace the jar in the Server location C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\\comp\SAP-JEE\DCs\\tc\sec\destinations\interface\_comp\gen\default\public\default\lib\java\tc_sec_destinations_interface.jar

Please suggest a solution for this issue


Mathan MP

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos


Have you put entry in Interface references and Service references in the Web Dynpro References of your DC?

Kind Regards

Saravanan K