Using Softcoding with Business Service Methods
Softcoding within a business service requires two methods. You use the method getSoftCodingRecord to retrieve the softcoding record. You use the method _setProperty to apply the softcoding record to the web service proxy. Calling _setProperty with a softcoding value overrides hard-coded values that might have been assigned in the web service proxy when it was generated.
This code sample shows how to retrieve a softcoding record and apply the softcoding value to the web service proxy:
Element softCodingValue; // Retrieve the softcoding record. The 'key' that is passed is a string confined // only by methodology. It becomes part of a multipart key to retrieve a databas // record. softCodingValue = SoftCodingRecordAccess.getSoftCodingRecord(context, this.SOFTCODING_KEY); // myPort is the Web Service Proxy myPort = new RI_AddressBookManagerHttpPortClient(); // apply the softcoding to the proxy if(softCodingValue!= null) { (Stub)myPort.getPort())._setProperty(oracle.webservices.ClientConstants.CLIENT_ CONFIG,softCodingValue); } else { // respond to missing softcoding record. Log, set default values, and/or return error. }