on 12-28-2005 8:59 AM
Hello,
my WD application requires additional configuration resources, how can I access them in the run-time?
I've got a solution for the problem, but it seems a bit strange for me, may be there is a better way?
So the resources are stored in the DC in
./src/mimes/Components/<WDApplication package+Name>/*.xml
String confPath = "<vendor>/<dc name with '~'-s>/Components/<WDApplication package+Name>/" + xxx.xml;
String url = WDURLGenerator.getResourcePath(confPath);
myMsgMgr.reportSuccess("Configuration url: " + url + ", path: " + confPath);
Document dom = null;
try {
dom = myXMLHelper.parseXML(url);
myMsgMgr.reportSuccess("Successfully parsed");
} catch (XMLException e) {
myMsgMgr.reportException("Unable to parse configuration file " + url, true);
return;
}
Thank you in advance!
Best regards,
Nick
Have a look at <a href="https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/services/sal/config/api/IWDConfiguration.html">IWDConfiguration</a> and <a href="https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/services/sal/config/api/WDConfiguration.html">WDConfiguration</a>.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
Thanks for the answer.
Can you give me a hint what is "deployableObject" - it's referenced in many interfaces, but I could not find example what could I use as the string for my WDpro DC?
It seems IWDConfiguration is based on properties data. Where the properties files has to be stored (the same "Components/<wdapp package+name>") in DC structure?
I've got XML files, where IWDConfiguration seems to be less of help (I need at minimum byte[] access to the content of the configuration to be able to parse it). Did I miss anything?
Best regards,
Nick
I don't like these notions of deployable object/part, they are not intuitive IMHO.
You can access them using the IWDComponent interface, see https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/progmodel/api/IWDCompone...
See also
Armin
The final solution for my problem is as following:
WDDeployableObjectPart part = wdComponentAPI.getDeployableObjectPart();
String url = WDURLGenerator.getResourcePath(part, "xxx.xml");
Document dom = myXMLHelper.parseXML(url);
The resources are stored in the DC in
./src/mimes/Components/<WDApplication package+Name>/*.xml
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.