Download presentation
Presentation is loading. Please wait.
Published byEric Butler Modified over 8 years ago
1
LDAP Binding Component Tutorial ZAZ Consulting November, 2007
2
A Scenario NMR HTTP SOAP BC LDAP BC BPEL SE LDAP ServerClient
3
Create BPEL Module ● From Netbeans' File menu, select New Project ● Choose category SOA ● Choose project type BPEL Module ● Click Next
4
Create BPEL Module ● Enter Project Name, for example, EmployeePhoneSearch ● Enter Project Location ● Click Finish to create the new BPEL module project
5
Create BPEL Module create HTTP request/reply WSDL ● Expand the newly created project ● Right click on Process Files node ● Select New ● Select WSDL Document
6
Create BPEL Module create HTTP request/reply WSDL ● Enter File Name, for example, HTTPRequestReply ● Click Next
7
Create BPEL Module create HTTP request/reply WSDL ● Enter Input Message Part Name: EmployeeName ● Enter Output Message Part Name: PhoneNumber ● Click Next
8
Create BPEL Module create HTTP request/reply WSDL ● Click Finish
9
Create BPEL Module create LDAP Search WSDL ● Expand the newly created project ● Right click on Process Files node ● Select New ● Select Other
10
Create BPEL Module create LDAP Search WSDL ● Select category SOA ● Select File Type WSDL From LDAP Server... ● Click Next
11
Create BPEL Module create LDAP Search WSDL ● Enter LDAP Server URL, for example, ldap://localhost:43418ldap://localhost:43418 ● Click Next
12
Create BPEL Module create LDAP Search WSDL ● From LDAP object class list, click on inetOrgPerson ● Click “>” to select inetOrgPerson ● Click Next
13
Create BPEL Module create LDAP Search WSDL ● In Search Filter area on Search tab, highlight uid from the list ● Click on “>” to select uid ● In Result Set area on Search tab, highligh homePhone from the list ● Click on “>” to select homePhone ● Click Finish
14
Create BPEL Module create BPEL Process ● Generated files should look like this:
15
Create BPEL Module create BPEL process ● Generated files should look like this:
16
Create BPEL Module create BPEL process ● Expand the newly created project ● Right click on Process Files node ● Select New ● Select BPEL Process...
17
Create BPEL Module create BPEL process ● Enter File Name ● Click Finish
18
Create BPEL Module create BPEL process ● Drag InetOrgPersonSearch.wsdl onto BPEL editor canvas
19
Create BPEL Module create BPEL process ● Enter Name: PartnerLinkLDAPSearch ● Click Swap Roles, the role should be “Partner Role” ● Click OK
20
Create BPEL Module create BPEL process ● Drag HTTPRequestReply.wsdl onto BPEL editor canvas
21
Create BPEL Module create BPEL process ● Enter Name: PartnerLinkHTTPRequest ● Leave role as “My Role” ● Click OK
22
Create BPEL Module create BPEL process ● Drag Receive activity from Palette to targeted area on BPEL editor's canvas
23
Create BPEL Module create BPEL process ● Double click on activity Receive1 ● Select PartnerLinkHTTPRequest as Partner Link ● Select HTTPRequestReplyOperation as Operation ● For Input Variable, click on Create ● Click OK
24
Create BPEL Module create BPEL process ● Drag Invoke activity onto canvas as the next activity after Receive1
25
Create BPEL Module create BPEL process ● Double click on activity Invoke1 ● Select PartnerLinkLDAPSearch as Partner Link ● Select InetOrgPersonSearchOperation as Operation ● For Input Variable, click Create ● Click OK ● For Output Variable, click Create ● Click OK
26
Create BPEL Module create BPEL process ● Drag Reply activity from Palette onto canvas, after Invoke 1
27
Create BPEL Module create BPEL process ● Double click on activity Reply1 ● Select PartnerLinkHTTPRequest as Partner Link ● Select HTTPRequestReplyOperation as Operation ● For Output Variable, click Create ● Click OK
28
Create BPEL Module create BPEL process ● Drag Assign Activity onto canvas as the next activity after Receive1
29
Create BPEL Module create BPEL process ● Stay focus on Assign1 activity ● From mapper editor at the bottom, expand highlighted nodes on both sides ● Drag EmployeeName from left side to Value under uid on right side ● Choose String Literal from String icon ● Enter “ou=People,dc=zaz,dc=com” (should match your LDAP server setup) ● Drag the newly created string value to dn ● Create another string literal “=” ● Drag String literal “=” to op under uid on right side
30
Create BPEL Module create BPEL process ● Stay focus on activity Assign1, the mapping should look like this
31
Create BPEL Module create BPEL process ● Drag Assign activity onto BPEL canvas, after activity Invoke1
32
Create BPEL Module create BPEL process ● On Mapper editor, expand InetOrgPersonSearchOperationOut node ● From Nodes icon, select Count ● Drag homePhone from left side to node-set on Count operator ● Drag return number to Result on right side ● Finished mapping should look like this ● The condition of If check is completed
33
Create BPEL Module create BPEL process ● Drag Assign activity from Palette onto canvas, on the true path of If activity
34
Create BPEL Module create BPEL process ● For activity Assign2, create following map
35
Create BPEL Module create BPEL process ● Drag Assign activity from Palette onto canvas, on the false path of If activity
36
Create BPEL Module create BPEL process ● For activity Assign3, create following map
37
Create BPEL Module build BPEL module ● Righ click on project name, select Clean and Build
38
Create Composite Application ● From Netbeans' File Menu, select New Project ● Choose Category SOA ● Choose Project type Composite Application ● Click Next
39
Create Composite Application ● Enter Project Name, for example, MyPhoneLookupApp ● Click Finish
40
Create Composite Application ● Right click on newly created composite application project, select Add JBI Module
41
Create Composite Application ● From Select Project dialog, high light the new bpel module project ● Click Add Project JAR Files
42
Create Composite Application ● Right click composite application project, and select “Clean and Build”
43
Create Composite Application ● Right click composite application project, and select “Edit Application Configuration”
44
Create Composite Application ● CASA editor looks like this
45
Create Composite Application ● Right click composite application project node, select “Deploy” ● This will start GlassFish application server, if the server hasn't started ● Please make sure httpsoap bc, ldapbc, and bpel se are started
46
LDAP Server Configuration ● Sun ONE Directory Server 5.2 ● Sample entry
47
Test Composite Application ● Right click Test node under composite application project node ● Select New Test Case ● Click Next ● Select HTTPRequestReply.wsdl ● Click Next
48
Test Composite Application ● Select HTTPRequestReplyOperation ● Click Finish
49
Test Composite Application ● Enter EmployeeName in XML document
50
Test Composite Application ● Right Click Test Case1 node under composite application project node -> Test node ● Select Run to execute the test ● A phone number should be returned
51
Test Composite Application ● Create another test case ● Use non-existing employee name, “Not Found” should be returned as result
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.