Thursday, November 21, 2019

Configure the JDeveloper Keystore to Access an Oracle SaaS Application SSL RESTful Web Service

In the following steps, configure the Oracle Sales Cloud SSL Certificate in Oracle JDeveloper.
  1. Sign in to your Oracle Cloud service.
  2. In a web browser, go to a RESTful API resource URL of your Oracle Sales Cloud instance. For example, to access the Opportunities resource, open:
    https://my-crm-server:crm-port/salesApi/resources/latest/opportunities/
  3. Click the SSL icon that appears in your browser navigation bar. For example, in Firefox it appears as a Lock icon. Click More information .
  4. In the Security tab, click View Certificate, and then click the Details Tab.
  5. Click Export. Save the file with the .crt extension in your preferred location.
  6. In Oracle JDeveloper, click the Tools menu, and then select Preferences.
  7. Click Credentials and locate the Client Trusted Certificate Keystore file.
  8. Open a command prompt with administrative privileges (in Windows, run cmd and then press control+shift enter).
  9. Navigate to the /bin sub-folder in your JRE installation folder, and run the following command:
  10. Where YOUR_FILE_NAME is an arbitrary name you choose, PATH_TO_THE_CERT_FILE_YOU_DOWNLOADED is the path to the Certificate you downloaded in step 4, and PATH_TO_THE_JDEVELOPER_KEYSTORE is the path to the JDeveloper Keystore from step 6. DemoTrustKeyStorePassPhrase is the textual passphrase for the default DemoTrust.jks (client trusted certificate keystore).
  11. The Oracle Sales Cloud Certificate is added to your local development environment, and it can be used to develop and test your Java application locally.

call rest api using java code

package cloud.interworks.bss.api.client;

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
import org.json.JSONObject;

public class Main {
 
    private static final String BASE_URL = "http://beta.gocloud360.net";
    private static final String CLIENT_ID = "c5378d41-c97d-490e-868e-83667e2f530e";
    private static final String CLIENT_SECRET = "vvDzsClZZ/V3f4TM1SmkFgCfbesY8bPMYGO4TwSWfKw=";
    private static final String USERNAME = "dev_test";
    private static final String PASSWORD = "dev_test";

    public static void main(String[] args) {
        try {
            // Get access token.
            System.out.println("Starting request for access token..");
            String token = getAccessToken();
            System.out.println("Successfully received access token..\n\n" + token);
         
            // Make the API call.
            System.out.println("\n------------------------------\nStarting API call..");
            int accountID = 1;
            String response = getAccountData(token, accountID);
            System.out.println("Successfully called API method..\n\n" + response);
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
 
    private static String getAccessToken() throws Exception {
        URL url = new URL(BASE_URL + "/oauth/token");
        HttpURLConnection conn = (HttpURLConnection)url.openConnection();
        conn.setRequestMethod("POST");
        String base64Input = CLIENT_ID + ":" + CLIENT_SECRET;
        String encoded = Base64.getEncoder().encodeToString(base64Input.getBytes());
        conn.setRequestProperty("Authorization", "Basic " + encoded);
     
        String params = "grant_type=password&username=" + USERNAME + "&password=" + PASSWORD;
        conn.setDoOutput(true);
        try (DataOutputStream os = new DataOutputStream(conn.getOutputStream())) {
            os.writeBytes(params);
            os.flush();
        }
     
        StringBuilder sb = new StringBuilder();
        try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
            String line;
            while((line = br.readLine()) != null) {
                sb.append(line);
            }
        }
     
        JSONObject json = new JSONObject(sb.toString());
        return json.getString("access_token");
    }
 
    private static String getAccountData(String token, int accountID) throws Exception {
        URL url = new URL(BASE_URL + "/api/accounts/" + accountID + "/syncoptions");
        HttpURLConnection conn = (HttpURLConnection)url.openConnection();
        conn.setRequestMethod("GET");
        conn.setRequestProperty("Authorization", "Bearer " + token);
conn.setRequestProperty("X-Api-Version", "latest");
     
        StringBuilder sb = new StringBuilder();
        try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
            String line;
            while((line = br.readLine()) != null) {
                sb.append(line);
            }
        }
     
        return sb.toString();
    }
}

Can E1 Orchestrator replace WebServices?

Key Features of JD Edwards EnterpriseOne Orchestrator
  1. Form Services: invoke any series of JDE applications; with Orchestrator you can include multiple applications calls in the same Form Service.
  2. Data Service: query data from any table or business view; aggregate data from any table or business view
  3. Connectors: the ability to call any external RESTful endpoint
  4. Watchlist Service: Orchestrator allows you to run any watchlist remotely
  5. Notification Service: send emails using JDE email configuration
  6. Scripting: uses Groovy scripts to extend the Orchestrator functions

Business Benefits of EnterpriseOne Orchestrator
  • IoT: An interface between IoT devices and JD Edwards EnterpriseOne applications
  • REST Integration: An inbound/outbound, REST-based integration platform to Oracle Cloud services and third-party systems
  • Data Integrity: A guardian over your data for accuracy, currency, and consistency
  • Bot: A “bot” for automating tedious, error-prone processes
  • Notifications: A notification engine that ensures you never miss important updates

With all those awesome features, E1 Orchestrator is ready to be part of your integration projects. The real question is could it replace SOAP WebServices and become the main interface between JD Edwards and third-party applications, such as Cloud, Mobile & IoT? Though we can see it happening soon, it’s not likely today.
The WebServices call business functions directly & hence are faster than Form Services and support more workload. However, that's not the end of it; what if the orchestrations could be scheduled? Send notifications to users directly through the JDE Web UI? Connect to other databases? The possibilities are endless! 

Monday, November 18, 2019

BSSV or AIS Server

does the BSSV or AIS server better solve whatever need you to have in JD Edwards? If you’re in search of something to simply integrate with external applications, BSSV could work for you. (To make things even easier, Oracle has a set of pre-built EnterpriseOne Business Services for you.) However, if you need to integrate with social networks, smart devices, or IoT devices, consider the AIS server. Why?
Keep in mind that SOAP (which BSSV need to work) is a bit sluggish on mobile, social, and “chatty” apps, i.e. apps that require a lot of communication between client machines and central servers. The AIS server, on the other hand, uses a lightweight REST over JSON engine. Because it’s more lightweight, AIS is preferred for consumer touchpoints and IoT devices where you need real-time/nearly real-time integration speeds. (JD Edwards’ IoT Orchestrator makes things a lot easier, too

BSSV

Business Services opens up the world of Java to EnterpriseOne and opens E1 up to the web so that web applications are able to call E1 seamlessly using SOAP. A very robust framework, the BSSV server is built on top of a Java platform and allows users to execute self-contained stateless business functions like “Get Item List Price” as a web service. Users can also create new custom business services like “Generate Sales Order,” calling the base E1 master business functions to validate and create the Sales Order within E1.
For calling 3rd-party applications, Business Services can either use SOAP-based web services or Restful Services/JSON to connect EnterpriseOne to external applications.

AIS Server

An AIS server communicates between JDE EnterpriseOne and other AIS server clients. This type of server is perfect for clients or software languages that use JSON over REST. Clients that use an AIS server to interact with EnterpriseOne include:
  • Apps created with the AIS Client Java API
  • Components created using the Oracle Java Extension Toolkit (JET) that can run inside EnterpriseOne UX One pages
  • EnterpriseOne mobile apps created using the Oracle Mobile Application Framework (MAF)
  • EnterpriseOne apps created with the Oracle Application Development Framework (ADF)
  • IoT devices

Tuesday, July 16, 2019

For any kind of JDE or BSSV freelancing work contact kishorjdedwards@gmail.com.
We also provide a solution in IOT ,ADF and latest technologies.

Steps for creating, deploying, testing and debugging a Provider BSSV:



Link for details document

https://drive.google.com/open?id=1qGDSGvzSUJPcAfMIR2dE6n-B4PpfSH9Q

or send request mail on kishorjdedwards@gmail.com for complete document with screenshots.

1.) Create a BSSV Published Object through OMW:
 Open OMW
 Click Add
 Select Business Function
 Click Ok
 Enter followings and click Ok.

Image 1 in attached doc

2.) Create a BSSV Internal Object through OMW:
 Open OMW
 Click Add
 Select Business Function
 Click Ok
 Enter followings and click Ok. Click one more time.

3.) Launching JDeveloper using Published Object:
 Select the Object
 Click on Design -> Design Tools -> JDeveloper Install Path
 Enter path till ……. \Oracle\Middleware
 Invoke JDeveloper
4.) Adding Internal Object to JDeveloper:
 Select DV910
 Right Click
 Select New Enterprise One Project
 Enter Credentials
 Find Object
 Click on Finish.

5.) Create Published BSSV Value Objects:
 Select Project(JP550011)
 Right Click
 Select New
 Select Enterprise One -> Class
 Business Function Value Object Class
Give Business Function name.
 Select required parameters
 Click finish. Wizard will generate the code.
 Generate accessors
 Click on save button
6.) Create Internal BSSV Value Object:
 Select Project(J5500011)
 Right Click
 Select New
 Select Enterprise One -> Class
 Business Function Value Object Class
 Give Business Function name.
 Select required parameters
 Click finish. Wizard will generate the code.
 Generate accessors
 Click on save button

7.) BSSV Manager Class:
 Select JP550011
 Right Click
 Select New
 Select EnterpriseOne -> Class
 Select Published Business Service Class
Give name, method name, I/P and O/P parameters.
 Click Ok. Wizard will generate the code.


Wizard will generate the following code:
package oracle.e1.bssv.JP550011;
Nikhil Yadav, KPIT Technologies Solution Limited Page 11
import oracle.e1.bssv.JP550011.valueobject.GetExchRate_Input;
import oracle.e1.bssv.JP550011.valueobject.GetExchRate_Output;
import oracle.e1.bssvfoundation.base.IContext;
import oracle.e1.bssvfoundation.base.PublishedBusinessService;
import oracle.e1.bssvfoundation.connection.IConnection;
import oracle.e1.bssvfoundation.exception.BusinessServiceException;
import oracle.e1.bssvfoundation.util.E1MessageList;
/**
* TODO: Java Doc for PublishedBusinessService

Nikhil Yadav, KPIT Technologies Solution Limited Page 13
finishPublishedMethod(context, "getExchRateData");
//return outVO, filled with return values and messages
return confirmVO;
} finally {
//Call close to clean up all remaining connections and resources.
close(context, "getExchRateData");
}
}
}
Add the code below to your code:

//TODO: Create a new internal value object.
GetExchRate_Internal internalVO = new GetExchRate_Internal();
//call mappings from Published Business Service to BSSV VO
E1MessageList mapMessages = internalVO.mapFromPublished(context,connection,vo);
//add messages from mappings to message list
messages.addMessages(mapMessages);
//TODO: Call BusinessService passing context, connection and internal VO
E1MessageList bssvMessages = GetExchRateProcessor.getExchRateBSFNCall(context, connection, internalVO);

8.) Internal BSSV Processor class:
 Select J5500011
 Right Click
 Select New
 Select EnterpriseOne -> Class
 Select Business Service Class
 Give name, method name, I/P parameters.
 Click Ok. Wizard will generate the code.



all details steps along with screenshot are added in the attached doc .
If you are unable to download doc ,mail me at below .

Any kind od bssv query mail to kishorjdedwards@gmail.com, I will try to reply asap.

Monday, November 7, 2016

how to debuge consumer bssv

test calss is below :

package oracle.e1.bssv.JC550001;

import oracle.e1.bssvfoundation.base.TestBusinessService;
import oracle.e1.bssvfoundation.connection.IConnection;

public class TestmyMCSSessionId {

    public static void main(String[] args) {
        TestmyMCSSessionId testmyMCSSessionId = new TestmyMCSSessionId();
        try {
            //call required prior to executing test from application (main())
            TestBusinessService.startTest();
            String file =
                "C:\\e900\\DV900\\java\\source\\oracle\\e1\\bssv\\JC550001\\valueobject\\InternalmyMCSSessionId.xml";
            TestBusinessService.callBSSVWithXMLFile("oracle.e1.bssv.JC550001.RI_myMCSSessionIdProcessor",
                                                    "getmyMCSSessionId", file,
                                                    IConnection.AUTO);
        } finally {
            //call required at the end of testing from application (main())
            TestBusinessService.finishTest();
        }
    }
}