26
INTRODUCTION TO WEBMETHOD ....................................................................................................... 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

WebMethods Introduction

Embed Size (px)

Citation preview

Page 1: WebMethods Introduction

INTRODUCTION TO WEBMETHOD ....................................................................................................... 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

Page 2: WebMethods Introduction

Introduction to WebMethodWebMethods 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

The webMethods Advantage1.1.1. Improved business responsiveness:Get real-time visibility into your enterprise-wide business processes and up to the minute status information.

1.1.2. User-focused information:Define the exact data to be captured to support your analytical and decision making requirements.

How to start / stop the Server and Developer

How to start Server & Developer1.1.3. Server

The Server can start in two ways:

• By Clicking the “Start webMethods Integration Server 4.6 (SP1)” icon on desktop or through Start ProgramswebMethods” Start webMethods Integration Server 4.6 (SP1)”.

• Through command prompt. Go to bin directory of the webMethods of Integration Server and use the command “server.bat switch –switch” for starting of the server.

cd webmethods\IntegrationServer4

Type the following command to start the server:

For Windows: bin\server.bat –switch –switch …

For UNIX: bin/server.sh –switch –switch …Where switch is any of the following:

Switch: 1.–Port (Port Number)

Page 3: WebMethods Introduction

2.-home(Directory Name) 3.-debug(level—1 to 5) 4.-log (Destination-filename/none)

Example: \webMethods Integration Server\bin server.bat -log none -debug 5

Page 4: WebMethods Introduction

1.1.4. DeveloperThe Developer can start in two ways:

• Through Start ProgramswebMethods” webMethods Developer “

• Through command prompt .Go to bin directory of the webMethods of Developer and use the command “integrator.bat -log none -debug 5” for starting of the developer.

\webMethods Developer\bin integrator. bat -log none -debug 5 Note:

• The default server username is “Administrator” and password is “manage”.• For Developer the default Username is “Developer” and Password is “isdev”• To check the server is running or not type URL : http://localhost:5555 and give username and password which is mentioned above.

How to shutdown Server & Developer :

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 :

Page 5: WebMethods Introduction

2. webMethods Integration Platform

ClientsServers

Page 6: WebMethods Introduction

Clients :

The Developer, Modeler and workflow tools are used only during development and deployment.

Other Tools are used in both development and runtime.

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 :

• Maintenance and support is easy in webMethods.• Project development is easy with proper architecture.• Many inbuilt features are available. • We can integrate to any kind of legacy systems in webMethods.• We can write our own custom code very easily if the adapters are not available.

Basic concept of WebMethods

Flow serviceA 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 stepA 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 Symbol of the INVOKE Step

2.1.2. Data-Handling Steps (MAP):

Page 7: WebMethods Introduction

Performs specified editing operations on the pipeline (e.g., mapping variables in the pipeline, adding variables to the pipeline, dropping variables from the pipeline, and so forth).

The Symbol of the MAP

2.1.3. Flow Control Steps: The following are the different types of Flow Control Steps:

• Branch Step• Sequence Step• Loop Step• Repeat Step• Exit Step

2.1.3.1. Branch StepBranch step is used as if and else statement in a normal programming language, for example IF we need to check the date entered is valid or not, we would do the following steps :

1. Validate Input (Returns VALID or INVALID)2. BRANCH on \ Validate Input (INVALID – setting the value of BRANCH

to INVALID)a. Child Steps of Branch here

3. Calculate based on the Date given

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.

The Symbol of the Branch

2.1.3.2. Sequence StepConditionally execute a series of multiple steps we use SEQUENCE step, for example we can use on a BRANCH step and based the condition we can execute series of SEQUENCE (number of flow steps). SEQUENCE as an Exit-on property and it can be set to FAILURE / SUCCESS / DONE.

The Symbol of the Sequence Step.

2.1.3.3. Loop Step Loop step is used to iterate through the string list or Record list, if loop over a string list the code in the loop will have a string with the same name, and if loop over a record list the code in the loop will have a record with the same name. At each iteration, one item from the list is put on the pipeline.

Page 8: WebMethods Introduction

The Symbol of the Loop Step

2.1.3.4. Repeat Step The REPEAT step allows you to conditionally repeat a sequence of child steps based on the successes or failure of the child steps.

The Symbol of the Repeat Step

2.1.3.5. Exit StepThe Exit Step is used to exit from the flow with in the service or exit from loop.

The Symbol of the Exit Step.

Page 9: WebMethods Introduction

Typical Screen looks as follows :

PipelinePipeline 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.

Page 10: WebMethods Introduction

Data Types(as per webMethods 4.x)

S.No. Data Type

Description Remarks

1 String String of Characters java.lang.String package

2 String List One-Dimensional String Array

java.lang.String []

3 String Table

Two-Dimensional String Array

java.lang.String [] []

4 Record Records can contain other data type. The record stored as key/value pairs.

com.wm.data.IDatecom.wm.util.Values

5 Record List One-Dimensional Record Array

com.wm.data.IDate []com.wm.util.Values []com.wm.util.Table

6 Record Reference

Record structure has been defined by a Record in the service browser

7 Record Reference List

An array of records whose structure is defined by the record in the service browser.

8 Object Data type that does’t fall into any data types described in the above then that data type is shown as Object

Any sub class of java.lang.Object

9 Object List Array Objects Array of sub class of java.lang.Object[]

Creating standard out put TemplateService Output templates are used to insert output values from a service into a string that we define. Output Templates are most frequently used to customize the HTML page that a service returns to a browser-based application. This can be achieved by executing the following steps:

1. Click the Settings Tab2. Click New to enter the service output template editor3. Type in the HTML tags you want to display example

<HTML><BODY><H1>Order Processed</H1>Send: <B>%value send_month%/%value send_day%/

Page 11: WebMethods Introduction

%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>

Creating a Flow ServiceThe Following steps have to be follow when you create the Flow Service.

1. Create Package2. 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.

On the server, a package represents a subdirectory within the webMethods\IntegrationServer6\packages directory. All the components that belong to a package reside in the package subdirectory.

Note : Every service in webMethods Developer must belong to a package.

2.1.5. FolderFolders 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 namespace name is a qualifier that distinguishes a webMethods service fromOther resources on the Internet with the same local name. For example, are all validNamespace names:

• http://www.gsx.com• myNamespaceName• gl.journals.cashTransactions

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

Page 12: WebMethods Introduction

POorders.add.regularPO

ServiceService 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.

Example : folder : service(Finance : StockQuote) Folder.subfolder1.subfolder2: Service

TransformersTransformers 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 ServicesBy 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.

How to build Java ServiceWebMethods Developer provides an Integrated Development Environment (IDE) that you can use to create, compile, and publish Java services. The IDE automatically generates an appropriately-structured source file that you simply .fill-in. using the built-in editor. When you save the source file, the IDE automatically compiles it and registers it on the server.

The following describes the basic stages involved in creating a Java service with Developer.

Step : 1 : Specify the inputs and outputs of the serviceThis stage is optional, but recommended. During this stage, you define the service.s inputs and outputs.

Step : 2 : Create the Java service using Developer.Write your program in Developer’s IDE.

Step : 3 : Specify the service’s run-time parameters. Assign parameters that configure the run-time environment for this service.

Page 13: WebMethods Introduction

IDATA ObjectThe IData object is used to receive input from and deliver output to other programs. It contains an ordered collection of key/value pairs on which a service operates. An IData object can contain any number of key/values pairs (elements). The keys in an IData object must be Strings. The values can be any Java objects (including IData objects).

Example :public final static void myservice (IData pipeline)throws ServiceException{return;

}

Examples to practiceExample 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)

Page 14: WebMethods Introduction

Create Flow Service under Test Package (Ex: StringDemo)Step : 2Create input and output variables as a StringInput : StrA , StrBOutput : ResultStep :3 Flow StepsCreate 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

Inputs: strA = “Yatheendranath”, strB = “Yadav”, instring2 in step 3 = “-WIPRO-”Output :Result : Yatheendranath-Wipro-Yadav

Page 15: WebMethods Introduction

Example 2: This Example will explain how to Use Brach Step

This Example gives overall idea how to declare Input/Output, Branching, Sequence , MAPPING and Exit Step, Transformers, and basic Mathematical operation. This exercise is done to get a feel of Math functions.

Step :1Create Folder and Package.Create Flow Service (Ex : Branch Demo)Step : 2Create Input and out parameters of String type.Input : Input-A, Input-B and OperationOutput : ResultStep :3 Flow StepsCreate Flow Step using WmPublic.Pub.Math ,which are built in services

• Branch on Operation ,if the Operation is Add or Sub it will go to the particular Sequence Step to perform specific operation else it goes to the default Sequence Step to perform the Sequence of the operations under that sequence.

• Create Sequence Step under the Branch and give label as “Add”. Under this Sequence invoke the service addInts from Pub.Math and Map Int-A and Int-B to the respective num1 and num2 values in the Service In of Transformers and also Map the values of ServiceOut to the Result of the output.

• Use Exit Step for coming out from the flow of the Branch.• Similarly Create for “Sub” Sequence also.• Create a Sequence and choose the “$default” as a label from the

dropdown.• Create Map under that Sequence and set default value for the Result of

the output.

Step : 4

Page 16: WebMethods Introduction

Save the service and RUN the service by pressing F5 or RUN button on the tool bar

Page 17: WebMethods Introduction

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: 1Create Folder and Package.Create Flow Service (Ex Loop Demo)Step: 2Create Input and out parameters Input : Address as a Record List Output : Result as a StringStep: 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: 4Save the service and RUN the service by pressing F5 or RUN button on the tool bar.

Example 4: This Example will explain how to convert XML to RecordList.

This Example gives overall idea how to load XML file, Record List,nodes and converting XML file to Records.

Step: 1Create Folder and Package.Create Flow Service (Ex File Demo)Step: 2 Flow StepsFlow Step will be created using the Built in services like WmPublic.Pub.File.GetFile,WmPublic.Pub.Web.stringToDocument, WmPublic.Pub.Web.DocumentToRecord

Page 18: WebMethods Introduction

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: 4Save the service and RUN the service by pressing F5 or RUN button on the tool bar.

Example 5: This Example will explain how to convert RecordList to XML String.

This Example gives overall idea how to convert RecordList to XML String Record.Step: 1Create Folder and Package.Create Flow Service (Ex File Demo)Step: 2 Flow StepsFlow Step will be created using the Built in services like WmPublic.pub.Web.RecordtoDocument,WmPublic.pub.Record.Length, WmPublic.pub.record.recordListToRecord.

a. getFile (Previously explained which gives us record list)b. recordToDocument( takes in a record list / record and gives output as XML

data string)c. length (takes in the record list and gives the count of number of records in

the list)

Page 19: WebMethods Introduction

Advanced WebMethods 6.0The webMethods Integration Platform is made up of components that you use to design, execute, and manage integration solutions. Components fall into three basic categories: run-time components, design-time components, and administrative components.S.No Component Type Description

1 Run-Time webMethods Integration ServerwebMethods BrokerwebMethods AdapterswebMethods MainframewebMethodsTrading Networks & eStandard ModuleswebMethods Workflow

2 Design-Time webMethods ModelerwebMethods Workflow DesignerwebMethods DeveloperwebMethods Trading Networks Console.

3 Administrative andMonitoring

webMethods Administrator webMethods Monitor webMethods Manager

Run-Time Components 2.1.6. webMethods Integration ServerIntegration 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.

Page 20: WebMethods Introduction

2.1.7. webMethods BrokerThe 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 Broker maintains a list of subscribers that are interested in receiving certain types of documents. When a component publishes a document, the Broker queues the document for the subscribers of that particular document type. When a subscriber receives a document from its queue, an action is triggered on the subscriber’s system that processes document.

2.1.7.1. Detail about the Publish and Subscribe Model

2.1.8. WebMethods AdaptersAdapters are used to connect the back-end systems like database or other applications.

Page 21: WebMethods Introduction

The adapter handles the low-level work of connecting to the resource, managing communications, encoding and decoding data, and invoking processes via the resource’s API.

At run time, the Integration Server initiates a process on a back-end resource via an adapter service. An adapter service runs on the Integration Server and uses the functions of the adapter to invoke specific processes on a resource. (For example, an adapter service might query a database, post a journal entry to a general ledger application, or delete an item from an inventory system). Because adapter services execute on the Integration Server, they also have full access to the server’s file handling (XML and flat file) and transport (HTTP, FTP, SMTP) capabilities.

2.1.8.1. Generally Available webMethods Adapters• Ariba Supplier OnRamp • BEA WLI • BroadVision • Clarify • CommerceOne MarketSite OnRamp • Enterprise JavaBeans • Informatica • J.D. Edwards OneWorld • J.D. Edwards WorldSoftware • JDBC • JMS • Lotus Notes • MSMQ • Oracle Applications • PeopleSoft • SAP • Siebel • webMethods Adapter Development Kit • webMethods Character Replacer • webMethods Multibyte File Parser • webMethods Zengin TCP/IP Adapter

Page 22: WebMethods Introduction

• WebSphere MQ • XSLT Module

2.1.8.2. Detail about the JDBC Adapter

2.1.9. webMethods MainframeThe webMethods Mainframe component will act as an agent between Integration server and online application running under CICS(Customer Information Control System)or IMS/DC(Information Management System/Data Communications) on the Mainframe computes.In WebMethods it uses publish and subscribe model.

2.1.10. webMethods Trading Networks & eStandard ModulesThe Trading Networks is an add-on component that runs on the Integration server. We use Trading Networks to build, manage and analyze your network of trading partners in document-oriented exchange scenario. The trading partner came any system, inside or outside your enterprise that produces or consumes business documents.

When Trading Networks receives a document at run time, it dispatches the document to the appropriate process based on processing rules that you specify. A processing rule specifies the actions that Trading Networks is to execute when it receives a document matching the rule’s criteria. It receives a document to a service for processing.

Page 23: WebMethods Introduction

2.1.11. webMethods WorkflowA workflow is a series of tasks performed by one or more people (participants) at execution time. Approval and review processes are examples of work that is commonly implemented through work flows. Workflows are also often used for exception handling in otherwise automated processes.

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 component2.1.12. webMethods ModelerWebMethods 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.

Page 24: WebMethods Introduction

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.

Process model is composed of steps(i.e., a unit of work), transitions(i.e., it represents the flowof control or passing of information between steps) and documents(i.e., it represents the data consumed by (input) or produced by (output) a step.

2.1.13. webMethods Workflow DesignerWorkflow Designer is used to develop and deploy workflows. Workflows designer allows you to model tasks. A task is the unit of work that workflow participant must complete before the workflow can proceed. When you build workflow with Designer, you can control elements that govern the sequencing of tasks.

2.1.14. webMethods DeveloperwebMethods Developer is a graphical development tool that you use to build,edit and test the integration logic.2.1.15. webMethods Trading Networks ConsoleTrading Networks console is the tool you use to configure the Trading Networks component. You use Trading Networks console to define partner profile, document types and processing rules.

Page 25: WebMethods Introduction

Administrative and Monitoring2.1.16. webMethods AdministratorWebMethods Administrator allows you to configure and administrative interfaces like Integration server, Mainframe Component and Broker.

2.1.17. webMethods MonitorWebMethods Monitor is an administrative tool that you use to examine instances of business processes,services and documents that the integration platform is processing or has finished processing.

Page 26: WebMethods Introduction