Welcome Message

"The difference between a successful person and others is not a lack of strength,
not a lack of knowledge, but rather a lack in will."
-Vince Lombardi

March 1, 2010

Invoking PeS through plain Java

Hi All,

Today I would like to explain the POC that I was trying last week. Generally for connecting to PeS we have three ways as below

  1. File Layout
  2. Web Services Application Messaging
  3. Component Interface

File Layout:

This is used to connect to PeS when we need file based polling integration. Generally the type of file used would be xml or csv’s. This method is still very popularly used in many applications.

Web Services Application Messaging:

This is a plain Web Service communication. Messaging architecture for both synchronous and guaranteed delivery asynchronous integration into and out of the Integration Broker

Component Interface:

This is Object-oriented, request/reply, component architecture that encapsulates PeopleSoft data and communicates.

I am interested in using Component Interface for PeS connectivity. Generally in market lots of adapters are available for doing this. The leaders are Oracle and IBM, they provide adapters for connecting to PeS. So, the developer doesnt have to code or worry about the PeS connectivity, they just need to send the data and get back the data they need. This makes life simple for developers

I have used IBM adapter in Websphere process server for PeopleSoft. The advantage i could see using is just easy development. But is it worth paying huge money for just getting this advantage. Why cant we develop our own component in process server which does this functionality.

The other advantage that adapter give is that we can discover the CI available in the PeS and just use the operation we want. All these things can be done using a good UI wizard. When we go for our own java implementations, we have to open each CI and create a java template for each.

We will go step by step tutorial for doing this.

PSJOA.jar -> This is the interface jar file which would help Java to interact with PeopleSoft through a component interface. It will be available in %PS_HOME%\class directory.

Create a record with a single field and put this on a page. Create a component and move it to a component interface. The component interface should have the following methods :- Cancel, Create, Find, Get and Save.

Now, open the component interface. Click on Build -> PeopleSoft APIs. This process would validate all the component interface and you will get some errors in this process. You can just skip the errors and continue the process. Select the “java” class option and specify the target location where the java files needs to be placed. For any component interface, PeopleSoft create four files like for CI name JobData, it would create

IJobDataCI.java

IJobDataCICollection.java

JobDataCI.java

JobDataCICollection.java

So, after compiling this, pack all the class files into a jar file, say PSFTCI.jar. So, now we have two jar’s PSJOA.jar and PSFTCI.jar

The next step is to create a java template. Open the component Interface, right click and click on generate a Java template. So, this would be saving your java template for that CI in some temp folder. Generally the Java template name would be the CI name itself, say JobDataCI.java

Now if we open the java template, we can see a code like

“oSession.connect(1, strAppServerPath, strOperatorID, strPassword, null)”

Here we can give the server name, username and password for the PeS we are trying to connect. This would take the default port. If we need to modify this port number to some specific value and have all these data coming from properties fil, we need to follow the below steps.

  1. change the above code to “oSession.connect(1, strAppServerPath, strOperatorID, strPassword, null)”
  2. create a property file pstools.properties in the java project with the following key names

server_port=<server_port>
server_name=<server_name>
logon_id=<logon_id>
logon_password=<logon_password>

That’s it, we are done. Just need to use the setter and getter methods in the java template to select or update the date in PeS.

This finishes the tutorial for connecting to PeS through java.

-Sudan

 

2 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Training in Chennai Core Java 8 Training in Chennai Core Java 8 Training in Chennai JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
  2. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

    ReplyDelete

Thank you for your valuable comments.