on 12-16-2010 5:15 PM
Hi,
I have used the DestinationService api to create a HTTP destination this works great, but does anyone know if it is possible to create a Destination Template rather than a HTTP destination?
I have tried the following code but this all seems specific to HTTP destinations only:
// Fetch destination service instance
DestinationService dstService = null;
try {
dstService = DestinationServiceLocator.getInstance();
} catch (DestinationException e) {
// handle exception that can occur when intance has not yet been initialized
System.out.println("Destination service instance not yet initialized ... tough luck!");
}
// Create an empty destination of type HTTP
Destination dst = dstService.createDestination("WSDL");
HTTPDestination httpDst = (HTTPDestination) dst;
httpDst.setUrl("http://www.google.com");
httpDst.setName("MyTestDestination");
httpDst.setUsernamePassword("admin", "secretadminpass");
if (dstService.existsDestination("HTTP", "MyTestDestination")) {
// If destination exists already, update it in the destination service storage
dstService.updateDestination("HTTP", httpDst);
} else {
// If destination does not yet exist, store it in the destination service storage
dstService.storeDestination("HTTP", httpDst);
}
Thanks in advance.
Related to this I was wondering if a destination could be created through the CE command line interface, I have been hunting around for documentation on this but have not found anything unfortunately. Is there any out there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.