Webmethods Introduction
Webmethods Introduction
2
THE WEBMETHODS ADVANTAGE........................................................................................................................2
HOW TO START / STOP THE SERVER AND DEVELOPER...............................................................2
HOW TO START SERVER & DEVELOPER..............................................................................................................2
HOW TO SHUTDOWN SERVER & DEVELOPER :....................................................................................................4
2.WEBMETHODS INTEGRATION PLATFORM....................................................................................5
ADVANTAGES OF WEBMETHODS :.......................................................................................................................6
BASIC CONCEPT OF WEBMETHODS..................................................................................................6
FLOW SERVICE.................................................................................................................................................6
FLOW STEP......................................................................................................................................................6
PIPELINE.........................................................................................................................................................9
DATA TYPES.................................................................................................................................................10
CREATING STANDARD OUT PUT TEMPLATE..........................................................................................................10
CREATING A FLOW SERVICE............................................................................................................................11
NAME SPACE ................................................................................................................................................11
SERVICE........................................................................................................................................................12
TRANSFORMERS.............................................................................................................................................12
JAVA SERVICES........................................................................................................................................12
HOW TO BUILD JAVA SERVICE..........................................................................................................................12
IDATA OBJECT.....................................................................................................................................13
EXAMPLES TO PRACTICE.....................................................................................................................13
ADVANCED WEBMETHODS 6.0............................................................................................................19
RUN-TIME COMPONENTS ................................................................................................................................19
DESIGN-TIME COMPONENT...............................................................................................................................23
ADMINISTRATIVE AND MONITORING..................................................................................................................25
Introduction to WebMethod
WebMethods is an Integration Platform that has many runtime components and Development
tools. It includes EAI and B2B capability. WebMethods supports many e-standards Like XML
RosettaNet and EDI, etc.
WebMethods is considered a middleware market. Its main competitors are TIBCO, Vitria,
Seebeyond and IBM WebSphere MQ product series. If you consider EDI, mapping market than
products like Mercator and Cyclone also in the space.
Webmethods advantage is a good graphical tool to produce flow service that do the mapping
from any data format into other format and connecting different application together. It also
servers as hub for Trading Partnet integration. You do not build applications in webmethods
instead you use it to integrate your SAP-ERP system to Siebel CRM as example or Mainframe to
PeopleSoft
cd webmethods\IntegrationServer4
If you want to shut down the server, then click the option “Shut Down and Restart “ in
Server administrator screen which is top right corner and then logoff.
In case Developer you can log out the by choosing the top left corner.
Admin Screen :
2. webMethods Integration Platform
Servers
Clients
Clients :
The Developer, Modeler and workflow tools are used only during development and
deployment.
Servers :
The Diagram shows how multiple server can work together to create a scalable cluster
environment. The IS can contain any number of packages like TN,Adapters, MainFrame,
Admin and other management functions.
Advantages of webMethods :
Flow service
A flow service is a service that is written in webMethods flow language. This
simple yet powerful language lets you encapsulate a sequence of services within
a single service and manage the flow of data among them.
Flow step
A flow step is a basic unit of work (expressed in webMethods flow language).Flow
Step is used to invoke a Service. The following are the different types of flow
steps:
• Invocation Steps.
• Data-Handling Steps.
• Flow Control Steps.
2.1.1. Invocation Steps (INVOKE):
The INVOKE Step is used to execute a service from within a flow i.e., already
one service has been created and you want to use that service in the current
Flow service then use INVOKE Step.
The above lines say that if the Validate Input gives Invalid output, the
Branch Child step will be executed else step 3 will be executed.
Pipeline
Pipeline is used to refer to the data structure in which input and output values
are maintained for a flow service. It allows services in the flow to share data. The
pipeline starts with the input to the flow service and collects inputs and outputs
from subsequent services in the flow. When a service in the flow executes, it has
access to all data in the pipeline at that point.
Data Types
(as per webMethods 4.x)
Data
S.No. Description Remarks
Type
<HTML>
<BODY>
<H1>Order Processed</H1>
Send: <B>%value send_month%/%value send_day%/
%value send_year%</B><BR>
Arrive: <B>%value arrive_month%/%value arrive_day%/
%value arrive_year%</B><BR>
Transaction Number: <B>%value transaction_number%</B><BR>
GSG Acknowledgment: <B>%value GSG_ack_number%</B>
</BODY>
</HTML>
1. Create Package
2. Create Folder under that package.
3. Create Flow Service under that Folder.
2.1.4. Package
A package is a container that is used to bundle services and related elements,
such as Specifications, records, IS schemas, and output templates. When you
create a folder, Service, specification, record, IS schema, or output template,
you save it in a package.
2.1.5. Folder
Folders can contain services, specifications, records, and other folders. When
you create a folder, you also need to select the package in which it will be
stored. Before you create any flows, you need to create a folder to store the
flow services in.
Name Space
Every service on a webMethods Integration Server has a universal name in
addition to its regular webMethods name. A universal name is a unique public
identifier that external protocols use to reference a service on a webMethods
Integration Server. A universal name has two parts: a namespace name and a
local name.
The local name uniquely identifies a service within a particular namespace. For
example, all of the following would be valid local names for a service called
orders:postOrder:postOrder
PO
orders.add.regularPO
Service
Service is a Unit of functionality that client can invoke .A fully qualified service
name is comprised of two parts ,a folder identifier and the service name
separated by colon(:).
If the folder portion identifier more than one folder, separate each folder name
with a period.
Transformers
Transformers are the services that can be used to exchange the values/MAP the
data types from Pipe Line in to Pipe Line out. You can only insert a transformer
into a MAP step. You can use any service as a transformer. This includes any
Java, C or flow service that you create and any built-in services in WmPublic,
such as the pub.date.currentDate and the pub.string.concat services. By using
transformers, you can invoke multiple services (and perform multiple value
transformations) in a single flow step.
Java Services
By Default webMethods will have lot of Built in Services for supporting various
functionalities like string operations, mathematical operations, file operations, IO
operations and etc. WebMethod will allow to develop customized services using
Java,C/C++ and VB. But all the services in the webMethods have developed with
Java. WebMethods provides different API for developing customized Java
Services.
The following describes the basic stages involved in creating a Java service with
Developer.
Example :
public final static void myservice (IData pipeline)
throws ServiceException
{
return;
}
Examples to practice
Example 1: This Example will explain how to Use Transformers
This Example gives overall idea how to declare Input/Output, MAP, Transformers
and basic String operation. This exercise will explain concatenation of two strings
in order to give clear picture of string functions.
Step : 1
Create Folder (Ex : Demo)
Create Package under above Demo Folder (Ex: Test)
Create Flow Service under Test Package (Ex: StringDemo)
Step : 2
Create input and output variables as a String
Input : StrA , StrB
Output : Result
Step :3 Flow Steps
Create Flow Step using WmPublic.Pub.String.Trim and WmPublic.Pub.String are
existing services.
• trim (accept string in input variable strA and map it to inString in
ServiceIn of the Pipeline and map the value output to strA)
• trim (accept string in input variable strB and map it to inString in
ServiceIn of the Pipeline and map the value output to strB)
• concat (take strA map it to inString1 of concat function serviceIn and
assign a value to inString2)
• concat (take strB map it to inString1 of concat function serviceIn and
value (output of previous concat function) to inString2)
Step : 4
Save the service and RUN the service by pressing F5 or RUN button on the tool
bar
Step :1
Create Folder and Package.
Create Flow Service (Ex : Branch Demo)
Step : 2
Create Input and out parameters of String type.
Input : Input-A, Input-B and Operation
Output : Result
Step :3 Flow Steps
Create Flow Step using WmPublic.Pub.Math ,which are built in services
Step : 4
Save the service and RUN the service by pressing F5 or RUN button on the tool
bar
Example 3: This Example will explain how to Use Loop Step
This Example gives overall idea how to declare Record List and how to extract the
particular record from the Record List using loop, Branching, Sequence, and
MAPPING.
Step: 1
Create Folder and Package.
Create Flow Service (Ex Loop Demo)
Step: 2
Create Input and out parameters
Input : Address as a Record List
Output : Result as a String
Step: 3 Flow Steps:
• Create Loop and in the properties of the loop keep the value as
“Address/Phoneno” as a in-array .This will loop over the phone no.
• Create Branch under the loop and declare the switch value as a
“$iteration”.
• Create a Sequence and in the properties of the sequence, assign label as
“3”
• Create MAP and Map the phone number of the Address Record list to the
Result which you want to extract.
• Create default Sequence.
Step: 4
Save the service and RUN the service by pressing F5 or RUN button on the tool
bar.
This Example gives overall idea how to load XML file, Record List,nodes and
converting XML file to Records.
Step: 1
Create Folder and Package.
Create Flow Service (Ex File Demo)
Step: 2 Flow Steps
Flow Step will be created using the Built in services like
WmPublic.Pub.File.GetFile,WmPublic.Pub.Web.stringToDocument,
WmPublic.Pub.Web.DocumentToRecord
a. getFile (Load the XML file and the output will be in Bytes).
b. stringToDocument (Bytes of data which we got from getFile, is given as
input to $filedata object and which gives node as output).
c. DocumetToRecord (node which we got from previous step is given to node
as input and the output we get is Record).
d. Map (finally we create a Recordlist in output parameter and map the
Record node which we got in the step c).
Step: 4
Save the service and RUN the service by pressing F5 or RUN button on the tool
bar.
This Example gives overall idea how to convert RecordList to XML String Record.
Step: 1
Create Folder and Package.
Create Flow Service (Ex File Demo)
Step: 2 Flow Steps
Flow Step will be created using the Built in services like
WmPublic.pub.Web.RecordtoDocument,WmPublic.pub.Record.Length,
WmPublic.pub.record.recordListToRecord.
Run-Time Components
2.1.6. webMethods Integration Server
Integration server is central run time component and primary engine for the
execution of the integration logic.
The Integration Server is the central point of contact between the integration
platform and systems outside the enterprise. It performs to work of retrieving
data from one resource and delivering it to another by executing integration
logic.
2.1.7. webMethods Broker
The Broker is high-speed message router and it is generally referred to as the
message back bone or message facility. The Broker provides asynchronous
and message-based solution using publish-and-subscribe model.
The application that produce the information make that information available
in specific types of documents that they publish to the Broker. Application
that require information subscribe to the specific types of documents that
they need from the Broker. The role of the Broker is to route documents
between information producers (publishers) and information consumers
(subscribers).
The Workflow Server is a client of the Broker. The Broker provides the
underlying publish-and-subscribe messaging infrastructure upon which
workflows are implemented.
Design-Time component
2.1.12. webMethods Modeler
WebMethods Modular is a graphical tool used to design and implement the
business processes. Business process is multi-step interaction among
participating systems, people and trading partners.
Modeler is used to describe the interactions and relationships of sequence of
activities. Process models designed with the modeler describe a sequence of
steps and specific how information flows among them.