Execute a JD Edwards OneWorld Sample Query
The JD Edwards OneWorld (JDEOW) system is accessible from a BizTalk Server system by using the JD Edwards OneWorld adapter. This adapter is included with BizTalk Server.
This is the second part of the JD Edwards OneWorld lab work. In the first part (Lab 1), you manually accessed data on the JD Edwards OneWorld system without the assistance of BizTalk Server or other Microsoft technologies. In this part (Lab 2), you will create a BizTalk orchestration as part of a Visual Studio BizTalk project. You will configure ports on this orchestration to use the JD Edwards OneWorld adapter to get data from a JD Edwards OneWorld system.
Prerequisites
Microsoft BizTalk Server
Microsoft Visual Studio
JD Edwards OneWorld Client software
Network connectivity to a JD Edwards OneWorld system on another server
Microsoft BizTalk Adapters for Enterprise Applications
Note
See Install and configure the adapters for enterprise applications for key configuration information for the JD Edwards, PeopleSoft, and TIBCO adapters.
Lab 2 - Executing a JD Edwards OneWorld Sample Query
In this lab, you will execute a Get operation against the JD Edwards OneWorld system. Specifically you will perform the following tasks:
Verify the JD Edwards OneWorld prerequisites
Set up a JD Edwards OneWorld send port in BizTalk Server
Create a BizTalk orchestration project
Build and deploy the project
Test the application and view the XML output
You will use the JD Edwards OneWorld adapter to access data on the JD Edwards OneWorld system from BizTalk Server.
This adapter enables the processing of JD Edwards OneWorld objects by using requests and responses executed by an orchestration. Many methods are available for a schema object. This lab demonstrates how to use the Address Book MBF method.
Before running a service request, you must create service request and response schemas for the specific JD Edwards OneWorld object. The Add Generated Items/Add Adapter Wizard creates these schemas by directly interrogating the supporting metadata object in JD Edwards OneWorld. This lab illustrates the steps required to create schemas for the Address Book MBF method and to process a query.
Step 1: Verify the JD Edwards OneWorld prerequisites
Before you start creating a BizTalk project for use with the JD Edwards OneWorld adapter, you need to be sure the files and the adapter are set up correctly to access the JD Edwards OneWorld system. On the BizTalk Server computer, the JD Edwards OneWorld adapter communicates with the JD Edwards OneWorld system by using the Java interface.
Four files are necessary for proper interface access to a JD Edwards OneWorld system using the JD Edwards OneWorld adapter: Connector.jar, Kernel.jar, BTSLIBinterop.jar, and JDEJAccess.jar.
The Connector.jar and Kernel.jar files come with the JD Edwards OneWorld system and are obtained from a JD Edwards OneWorld administrator. These files are located in the C:\JDEOWJars folder.
The BTSLIBinterop.jar file is generated by the JD Edwards OneWorld system by following the instructions included in the Installation Guide for the adapters. This file is located in the C:\JDEOWJars folder.
The JDEJAccess.jar file is a part of the JDEOW adapter and is included with the installation of the adapter. By default, it is located in the C:\Program Files\Microsoft BizTalk Adapters for Enterprise Applications\J.D. Edwards OneWorld®\Classes folder.
Confirm the Connector.jar, Kernel.jar, and BTSLIBinterop.jar files exist on the BizTalk Server computer in the C:\JDEOWJars folder.
Confirm the JDEJAccess.jar file exists on the BizTalk Server computer in the C:\Program Files\Microsoft BizTalk Adapters for Enterprise Applications\J.D. Edwards OneWorld\Classes folder.
Step 2: Configure BizTalk send ports
Next, verify that the JD Edwards OneWorld adapter is installed, and create the send port.
Open BizTalk Server Administration, expand Console Root, expand BizTalk Server Administration, expand BizTalk Group, expand Platform Settings, and then expand Adapters.
Confirm the JDE_OneWorld adapter is listed. If the JD Edwards OneWorld adapter is not installed, install the BizTalk Adapters for Enterprise Applications (see the earlier "Prerequisites" section). After the adapters are installed, right-click Adapters and then click New - Adapter to install the JD Edwards OneWorld adapter. Restart the host instance for this to take effect.
Expand Applications, and then expand BizTalk Application 1.
Right-click Send Ports, click New, and then click Static Solicit-Response Send Port.Enter the following values for these fields:
Name:
JDE_OneWorldPort
Type:
JDE_OneWorld
Send handler:
BizTalkServerApplication
Send pipeline:
XMLTransmit
Receive pipeline:
XMLReceive
Click Configure, and then enter the following property values:
Host: <enter your JDEOW host name>
JAVA_HOME:
C:\j2sdk1.4.2_08
JDEdwards Environment: <enter your JDEOW environment>
JDEdwards JAR files: <enter full path of JAR files>
C:\JDEOWJars\BTSLIBInterop.jar; C:\JDEOWJars\Connector.jar; C:\JDEOWJars\Kernel.jar;C:\Program Files\Microsoft BizTalk Adapters for Enterprise Applications\J.D. Edwards OneWorld®\Classes\JDEJAccess.jar
Password: Use the drop-down list and then enter your JD Edwards OneWorld password.
Port:
6009
User Name: <enter your JD Edwards User Name>
Select OK to close the Send Port Properties.
Step 3: Create a BizTalk Orchestration Project
Next, create a BizTalk project in Visual Studio, and configure an orchestration in the project to handle communication between BizTalk Server and the JD Edwards OneWorld system. You will add send and receive ports, build the project, and then deploy the project.
Open Visual Studio, and create a new BizTalk project in the C:\LABS folder. On the File menu, click New. The New Project dialog box appears. In the Templates section, select Empty BizTalk Server project. Enter
JDE_OW_Test
as the unique project name, and then click OK.In Solution Explorer, right-click the project, click Add, and then click Add Generated Items. In the Categories pane, select Add Adapter Metadata, in the Templates pane, select Add Adapter Metadata, and then click Add.
In the Add Adapter Wizard, select the JD Edwards OneWorld adapter, select the JDE_OneWorldPort send port that you created in the preceding procedure, and then click Next.
On the Select Services to Import page, open JD Edwards OneWorld. The JDEOW system is contacted through the adapter by using the BrowsingAgent program. The BrowsingAgent returns the following services.
Expand CALLBSFN and scroll down to N0100041 - Address Book MBF. Select N0100041 and then click Finish.
In Solution Explorer, there is a new BizTalk orchestration with two new associated schema files. These files are created by the Add Adapter Wizard. Double-click the BizTalk Orchestration.odx file to open the orchestration.
This orchestration accepts as input from the File adapter an XML file formatted for the JD Edwards OneWorld system. The orchestration uses the JD Edwards OneWorld adapter to send the XML file to the JD Edwards OneWorld system. JD Edwards OneWorld processes the query and generates an output XML file containing the results. This XML file returns to the orchestration through the JD Edwards OneWorld adapter, and the File adapter writes the XML file to the output location on disk.
To complete the orchestration, you need to create and configure ports to receive and send the XML files. First, configure a receive port to be used by the File adapter to input the XML containing the query into the orchestration from disk.
Configure a receive port to accept the input XML file
Double-click the BizTalk Orchestration.odx file to open the orchestration.
In the BizTalk Orchestration.odx file, right-click the left port surface and then click New Configured Port. This starts the Port Configuration Wizard. On the Welcome to the Port Configuration Wizard page, click Next.
On the Port Properties page, enter
JDE_File_In
for Name, and then click Next.On the Select a Port Type page, select Create a new Port Type, and then enter or select the following property values:
Port Type Name:
JDE_FileIn_Port
Communication Pattern: One Way
Access Restrictions: Internal - limited to this project
Click Next to go to the Port Binding page, and then select the following property values:
Port direction of communication: I'll always be receiving messages on this port
Port binding: Specify later
Click Next, and then click Finish.
Next, create a send/receive port to send the initial XML input file containing the query to the JD Edwards OneWorld system. This port will also receive an output XML file containing the query results from the call to the JD Edwards OneWorld system.
Configure a send/receive port to interface with JD Edwards OneWorld
In the BizTalk Orchestration.odx file, right-click the right port surface and then click New Configured Port. This starts the Port Configuration Wizard. On the Welcome to the Port Configuration Wizard page, click Next.
On the Select a Port Type page, select Use an existing Port Type. Under Available Port Types, select JD_OW_Test.N0100041,and then click Next.
Select the following property values:
Port direction of communication: I'll be sending a request and receiving a response
Port binding: Specify later
Click Next, and then click Finish. On the port surface you will see the port and the available methods.
Finally, configure a send port to be used by the File adapter to output the XML containing the query results to disk.
Configure a send port to output the XML file to disk
In the BizTalk Orchestration.odx file, right-click the left port surface and then click New Configured Port. This starts the Port Configuration Wizard. On the Welcome to the Port Configuration Wizard page, click Next.
On the Port Properties page, enter
JDE_FileOut
for Name, and then click Next.On the Select a Port Type page, select Create a new Port Type, and then enter or select the following property values:
Port Type Name:
JDE_FileOut_Port
Communication Pattern: One Way
Access Restrictions: Internal - limited to this project
Click Next to go to the Port Binding page, and then select the following property values:
Port direction of communication: I'll always be sending messages on this port
Port binding: Specify later
Click Next, and then click Finish.
Displayed on the port surface are the new ports and the available methods for the JD Edwards OneWorld services. Later you will specify the JD Edwards OneWorld adapter to send and receive files from the JD Edwards OneWorld system.
The JDE_File_In and JDE_File_Out ports you just created need associated message types.
Assign message types to the ports
On the left port surface, on the JDE_File_In port, click Request. In the Properties window, expand Message Type, expand Multi-part Message, and then click JDE_OW_TestAddressBookMasterMBF.
On the left port surface, on the JDE_File_Out port, click Request. In the Properties window, expand Message Type, expand Multi-part Message, and then click JDE_OW_TestAddressBookMasterMBFResponse.
Insert two Send shapes and two Receive shapes into the orchestration to link to the ports.
Add Send and Receive shapes
Drag a Receive component from the Toolbox and drop it immediately below the start of the orchestration (the green circle). Click the Receive shape, and in the Properties window, enter
Get_File
for the Name, and set Activate totrue
. Doing so will activate the orchestration when an incoming document is received on this receive port.Drag a Send component from the Toolbox and drop it immediately below the GetFileReceive shape. Click the new Send shape, and in the Properties window, enter
SendToJDEOW
for the Name.Drag a Receive component from the Toolbox and drop it immediately below the SendToJDEOWSend shape. Click the Receive shape, and in the Properties window, enter
JDEOW_Resp
for the Name.Drag a Send component from the Toolbox and drop it immediately below the JDEOW_RespReceive shape. Click the new Send shape, and in the Properties window, enter
FileToDisk
for the Name.Connect the JDE_FileIn port to the GetFileReceive component.
Connect the JDE_FileOut port to the FileToDiskReceive component.
Go to Orchestration View and expand Messages. Change the identifier for Message_1 to
MsgToJDEOW
, and for Message_2 toJDEOW_Resp.
Highlight the SendToJDEOWSend component and set its Message property to MsgToJDEOW.
Highlight the JDEOW_RespReceive component and set its Message property to JDEOW_Resp.
Connect SendToJDEOW to the Request portion of the JDE_OW_Port port.
Connect JDEOW_Resp to the Response portion of the JDE_OW_Port port.
Step 4: Build and deploy the project
Now the BizTalk project is complete and you can build and deploy it in Visual Studio.
Start Visual Studio Command Prompt.
To build the project, you need a strong name key file. At the command prompt, enter the following to create a strong name key file:
sn -k labs.snk
In Solution Explorer, right-click the JD_OW_Test project, and then click Properties to launch the Project Designer for the project.
Click the Signing tab.
Select Sign the assembly option, click drop-down list for the Choose a strong name key file option, and then click Browse.
Browse to select the key file: labs.snk, and then click Open.
Click Deployment tab in the Project Designer.
Set the Application Name to
JDE_OW_Test
.In Solution Explorer, right-click the JDE_OW_Test project, and then click Build.
After the build completes successfully, right-click the XX_JD Edwards OneWorldQuery project, and then click Deploy. In the output window the following output will be displayed:
Step 5: Test the Application and Viewing the XML Output
Now you will test the application that you have created and deployed. You will create the XML file that starts the orchestration process, and then you will configure folders to receive and send XML files within the application. After you have configured the application, you will run it and view the XML files that the orchestration returns.
Generate the XML file for the query
In Solution Explorer, double-click N0100041Service_N0100041.xsd to open the file.
Right-click N0100041Service_N0100041.xsd and then click Properties. For the Output Instance Filename enter the following path and file name for the sample XML:
C:\LABS\JDE_OW_TEST\SAMPLE.XML
Click OK. In the Properties window, select <Schema> and set Root Reference: to
AddressBookMasterMBF
. This will cause the generated XML to include only the Query xml.Right-click N0100041Service_N0100041.xsd and then click Generate Instance. This generates the Sample.xml file. This file will be dropped in the receive location as input to the adapter to start the orchestration process.
Configure and start the BizTalk application
Configure folders for receiving the incoming files and sending the outgoing files. Go to C:\LABS\JDE_OW_Test and create two new subfolders named
FileIn
andFileOut
.In the BizTalk Server Administration console,expand Console Root, expandBizTalk Server Administration, expand BizTalk Group, and expand Applications.
Right-click JDE_OW_Test, and then click Configure.
Select Orchestration_1 and click the Host drop-down box. Select BizTalkServerApplication.
Under Receive Ports, click <None>. In the drop-down list, select New Receive Port.
For Name, type
JDE_FileIn_Port
, and then click OK. A message box appears stating that you need to designate a receive location. Click OK, and then click New.Type or select the following values for the properties:
Name: JDE_
FileInLoc
Type: File
Receive Handler: BizTalkServerApplication
Receive Pipeline: XMLReceive
Click Configure, type
C:\LABS\JDE_OW_Test\FileIn
for Receive Folder, and then click OK three times.Click <None> for JDE_OW_Port in the drop-down list.
Select New Send Port and then select or type the following values for the properties:
Name:
JDE_OW_Port
Type: JDE_OneWorld
Send Handler: BizTalkServerApplication
Pipelines: XMLTransmit and XMLReceive
Click Configure, and then enter the following property values:
Host: <enter your JDEOW host name>
JAVA_HOME:
C:\j2sdk1.4.2_08
JDEdwards Environment: <enter your JDEOW environment>
JDEdwards JAR files: <enter full path of JAR files>
C:JDEOWJarsBTSLIBInterop.jar; C:JDEOWJarsConnector.jar; C:JDEOWJarsKernel.jar;C:Program FilesMicrosoft BizTalk Adapters for Enterprise ApplicationsJ.D. Edwards OneWorld®ClassesJDEJAccess.jar
Password: Use the drop-down list and then enter your JD Edwards OneWorld password.
Port:
6009
User Name: <enter your JD Edwards User Name>
Click OK twice to close the dialog boxes.
In the Configure Applicationwindow, click <None> for JDE_FileOut in the drop-down list.
Select New Send Port and type or select the following values for the properties:
Name:
FileOutPort
Type: File
Send Handler: BizTalkServerApplication
Send Pipeline: XMLTransmit
Click Configure and type
C:\Labs\JDE_OW_Test\FileOut
for Destination Folder. Keep %MessageID%.xml for File Name because this results in a unique file for each message.Click OK three times to close the dialog boxes.
In the BizTalk Server Administration console,right-click the JDE_OW_Test application, and then click Start.
Test the orchestration
In the C:\Labs\JDE_OW_Test directory the Sample.xml file will appear as:
Edit the Sample.xml file to remove everything except the cActionCode and mnAddressBookNumber elements.
For the cActionCode element insert the letter
i
.For mnAddressBookNumber insert the number
500
.Save the changes and copy the file to the C:\Labs\JDE_OW_Test\FileIn folder. This is the receive location that starts the orchestration process.
In a few seconds, an XML file should appear in the C:\Labs\JDE_OW_Test\FileOut folder. This should contain the all the records where the address is 500.
This returned record data should match the data returned by the query against the JD Edwards OneWorld system in Lab 1. By comparing the records you obtained in Lab 1, you can verify that the Get method worked properly.
Summary
In this lab, you first verified that the prerequisites were set up correctly to access the JD Edwards OneWorld system. Then you used Visual Studio to create a new BizTalk project containing an orchestration. You configured the BizTalk orchestration to use the JD Edwards OneWorld adapter to get data from the JD Edwards OneWorld system. To configure the orchestration, you created send, receive, and send/receive ports. You bound these ports to the JD Edwards OneWorld adapter, and assigned messages to the appropriate ports.
After you completed the BizTalk project, you used Visual Studio to build and deploy it. You then configured your new application and ran it to get data from the JD Edwards OneWorld system. To verify that the application worked correctly, you compared its output XML file to the file that you received from the JD Edwards OneWorld system in Lab 1.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for