08-13-2012 11:54 AM
Hi,
I have a question is it possible to add an application to a SoftwareConfiguration over th BWS?
I have found some function, but they don't work.
GetSWConfigsRequest request = new GetSWConfigsRequest();
request.setMetadata(_meta);
//get all SWConfigs
request.setName("SC_Sample_APP");
request.setLoadApplicationSettings(true);
request.setLoadDeviceSettings(true);
GetSWConfigsResponse response = _myCoreWSStub.getSWConfigs(request);
if (response.getReturnStatus().getCode().compareTo("S UCCESS") != 0){
System.out.println("Error occurred: " + response.getReturnStatus().getMessage());
}
for (SWConfig itr: response.getSwConfigs()) {
if (itr.getLocaleNameAndDescription() == null) {
continue;
}
for (LocaleNameAndDescription localeNameAndDesc: itr.getLocaleNameAndDescription()) {
if (_meta.getLocale().equalsIgnoreCase(localeNameAndD esc.getLocale())) {
System.out.println(localeNameAndDesc.getName());
break;
}
}
ApplicationSettings applicationSettings = new ApplicationSettings();
applicationSettings.setApplication(getSWConfigAppl ications());
ObjectDeliveryMode deliveryMode = new ObjectDeliveryMode();
deliveryMode.setPUSH(true);
applicationSettings.setObjectDeliveryMode(delivery Mode);
DeliveryTransportType deliveryTransportType = new DeliveryTransportType();
deliveryTransportType.setWIRELESS(true);
applicationSettings.setObjectDeliveryTransport(del iveryTransportType);
ApplicationDisposition applicationDisposition = new ApplicationDisposition();
applicationDisposition.setALLOWEDANDREQUIRED(true) ;
applicationSettings.setSelectedApplicationDisposit ion(applicationDisposition);
ApplicationControlPolicyType applicationControlPolicyType = new ApplicationControlPolicyType();
applicationControlPolicyType.setAPPLICATION(true);
applicationSettings.setSelectedApplicationControlP olicyType(applicationControlPolicyType);
itr.getApplicationSettings().add(applicationSettin gs);
System.out.println(itr.getApplicationSettings().ge t(0).getSoftwareConfigurationApplicationKey());
System.out.println(itr.getApplicationSettings().ge t(0).getObjectDeliveryTransport().getValue());
System.out.println(itr.getApplicationSettings().ge t(0).getSelectedApplicationControlPolicyType().get Value());
System.out.println(itr.getApplicationSettings().ge t(0).getSelectedApplicationDisposition().getValue( ));
System.out.println(itr.getApplicationSettings().ge t(0).getApplicationControlPolicy().getOrganization Uid());
}Thanks in advance.
Benjamin
Solved! Go to Solution.
08-13-2012 12:15 PM
Hi Benjamin,
No this is currently not supported. In your code you are modifying the client-side objects but are not triggering any change on the BAS, what needs to be added is a call in BWS to specifically add applications.
08-14-2012 06:52 AM
Hi Garett,
first thanks for the answer.
Can you say me if there is any function in planing within the next releases?
Thanks in advance.
Benjamin
08-14-2012 08:58 AM
I can't say for sure. THis has been asked for in the past so the internal developers are aware of the request. I would recommend keeping watch of the newest BWS releases.
08-14-2012 09:24 AM
Hi Garett,
thanks this sounds good.
I'm also need a BWS function to define and add an Application Policy. ;-)
Is it possible that if you watch the newest BWS release to look also for such an function?
Thanks in advance.
Benjamin
08-14-2012 09:28 AM
08-14-2012 09:44 AM
Hi Garett,
Is it possible that a part of oyur last post got lost?
Thanks a lot.
Benjamin
08-14-2012 09:45 AM
Could you clarify what you think may have been lost? You asked if another new feature may be added in the next release, I can't mention when new features may be released so said to watch the released documentation to see what new features are available.
08-14-2012 09:52 AM
Sorry, with lost I have mean the link to the released document.