Deploying the Reference Implementation to the WebLogic Server

When the reference implementation (JRH90I33) is available on your deployment server, you use OMW to add it to your JDeveloper project. You then use a JD Edwards EnterpriseOne soft coding record to deploy the reference implementation to the WebLogic Server.

To deploy the reference implementation to the WebLogic Server:

Access OMW in JD Edwards EnterpriseOne.

  1. In OMW, search for and select object JRH90I33, and add the object to your project.

  2. Click Get (or Check-Out subsequently) to get the sources of the object to your local client.

  3. From OMW, invoke JDeveloper with project JRH90I33 selected.

  4. Open the Soft Coding Records application (P954000).

    If you are using a web service that is secured, you must pass values for all of the fields.

  5. If you are using an anonymous login, delete the username and password values.

    For example:

    <username></username>

    <password></password>

  6. Add the policy file, for example <Wssp1.2-2007-Https-UsernameToken-Plain.xml>, to the server domain folder location where the proxy project is deployed.

    This project RI uses the newly added API and fetches the softcoding record values as follows:

    softCodingRecord =            SoftCodingRecordAccess.getSoftCodingRecord(context, softCodingKey);                                                     
     
    use the API < getSoftcodingRecordFieldvalue(Context context,String fieldname, Element softCodingRecord )> to get the values for individual fields.
     
     // String url ="http://pc-asurendr-ptp:7001/DV812/RI_AddressBookManager";
        String url = SoftCodingRecordAccess.getSoftcoding RecordFieldvalue(context, "endpoint",softCodingRecord);                                                                  
     
               //2.String username = "weblogic";
       String username = SoftCodingRecordAccess.getSoftcoding RecordFieldvalue(context,"username", softCodingRecord);                                                                     
     
               //3.String password = "password";
       String password = SoftCodingRecordAccess.getSoftcoding                RecordFieldvalue(context,"password", softCodingRecord);                                                                     
     
              //4. Policy Name policyname = SoftCodingRecordAccess.getSoftcoding Record "Wssp1.2-2007-Https-UsernameToken-//Plain.xml";
         String policyname = Fieldvalue(context, "policy", softCodingRecord);               
                                                                         
              //5.Trustkey name
                // String trustKeyName = "DemoTrust.jks";
       String trustKeyName = SoftCodingRecordAccess.getSoftcoding                RecordFieldvalue(context,"trustkey",softCodingRecord);                                                                     
  7. Verify that the above code is added.

Note:

If you do not want to manually place the current security policy file (which is <Wssp1.2-2007-Https-UsernameToken-Plain.xml> to the WebLogic Server domain folder, where the business services server instance is installed and the proxy project is deployed, you must make the following code change in the JRH90I33 BSSV proxy project:

At line No 136 in the JRH90I33 code on Oracle Update Center, the replacement code is:

FileInputStream inbound = new FileInputsStream(policyname);
The policy name is taken from the Soft Coding Record. A sample value of policyname is:
Wssp1.2-2007-Https-UsernameToken-Plain.xml
With the above code, for the business service proxy object JRH90I33 to successfully consume a secure published business running on WebLogic Server, you must manually place the policy file in the WebLogic Server domain folder.
Note:

If you use the following code, you do not need to manually place the policy file in the WebLogic Server domain folder,

At line No 136 in the JRH90I33 code on Oracle Update Center, replace this code:

FileInputStreamInbound = new FileInputStream(policyname);
With this code:
Java.io.InputStream inbound = (new Object(().getClass().getResourceAsStream("/webLogic/wsee/policy/runtime/" + policyname);

This replacement code ensures that the policy file specified in "policyname" will be dynamically loaded when the business services proxy object running on WebLogic Server is trying to consume a secure web service, and it will use the inbound object created by the above line of code while calling the getRI_Addressbook ManagerHttpPort() API.

After you make a change, check in the modified JRH90I33 object, and build and deploy the business services package.

In summary, whenever you create a business service proxy object for a secure web service running on WebLogic Server,  use this code to dynamically load the policy file during runtime:

getClass().getResosurceAsStream("/weblogic/wsee/policy/runtime/" + policyname);