You are on page 1of 57

webMethods 6 Integration

Workshop

EXERCISES

Copyright  2002 by webMethods, Inc. All rights reserved Version: 021206


webMethods 6 Integration Workshop

Table of Contents
Exercise 1 – Start the Integration Server................................................................................ 3
Exercise 2 – Packages, Folders, & Services.......................................................................... 5
Exercise 3 – Input/Output & Document Types..................................................................... 10
Exercise 4a – Building Flow Services: BRANCH................................................................. 14
Exercise 4b – Building Flow Services: LOOP....................................................................... 18
Exercise 4c – Building Flow Services: SEQUENCE............................................................. 22
Exercise 5 – Mapping Services ............................................................................................. 27
Exercise 6 – Local Publish..................................................................................................... 31
Exercise 7 – Subscribing to Documents............................................................................... 33
Exercise 8a – Adapters (Connection Alias).......................................................................... 37
Exercise 8b – Adapters (Adapter Services).......................................................................... 39
Exercise 9 – Notification........................................................................................................ 41
Exercise 10 – Web Services................................................................................................... 43
Exercise 11 – Trading Networks Profiles.............................................................................. 48
Exercise 12 – Trading Networks Document Types.............................................................. 50
Exercise 13 – Monitoring Services........................................................................................ 54
Exercise 14 – Configure Logical Servers.............................................................................. 56

2 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 1 – Start the Integration Server


Key Skills

Start the Integration Server, create a user account, and grant privileges to it

10 minutes

Ta s k
1. Start the Integration server from the command line. Use a debug level of 6 and write
the log to the server window instead of the file system.

2. Create a user account and grant it Administrator, TNAdministrator, and


Developer privileges.

3. Leave the Server running.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Debug Level 6

IS Administrator URL http://localhost:5555

IS Administrator logon Administrator / manage <case sensitive>

Username and Password jsmith for Jane/John Smith, password wm6dev

Groups for user privilege Administrators, TNAdministrators, Developers

Documentation directory \webMethods6\IntegrationServer\doc

R e s our ce s
• IS Administrators Guide Chapter 4: Starting and Stopping the Server

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 3


webMethods 6 Integration Workshop

! Note: Logging to the screen is intended for demonstration purposes only. In a


production environment, logging should be directed to a persistent store. Logging will
be discussed later in the course.

Ti ps & Tr i ck s
• Command line switches are entered with the “-“ character, as in “-log
none”.

• If you try to log on to the IS Administrator before the server has


completed launching, you will see a browser error display indicating a location
was not found. Wait a few moments and reload the web page.

! Note: The Integration Server uses the Java Run-time Engine to execute the different
services. When you start the server, your system will start an instance of Java (either
java.exe or jre.exe, depending on your JDK). You can view this running process in
Windows by using the Task Manager.

• Example (User Settings):

4 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 2 – Packages, Folders, & Services


Key Skills
Create a package, folders, and an initial service

15 minutes

Ta s k
To begin development, we need a package and folder organization.

 Create a Service to write a hard-coded message to the Server log. Place the
Service in the namespace as indicated below.

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 5


webMethods 6 Integration Workshop

 Run the service and confirm successful execution in the server log.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Developer logon <youruser> / <yourpassword> <case sensitive>

Documentation directory \webMethods6\Developer\doc

Package D106Exercises

Namespace D106Exercises.exercise2

Service Name myService

Hard-coded message Executing myService written by <youruser>

Logging service pub.flow:debugLog in the WmPublic package

R e s our ce s

• Developer On-line help: Creating a Package, Creating a Folder and


Creating a Service.

• Participant Guide: Packages, Folders, & the Namespace; Services

• IS Developer’s Guide Chapter 2: Getting Started with Developer

• IS Developer’s Guide Chapter 6: Working with Packages

• IS Developer’s Guide Chapter 7: Building Flow – Creating a New Flow Service

! Note: Outside of a training environment, each user should have a separate account with
appropriate security privileges. Change the Administrator and Developer account
passwords as quickly as possible and do not use Administrator other than to create
your own administration account.

• Hit F1 in Developer to get context-sensitive help.

6 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

• Create a new package named D106Exercises for storing your class


development work, and a top-level folder also named D106Exercises. This will
give you a unique location in the Integration Server namespace.

• Select the appropriate parent folder before creating a new folder to ensure
proper nesting.

• To write a message to the log file, you need to browse in the package
WmPublic and find the service pub.flow:debugLog.

• A worked example appears on the next page:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 7


webMethods 6 Integration Workshop

8 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

This page intentionally left blank

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 9


webMethods 6 Integration Workshop

Exercise 3 – Input/Output & Document Types


Key Skills
Service Input/Output; create and use document types in Developer

15 minutes

Ta s k
1. Create the exercise folders as indicated below.

2. Create a simple document type with a constraint on one of its fields:

 Create a document type PersonnelEntry in the docs folder using


the indicated structure.

 Set the document field SerialNumber field to have a constraint to


be an Integer.

 Create the Flow Service docInput, using PersonnelEntry as


Input. Ensure that the input is validated.

 Run the Service. Test the constraint by using Strings vs. Numeric
values for SerialNumber. Did you see an error message when using Strings?

3. Secondly, create a document type from an XML file:

 Use a text editor to view the indicated XML file (location listed
below).

 Create the new document type (Department from


department.xml).

4. Finally, use the Developer’s special document-test feature to provide


XML data as input to a Flow Service:

 Create a Flow Service xmlInput (no input/output declarations).

 In this Flow, invoke the service xmlNodeToDocument.

10 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

 Test xmlInput by using “Test…Send XML File” with the


indicated text XML file. Look at the Results panel. Do you see 2 employee
records? During development, the xmlNodeToDocument Service is often added
to Services to simulate real XML data transfer.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Folders to create D106Exercises.exercise3

D106Exercises.exercise3.docs

Services to create docInput

xmlInput

Document type

PersonnelEntry

SerialNumber integer

field Constraint

Department XML department.xml

XML path \webMethods6\IntegrationServer\packages\D106Support\pub

xmlNodeToDocument pub.xml:xmlNodeToDocument

Send XML File \webMethods6\IntegrationServer\packages\D106Support\pub\ department.xml

R e s our ce s

• Developer On-line help: Creating a Document type and Declaring Input and
Output Parameters for a Service.

• Participant Guide: Working with Documents

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 11


webMethods 6 Integration Workshop

• IS Developer’s Guide Chapter 7: Building Flow Services – Declaring Input &


Output Parameters for a Service

• IS Developer’s Guide Chapter 11: Creating IS Schemas, Document Types, and


Specifications.

Ti ps & Tr i ck s
• Use Copy and Paste to simplify document type creation and copying
services.

• Select a field and hit <enter> to rename.

• Use the Document Reference feature when creating the input.


• Worked examples:

12 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 13


webMethods 6 Integration Workshop

Exercise 4a – Building Flow Services: BRANCH


Key Skills
Create business logic using Flow steps

20 minutes

Ta s k
1. Write Branch code to implement the following design. Test using the Step
feature.
Field = testValue input

Value is either true, false, null, or anything else

true false null default

Write these messages to the System Log

2. (Optional) Write Branch code to implement the following design. Test


using Step.

Field1 = account
inputs
Field2 = promoCode
e.g. PRE5AAA
account = starts with PRE0 thu PRE9 promoCode=“123FREE”

default

50% Shipping Discount Full Shipping Free Shipping

Write these messages to the System Log


14 Version: 030102 Copyright  2003 by webMethods, Inc. All rights
reserved
webMethods 6 Integration Workshop

R e qui r e d Da ta

Data Value

Folders to create D106Exercises\exercise4\branch_example

Services to create branch1

branch2

BRANCH 1 expression /^PRE[0-9]+/

Built-in Service to use pub.flow:debuglog

R e s our ce s

• Developer On-line help: Flow Editor and Building a Branch Step, Building a
Loop Step, etc.

• Participant Guide: Flow Services

• IS Developer’s Guide Appendix A: webMethods Flow Steps

• IS Developer’s Guide Appendix D: Conditional Expressions

Ti ps & Tr i ck s
• Make sure your steps are indented properly.

• You can Branch either on a switch variable or set evaluate-labels to


“true” and use conditional expressions in the labels of the target statements.

• The $null child is only used in the second BRANCH because $null only
works with branching on a switch value.

• When you run the services, try the various test values (true, false,
123FREE, PRE0AAA, ABC, etc.) in the input dialog and examine the Results
screen and the console output. Use Step and Step Into commands to
debug your services and watch the execution.

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 15


webMethods 6 Integration Workshop

• Worked examples:

16 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

This page intentionally left blank

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 17


webMethods 6 Integration Workshop

Exercise 4b – Building Flow Services: LOOP


Key Skills
Create business logic using Flow steps

20 minutes

Ta s k
1. Write a LOOP service to count the number of employees in the
department.xml file. Display the result in the System Log
2. Test by running it and providing the input manually
3. (Optional) Test using the “Send XML File” feature.

R e qui r e d Da ta

Data Value

Folder to create D106Exercises\exercise4\loop_example

Service to create loop_test

Service Input employees (Department)

(reference exercise3\docs\Department)

Service Output count

Department XML department.xml

XML path \webMethods6\IntegrationServer\packages\D106Support\pub

xmlNodeToDocument pub.xml:xmlNodeToDocument

18 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Flow Editor and Building a Branch Step, Building a
Loop Step, etc.

• Participant Guide: Flow Services

• IS Developer’s Guide Appendix A: webMethods Flow Steps

• IS Developer’s Guide Appendix D: Conditional Expressions

Ti ps & Tr i ck s
• Make sure your steps are indented properly.

• Insert Map steps to look at the Pipeline when designing your Flow.

• Map a field by selecting it and without releasing the mouse button,


dragging a line to the target field.

• Note that only objects that are mapped or set will persist in the Pipeline,
and that objects specified in the service output will only appear in the last Flow
step of the service.

• Inside a Loop , the variable specified as the in-array should not


appear as an array, since inside the Loop you are looking at only a single element.
Note that in your MAP statement, the Pipeline In has a field named $iteration
and that within this MAP statement under the LOOP, the
employees/department/employee field appears as a Document and not a
Document List or array.

• Map the count field to the message field in debugLog.

• LOOP worked example:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 19


webMethods 6 Integration Workshop

Optional!

20 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

This page intentionally left blank

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 21


webMethods 6 Integration Workshop

Exercise 4c – Building Flow Services: SEQUENCE


Key Skills
Create business logic using Flow steps

20 minutes

Ta s k

1. Create a service doStuff to perform the following math function: division


of integers.
2. Create a try-catch SEQUENCE service that calls the doStuff service. Write
the error information to the System Log. Test to see if divide-by-zero is properly
handled.

R e qui r e d Da ta

Data Value

Folder to create D106Exercises\exercise4\sequence_example

Sequence Service sequence_test

Division Service doStuff

Inputs (both Services) num1, num2

Build in Services pub.math:divideInts

pub.flow:getLastError

debugLog message Map lastError/error from Pipeline In to message

22 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Flow Editor and Building a Branch Step, Building a
Loop Step, etc.

• Participant Guide: Flow Services

• IS Developer’s Guide Appendix A: webMethods Flow Steps

• IS Developer’s Guide Appendix D: Conditional Expressions

Ti ps & Tr i ck s
• Make sure your steps are indented properly.

• In the doStuff service, insert an INVOKE of the service


pub.math:divideInts. Create the input variables as shown in the table.
• In the sequence_test service, create the input variables as shown in the
table.
• Insert three SEQUENCE statements and indent the second and third under
the first.
• Under SEQUENCE 2, insert and indent an INVOKE of your service
doStuff.
• Under SEQUENCE 3, insert and indent an invoke of the service
pub.flow:getLastError. Following this at the same level, insert an INVOKE of the
service pub.flow:debugLog.
• Configure the SEQUENCE exit-on properties as discussed on the slides,
and the INVOKE of pub.flow:debugLog properties as shown in the table.

• SEQUENCE worked example:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 23


webMethods 6 Integration Workshop

sequence_test service

doStuff service:

24 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 25


webMethods 6 Integration Workshop

This page intentionally left blank

26 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 5 – Mapping Services


Key Skills
Create a service which maps from one data format to another

20 minutes

Ta s k
1. Create this Map Service:

2. Complete the map as follows:


a. OrderDate = today’s date in this format - November 22, 2002
b. Map Course_ID but ONLY if course_id is not equal to D106
3. Run the service and confirm successful execution in the Developer results tab.
Use the Debugger to watch the mapping execution and note the behavior in a loop
during the mapping of the book list.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 27


webMethods 6 Integration Workshop

Data Value

Folders to create D106Exercises\exercise5

D106Exercises\maps

D106Exercises\docs

Service to create maps\mapBookOrder

Service input docs\Course_BookOrder

create this record from XML

Variable name BookOrder

Service output docs\BookOrderTicket

copy this record from D106Support.docs

Variable name BookRequest

Input XML File BookOrder.xml

Input XML Record Course_BookOrder

Book Order Input file bookorder_input.txt

XML & Input file path \webMethods6\IntegrationServer\packages\D106Support\pub

Transformer pub.date.dateBuild Set pattern to MMMMM dd, yyyy

No input, output to OrderDate field of document

R e s our ce s

• Developer On-line help: Building a Map Step

• Participant Guide: Mapping Documents

• IS Developer’s Guide: Chapter 10: Mapping Data in a Flow Service

28 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Ti ps & Tr i ck s
• Create a document type Course_BookOrder from XML file input
• Copy BookOrderTicket from the D106Support package (docs folder).
• Create a service to map from one document type to another (mapBookOrder).
• Use references to Course_BookOrder as input and BookOrderTicket as output.
• Use a MAP statement to map input fields to their output equivalent.
• Double-click on the course_id map link to create a condition, using “!= “D106”
as the condition. Use Pipeline Editor Copy/Paste to get the full path for the field.

• For the output field BookOrderTicket/OrderDate, use a transformer.


Be careful mapping elements from within arrays.

• To expand or hide the mapping pane in Developer, use the


buttons.

• The mapping and Document types will be used in more than one
exercise, so we are creating their folders outside the exercise5 folder in
D106Exercises\maps.

• Use the sample input file for testing (bookorder_input.txt).

• Worked Example:
Service mapBookOrder:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 29


webMethods 6 Integration Workshop

Conditional Map:

30 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 6 – Local Publish


Key Skills
Publish a document

15 minutes

Ta s k
1. Publish (local) the document type BookOrder.
2. The Server log should return a Trigger warning (no trigger available). It has not
been configured yet!

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Folder to create D106Exercises.exercise6

Service to create processBookOrder

Service input BookOrder (Course_BookOrder)

Service output none

Sample input file D106Support\pub\bookorder_input.txt

Publish service pub.publish:publish in WmPublic

R e s our ce s
• Participant Guide: Publish & Subscribe (Local within IS)

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 31


webMethods 6 Integration Workshop

• Building Integration Solutions Using Publication: Chapter 7 –


Publishing Documents

Ti ps & Tr i ck s
• Be sure to use the full, case-sensitive, namespace address when specifying
documentTypeName in the publish invoke (in the Service In).
1. Make your document type Course_BookOrder publishable.
2. Add and configure a publish service call to your service. Set local = true.
3. Use the Run command on the publishable document and publish it locally.

• Check the server.log display during testing for publishing diagnostic


messages (publish diagnostics should appear at debug level 6 and above).

• A worked example appears below:

32 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 7 – Subscribing to Documents


Key Skills
Create a trigger service and subscribe to a document

15 minutes

Ta s k
1. Create a Service that subscribes to Course_BookOrder. Write the
course_title field to the Server Log. Test by running the Publishing Service from
exercise 6.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Folder to create D106Exercises\exercise7

Service to create orderTriggerService

Service Input D106Exercises.docs:Course_BookOrder (Course_BookOrder)

pub.flow:debugLog Trigger fired for


%D106Exercises.docs:Course_BookOrder/course_bookorder/course_title%

message Check Perform variable substitution check box

Trigger to create BookOrderTrigger

Trigger Condition name BookOrder Trigger

Trigger Service D106Exercises.exercise7:orderTriggerService

Document Type D106Exercises.docs:Course_BookOrder

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 33


webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Create a Trigger

• Participant Guide: Publish & Subscribe

• Building Integration Solutions Using Publication: Chapter 8: Using


Triggers for Subscription

Ti ps & Tr i ck s
• Make sure that you have used the fully qualified, case-sensitive
namespace address for your trigger service input document, e.g.
D106Exercises.docs:Course_BookOrder.

• Create a trigger service for the Course_BookOrder trigger with the


properties shown in the table below.

• The trigger service should call pub.flow:debugLog. Configure it as


indicated in the table below.

• Create a Course_BookOrder trigger to subscribe to the document with


the settings as shown below.

• Publish Course_BookOrder and confirm successful subscription


in the Server Log. You can use the exercise 6 service processBookOrder to
start things.

• The default trigger condition is named “Condition1”. This is simply a


text label. You can modify the name of the condition to something more
meaningful.

• Worked Example:

34 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 35


webMethods 6 Integration Workshop

This page intentionally left blank

36 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 8a – Adapters (Connection Alias)


Key Skills
Create an connection alias for use by an adapter service

15 minutes

Ta s k
Create a connection alias for the JDBC Adapter.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

JDBC Adapter Data Source oracle.jdbc.pool.OracleConnectionPoolDataSource


Connection Class
Parameters Transaction LOCAL_TRANSACTION
Type
serverName localhost
user ISV6
password: ISV6
databaseName ORCL
portNumber 1521
networkProtocol <blank>
Other Properties driverType=thin

Connection Pooling <accept defaults>

Adapter Folder Name D106Exercises.adapters

Connection Name D106Adapter

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 37


webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Create an Adapter Service

• Participant Guide: Adapters & Notifications

Ti ps & Tr i ck s
• If all of your data entry for the Connection Alias is correct, the alias
will automatically be enabled for connection when you finish.

• Example:

38 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 8b – Adapters (Adapter Services)


Key Skills
Create an adapter service to insert data into a database

15 minutes

Ta s k
1. Create an Adapter Service for inserting Book Order data into a database.

2. Test the Adapter service. Use a convenient Database tool to check for
your record insertions.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Folder to create D106Exercises.exercise8

Adapter Folder D106Exercises.adapters


Name

Adapter Connection D106Adapter

Adapter Service BookOrderAdapter

Book Order Table <current catalog>ISV6.BOOK_ORDER

Table Structure

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 39


webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Create an Adapter Service

• Participant Guide: Adapters & Notifications

• Exercises: Exercise 8a - Adapters (Connection Alias)

Ti ps & Tr i ck s
• Select all the fields of the table for your Insert services.

• Example:

40 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 9 – Notification
Key Skills
Create a notification for the Book Order database insert

15 minutes

Ta s k
1. Create a new INSERT notification service, using the
BOOK_ORDER table.

2. Schedule the notification.

3. Successful notification should show something similar in the Server


Log:

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

Folder to create D106Exercises\exercise9

Order Table <current catalog>ISV6.BOOK_ORDER

Service Name BookOrderNotify

Notification Polling Interval 10 seconds

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 41


webMethods 6 Integration Workshop

R e s our ce s

• Developer On-line help: Create an Adapter Notification

• Participant Guide: Adapters & Notifications

• Exercises: Exercise 8a (Connection Alias) & 8b (Adapter Services)

Ti ps & Tr i ck s
• Make sure that you select the appropriate columns for inclusion in your
notification document.

• Test the notification by inserting an order into the Order Management


system using the exercise 8 resources. View results in the Server Log. You
should see how the entries get deleted from the buffer table.

• Worked Example:

42 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Exercise 10 – Web Services


Key Skills
Expose a service as a Web Service and invoke from a Web Service client

15 minutes

Ta s k
If you have no Internet access, you will have to skip the external WSDL access portion of
this exercise.

1. Create a Web Service connector to call the built-in service


pub.math:addInts.

2. Create another Web Service connector, using either the URL to the
BabelFish Web Service, or the saved BabelFish WSD file. Test (if you have
Internet access).

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

WSD Data Host: <your IP Address>


Port: 5555
Protocol: SOAP-RPC
Via Transport: HTTP
Target Namespace <blank>

Folder to create D106Exercises\exercise10

Local Service to use pub.math:addInts

Directory for WSD \webMethods6\IntegrationServer\packages\D106Support\pub


files

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 43


webMethods 6 Integration Workshop

Web Service http://www.xmethods.net/sd/BabelFishService.wsdl


connector URL

Web Service WSDL BabelFishService.wsdl


file

R e s our ce s

• Developer On-line help: Generate WSDL and Create a Web Service


Connector

• Participant Guide: Web Services

• IS Web Services Developer’s Guide

Ti ps & Tr i ck s
• Files saved to the pub directory of a package are automatically hosted on
the built-in IS web server with a URL of
http://server:port/PackageName/filename. <case-sensitive>

1. Use the Tools…Generate WSD command and generate a WSD file


for the built-in service pub.math:addInts. Save the file as indicated in the
table. Save the Web Service connector in the exercise folder. Test your
Web Service.

2. Create another Web Service connector, using either the URL to the
BabelFish Web Service, or the saved BabelFish WSD file. Save it also in the
exercise folder. Test this Web Service as well.

• Run the connector with appropriate inputs and confirm results.


Compare the execution of the service as a standard Flow with that of a Web
Service.

• With a browser, navigate to


http://www.xmethods.net/sd/BabelFishService.wsdl. This is the home page on
xmethods.net for the AltaVista language translator. You may point to this
external resource either by URL or you may save the WSDL file locally to your
machine and use that.

• For legal values for translation code, there are many language codes such
as en_fr and fr_en, en_it and it_en, en_es and es_en, for two way French-
English, Italian-English, and Spanish-English (try a variety if you know a few

44 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

languages). For general information on using the service, see the usage notes on
the BabelFish page on xmethods.net.

• Examples:

addInts Web Service

BabelFish Web Service:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 45


webMethods 6 Integration Workshop

46 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

This page intentionally left blank

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 47


webMethods 6 Integration Workshop

Exercise 11 – Trading Networks Profiles


Key Skills
Create local and partner profiles in Trading Networks

20 minutes

Ta s k
The ACME business case uses Trading Networks to manage XML communication with
trading partners. In this exercise, you will:

 Use the Profile Assistant to create your own TN local profile (Acme)
 Enable your profile
 Use the New Partner Profile option to create a partner profile (Acme
Customer)
 Enable your partner profile

Since configuring a Trading Networks profile uniquely and permanently identifies it, we
will use the same profile both here and in the business case activities.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

ACME DUNS 11-111-1111

Local Profile Delivery Protocol Primary HTTP


Method Host: <your IP Address>
Port: 5555
Location: /invoke/wm.tn/receive
Use as Preferred Protocol 

Partner DUNS 88-888-8888

48 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Partner Profile Protocol: Primary HTTP


Delivery Method Host: localhost
Port: 3333
Location: /
User Name: Administrator
Password: manage
Preferred: 

All other TN Settings <accept defaults>

R e s our ce s
• Participant Guide: Trading Networks

• TN Building Your Network Guide: Chapter 7: Defining and Managing


Your Profile

• TN Building Your Network Guide: Chapter 8: Defining and Managing


Partner Profiles

Ti ps & Tr i ck s
• You must use the Profile Assistant (Tools…Profile Assistant) to create
your own profile.

• Be sure that your External ID type (Corporate tab) has the DUNS type
selected.

• Be sure to use the DUNS numbers listed in the Required Data section for
the profiles

• Best practice is to make a profile as complete as possible – add address,


contact, etc. information as desired.

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 49


webMethods 6 Integration Workshop

Exercise 12 – Trading Networks Document Types


Key Skills
Create and submit a Trading Networks document

20 minutes

Ta s k
Trading Networks must be configured properly to receive and route order requests from
partners. This configuration is accomplished through TN document types.

In this exercise you will:

 Submit an XML Order document.

 Create the TN document type from the submitted document.

 Configure the document type attributes (Identify, Extract, Options).

 Create a processing rule for the document.

R e qui r e d Da ta
This section contains data required to complete this exercise. Refer to this data sheet as
necessary while performing the exercise.

Data Value

XML Order document test_order.xml

Order Document Type D106Support\docs\Test_Order

Order Request file path \webMethods6\IntegrationServer\packages\D106Support\pub

Identify Attributes Root Tag

Extract attributes SenderID: /Test_Order[0]/POHeader[0]/Sender[0]

50 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

ReceiverID: /Test_Order[0]/POHeader[0]/Receiver[0]

ConversationID: /Test_Order[0]/POHeader[0]/@transaction

Options Format as an IS Document type:

D106Support.docs:Test_Order

Processing Rule Criteria: Any Sender, My Enterprise Receiver,

Document Type Test Order

Action: Change User Status to Delivered

TN Web Manager URL http://localhost:5555/WmTNWeb <case sensitive>

Web Manager logon <youruser> / <yourpassword> <case sensitive>

R e s our ce s
• Participant Guide: Trading Networks

• TN Building Your Network Guide: Chapter 9: Creating Document Types

Ti ps & Tr i ck s
• Refresh the Transaction Analysis screen in TN Console to find
recently submitted documents.

• To simplify document submission, open the XML Order Request in a text


editor and copy and paste the content into the Web Manager form.

• Use the Query in the left hand pane to automatically generate XML
queries from your document source

• Be sure to specify Detail: DUNS for your SenderID and ReceiverID.

• Example:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 51


webMethods 6 Integration Workshop

Document Type

Processing Rule part 1

52 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

Processing Rule Part 2

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 53


webMethods 6 Integration Workshop

Exercise 13 – Monitoring Services


Key Skills
Use the Monitor to track the execution of services

15 minutes

Ta s k
Enable Audit Logging for exercise3:docInput.

Run, Monitor and Resubmit.

R e qui r e d Da ta
This section contains data required to complete this exercise.

Data Value

Audit Settings Always, Error and Success, Always save pipeline

webMethods Monitor URL http://localhost:5555/WmMonitor (case sensitive)

R e s our ce s

• webMethods Administrator On-line help: Package Management

• Participant Guide: Monitor

• Monitor User’s Guide: Chapter 6: Monitoring Services and Integrations

Ti ps & Tr i ck s
• Remember to create an alias. Use the hostname shown in the
Administrator header.

54 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

• Worked Example:

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 55


webMethods 6 Integration Workshop

Exercise 14 – Configure Logical Servers


Key Skills
Create Logical Servers for use in webMethods Modeler

20 minutes

Ta s k
The ACME business process will be deployed to one IS server.

Create a single logical server AND physical server for use in webMethods Modeler.

R e qui r e d Da ta
This section contains data required to complete this exercise.

Data Value

Logical Server Name IS

WebMethods Administrator URL http://localhost:5555/WmAdmin (case sensitive)

R e s our ce s

• webMethods Administrator On-line help: Add Resources and Add


Logical Servers

• Participant Guide: Working with Modeler

• Modeler User’s Guide: Chapter 5: Configuring webMethods Modeler

Ti ps & Tr i ck s
• Be sure to check the add boxes when adding registered servers to a
resource folder.

 Create a resource folder to contain your resources.

56 Version: 030102 Copyright  2003 by webMethods, Inc. All rights


reserved
webMethods 6 Integration Workshop

 Add resources and register servers into the new folder.

 Add one IS logical server, called IS.

 Launch Modeler using the Start Menu shortcut and confirm server data
using the View…Server Connections menu

Copyright  2003 by webMethods, Inc. All rights reserved Version: 030102 57

You might also like