Using EntireX to Create and Consume Web Services alex Burggraf - PowerPoint PPT Presentation

1 / 72
About This Presentation
Title:

Using EntireX to Create and Consume Web Services alex Burggraf

Description:

.NET. Wrapper. XML. Wrapper. COBOL. Wrapper. Natural ... Web Service Crash Course / 11 / 11. Natural and Web Services. Software AG. Web Services Defined ... – PowerPoint PPT presentation

Number of Views:1793
Avg rating:3.0/5.0
Slides: 73
Provided by: dave135
Category:

less

Transcript and Presenter's Notes

Title: Using EntireX to Create and Consume Web Services alex Burggraf


1
Using EntireX to Create and ConsumeWeb
Servicesalex Burggraf
2
Intoduction / Background
  • alex Burggraf
  • Software AG
  • Advisory System Engineer
  • (415)318-6952
  • alex.Burggraf_at_SoftwareAG.com

working for Software AG for 15 Years in the US
since 5 years (San Francisco) specializes in
system integration and web technologies will
never loose my Austrian accent
3
Objectives
  • After this presentation, you will be able to
  • Identify some of the new terms used with Web
    Services
  • Identify the Web Services standards SOAP, WSDL,
    and UDDI
  • Describe the architecture of Web Services
  • Identify the components of a WSDL
  • Describe the steps for creating a Web Service
    with EntireX
  • Explain the concept of SOAP
  • Explain the steps to Create a Mainframe Web
    Service
  • Steps necessary to deploy the EntireX Servlet
  • Explain the steps to Create a Natural Client to
    call a Web Service
  • Describe the configuration/setup of the XML RPC
    Server

4
EntireX Refresher
5
Bridging The Gap
DEVELOP DEPLOY
Interface Mapping
UDDI, WSDL
Invoke Legacy Service
Business Client
Business Function
Consume Service
Business Client
Business Service
6
EntireX Architecture
Interface Mapping
J2EE Wrapper
.NET Wrapper
Business Client
Business Function
XML Wrapper
COBOL Wrapper
Natural Wrapper
7
Integration from/to SOAP / XML
DEVELOP DEPLOY
Interface Mapping
UDDI, WSDL
Web Service Environment
Invoke Legacy Service
Web Service Consumer
XML / Web Service Wrapper
Consume Service
XML / Web Service
XML RPC Server
Unix, Linux, Windows
8
Legacy Integration into SOAP / XMLExposing
Legacy as Web Services
Map PDA to IDL
Generate Web Service
Deploy WSDL and UDDI
Expose as Web Service
9
SOAP / XML Integration into LegacyConsuming Web
Services from Legacy
Map WSDL/XML to IDL
Wrap Natural PDA
Consume Web Service
10
Web Service Crash Course
11
Web Services Defined
  • Web Services are
  • Self-describing, self-contained modular
    applications
  • Platform independent
  • Built using open standards for description,
    discovery, and invocation (e.g., WSDL, SOAP,
    HTTP)
  • Programmatically connects business processes
  • Provides integration with existing systems
  • Web Services perform business functions
  • From simple request/reply communication
  • Web Services
  • Can be mixed and matched to create complete
    processes
  • Enable dynamic integration
  • Can be new or can use existing applications

12
Web Services Standards
Registry
Web ServiceBroker
UDDI
           
Discover Service
Publish Service Description
Get Service Description
SOAP
SOAP
Server
Client
SOAP
ServiceDescription
Web ServiceProvider
Web ServiceRequester
WSDL
Use Service Based on Service Description
13
New Terms
  • URI
  • Short for Uniform Resource Identifier, the
    generic term for all types of names and addresses
    that refer to objects on the World Wide Web. A
    URL is one kind of URI.
  • Namespace
  • A collection of names, identified by a URI
    reference, that are used in XML documents as
    element types and attribute names. In order for
    XML documents to be able to use elements and
    attributes that have the same name but come from
    different sources, there must be a way to
    differentiate between the markup elements that
    come from the different sources.
  • XML Schema Definition (XSD)
  • A way to describe and validate data in an XML
    environment. A schema is a model for describing
    the structure of information. More important, XSD
    makes it easier to validate documents based on
    namespaces used to qualify element and attributes
    names by associating them with namespaces
    identified by URI references.

14
New Terms (continued)
  • Universal Description Discovery and Integration
    (UDDI)
  • A Web-based distributed directory that enables
    businesses to list themselves on the Internet and
    discover each other, similar to a traditional
    phone book's yellow and white pages.
  • Web Services Description Language (WSDL)
  • An XML formatted language used to describe a Web
    service's capabilities as collections of
    communication endpoints capable of exchanging
    messages. WSDL is an integral part of UDDI. WSDL
    is the language that UDDI uses.
  • SOAP
  • Lightweight XML-based protocol used to encode
    information in a Web Service request/response
    messages before sending them over a network. SOAP
    messages are independent of any operating system
    or protocol.
  • Servlet
  • A small program that runs on a server. The term
    usually refers to a Java object running within a
    Web Server environment.

15
SOAP
  • SOAP originally stood for Simple Object Access
    Protocol
  • SOAP specification now does not mandate the use
    of objects
  • W3C now says SOAP has no special meaning
  • SOAP still accepted protocol for Web Services
  • XML based protocol used for exchanging
    information between computers.
  • RPC based communication model (request/reply)
  • Uses HTTP transport protocol
  • Transport protocol-independent
  • Basically program-to-program communication using
    HTTP

16
SOAP Structure
SOAP envelope
  • ltSOAP-ENVEnvelope xmlnsSOAP-ENV"http//schemas.
    xmlsoap.org/soap/envelope/"
  • xmlnsSOAP-ENC"http//schemas.xmlsoap.org/soap/en
    coding/"
  • xmlnsxsihttp//www.w3.org/2001/XML
    Schema-instance
  • xmlnsxsd"http//www.w3.org/2001/XMLSchema"gt
  • ltSOAP-ENVBodygt
  • ltmPersread xmlnsm"urncom-softwareag-entire
    x-rpcWEBSERV" SOAP-
  • ENVencodingStyle"http//schemas.xmlsoa
    p.org/soap/encoding/"gt
  • ltPersonnel-ID xsitype"xsdstring"gtS
    tringlt/Personnel-IDgt
  • ltFirst-Name xsitype"xsdstring"gtStri
    nglt/First-Namegt
  • ltName xsitype"xsdstring"gtStringlt/Na
    megt
  • ltSex xsitype"xsdstring"gtStringlt/Sex
    gt
  • ltCity xsitype"xsdstring"gtStringlt/Ci
    tygt
  • lt/mPersreadgt
  • lt/SOAP-ENVBodygt
  • lt/SOAP-ENVEnvelopegt

SOAP body
17
SOAP Request
lt?xml version"1.0"?gt ltSOAP-ENVEnvelope
xmlnsSOAP-ENV"http//schemas.xmlsoap.org/soap/en
velope/" xmlnsSOAP-ENC"http//schemas.xmlsoap.o
rg/soap/encoding/" xmlnsxsihttp//www.w3.org/20
01/XML Schema-instance xmlnsxsd"http//www.w3.o
rg/2001/XMLSchema"gt ltSOAP-ENVBodygt
ltmPersread xmlnsm"urncom-softwareag-entirex-rp
cWEBSERV" SOAP- ENVencodingStyle"htt
p//schemas.xmlsoap.org/soap/encoding/"gt
ltPersonnel-ID xsitype"xsdstring"gt50005800lt/
Personnel-IDgt ltFirst-Name
xsitype"xsdstring"gtStringlt/First-Namegt
ltName xsitype"xsdstring"gtStringlt/Namegt
ltSex xsitype"xsdstring"gtStringlt/Sexgt
ltCity xsitype"xsdstring"gtStringlt/City
gt lt/mPersreadgt lt/SOAP-ENVBodygt lt/SOAP-E
NVEnvelopegt
18
SOAP Response
lt?xml version"1.0" encoding"UTF-8"?gt ltSOAP-ENV
Envelope SOAP- ENVencodingStyle"http//schemas.x
mlsoap.org/soap/encoding/" xmlnsSOAP-
ENC"http//schemas.xmlsoap.org/soap/encoding/"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xmlnsxsdhttp//www.w3.org/2001/XML
Schema xmlnsSOAP- ENV"http//schemas.xmlsoap.or
g/soap/envelope/"gt ltSOAP-ENVBodygt
ltmPersreadResponse xmlnsm"urncom-softwareag-en
tirex-rpcWEBSERV"gt ltPersonnel-ID1
xsitype"xsdstring"gt50005800lt/Personnel-ID1gt
ltFirst-Name1 xsitype"xsdstring"gtSIM
ONElt/First-Name1gt ltName1
xsitype"xsdstring"gtADAMlt/Name1gt
ltSex1 xsitype"xsdstring"gtFlt/Sex1gt
ltCity1 xsitype"xsdstring"gtJOIGNYlt/City1gt
lt/mPersreadResponsegt
lt/SOAP-ENVBodygt lt/SOAP-ENVEnvelopegt  
19
SOAP Encoding
lt?xml version"1.0" encoding"UTF-8"?gt
ltSOAP-ENVEnvelope xmlnsSOAP-ENV"http//schemas
.xmlsoap.org/soap/envelope/" xmlnsSOAP-ENC"http
//schemas.xmlsoap.org/soap/encoding/"
xmlnsxsihttp//www.w3.org/2001/XML
Schema-instance xmlnsxsd"http//www.w3.org/2001/
XMLSchema"gt ltSOAP-ENVBodygt
ltmgetPriceResponse xmlnsm"urnexamplepriceserv
ice"gt ltReturn xsitypexsddoublegt75.99lt
/Returngt lt/mgetPriceResponsegt
lt/SOAP-ENVBodygt lt/SOAP-ENVEnvelopegt
SOAP Response with a Data Type of Double
20
SOAP Enabling of EntireX RPC Servers
  • EntireX provides an "XML Wrapper" that enables
    XML-based communication to EntireX/Natural RPC
    servers.
  • From an incoming XML document
  • The XML Wrapper extracts the information
  • Assembles a call to an EntireX/Natural RPC
    server.
  • The result is converted into an outgoing XML
    document.
  • The XML Wrapper also supports SOAP mapping.
  • Includes proper handling of the SOAP envelope
  • Parsing and validating SOAP documents
  • Serializing RPC call results into SOAP responses
  • Assembling correct SOAP fault messages on errors.
  • WSDL file can be generated from the Workbench

           
           
21
XML Client Communication with RPC
22
Web Service Description
  • What is a WSDL ?
  • WSDL stands for Web Services Description
    Language
  • Basically an XML document that describes a Web
    Services

           
           
23
WSDL Specification
  • The six components the make up the WSDL
  • Definitions
  • Types
  • Message
  • Port type
  • Binding
  • Service
  • A WSDL is platform and language independent
  • Describes the Web Service

24
WSDL Specification
  • Definitions
  • Root element of WSDL defining the name of Web
    Service, declares multiple namespaces used in
    document, and contains all service elements.

ltdefinitions namePersread' targetNamespace'htt
p//namespace.softwareag.com/entirex/xml/mapping
xmlns'http//schemas.xmlsoap.org/wsdl/'
xmlnsxsd'http//www.w3.org/2001/XMLSchema xmln
ssoap'http//schemas.xmlsoap.org/wsdl/soap/ xml
nswsdl'http//schemas.xmlsoap.org/wsdl/
xmlnsSOAP-ENC'http//schemas.xmlsoap.org/soap/en
coding/ xmlnstns'http//namespace.softwareag.co
m/entirex/xml/mapping
25
WSDL Specification
  • Types
  • Elements describing data types between client and
    server. Uses W3C XML Schema specification.

lttypesgt ltschema targetNamespace'http//namespa
ce.softwareag.com/entirex/xml/mapping'
xmlns'http//www.w3.org/2001/XMLSchema'gt
lt/schemagt lt/typesgt
26
WSDL Specification
  • Message
  • Describes a one way message either a simple
    message request or single message response.

ltmessage name'Persread'gt ltpart
name'Personnel-ID' type'xsdstring'/gt
ltpart name'First-Name' type'xsdstring'/gt
ltpart name'Name' type'xsdstring'/gt ltpart
name'Sex' type'xsdstring'/gt ltpart
name'City' type'xsdstring'/gt lt/messagegt
ltmessage name'PersreadResponse'gt ltpart
name'Personnel-ID1' type'xsdstring'/gt
ltpart name'First-Name1' type'xsdstring'/gt
ltpart name'Name1' type'xsdstring'/gt
ltpart name'Sex1' type'xsdstring'/gt ltpart
name'City1' type'xsdstring'/gt
27
WSDL Specification
  • Port type
  • Combines multiple message elements to form a
    complete one-way or roundtrip operation.

ltportType namePersreadPort'gt ltoperation
name'Persread'gt ltinput
message'tnsPersread'/gt ltoutput
message'tnsPersreadResponse'/gt
lt/operationgt lt/portTypegt
28
WSDL Specification
  • Binding
  • How the service will be implemented on the wire
  • Service Address (URL) of the SOAP service
    (end-point)

ltbinding name'SystemSoapBinding'
type'tnsSystemPort'gt ltsoapbinding style'rpc'
transport'http//schemas.xmlsoap.org/soap/http'/gt
ltoperation name'Persread'gt ltsoapoperation
soapAction'Persread'/gt ltinputgt ltsoapbody
use'encoded' encodingStyle'http//schemas.xmlsoa
p.org/soap/encoding/' namespace'urnhttp//namesp
ace.softwareag.com/entirex/xml/mapping
/gt lt/inputgt ltoutputgt ltsoapbody use'encoded'
encodingStyle'http//schemas.xmlsoap.org/soap/enc
oding/' namespace'urnhttp//namespace.softwarea
g.com/entirex/xml/mapping' /gt lt/outputgt
lt/operationgt lt/bindinggt
29
WSDL Specification
  • Service
  • Defines the URL address for invoking the SOAP
    service

ltservice name'persread'gt ltport
name'SystemPort' binding'tnsSystemSoapBinding'gt
ltsoapaddress location'http//localhost8080/en
tirex/xmlrt'/gt lt/portgt lt/servicegt
lt/definitionsgt
30
WSDL
  • The EntireX Workbench provides a WSDL Wizard
  • The WSDL Wizard
  • Is a Java-based tool
  • Reads XMM mapping file
  • Generates 2001 Schema (recommended)
  • Supports variants, arrays, and dynamic arrays
  • Generates WSDL file

31
SOAP Client Toolkits
  • Microsoft SOAP Toolkit
  • Apache Axis Soap Toolkit
  • Microsoft .NET
  • Others

32
Steps for Creating a Mainframe Web Service
  • Server
  • define the RPC server (class/server/service) to
    Broker
  • set up the RPC server to run as a batch job
  • start the RPC server
  • write the Natural sub-program

33
Steps for Creating a Mainframe Web Service
  • Client
  • create or generate the IDL file
  • set the properties for the IDL file
  • define the XML mapping file
  • Develop the client front-end

34
Generating the XML from an IDL File
Save XML
Example.xml
Save IDL-XMM Mapping
Example.xmm
35
Using the EntireX Workbench
  • Now lets walk through the steps using the EntireX
    Workbench to create the
  • XMM File
  • SOAP
  • WSDL

36
IDL File
IDL
Properties
37
Define XML Mapping
38
Define SOAP Mapping
39
Define SOAP Mapping
40
Create XMM File
41
Create WSDL
42
Create WSDL Step 1
43
Create WSDL Step 2
44
Create WSDL Step 3
45
Create WSDL
46
Deploy the EntireX Servlet
  • Install a J2EE server in your environment
  • Deploy the entirex.war file into the J2EE server
  • Start J2EE server
  • An EntireX application folder will be built along
    with the necessary configuration files and jar
    files.
  • EntireX documentation has instructions for Tomcat
    and Websphere
  • entirex.war file is deployable in any standard
    J2EE server

47
Configure the EntireX Servlet
  • The xml-init.xml configuration file is where
    the XMM mapping files are referenced.
  • The xml-init.xml file is loaded when the J2EE
    server is started and assignes the available XMM
    files to the EntireX servlet.

lt?xml version"1.0" encoding"utf-8"?gt ltEntireXXML
Init Version"7.1.1 xmlns"http//namespaces.sof
twareag.com/entirex/xml/rt"gt ltxmmsgt
ltexx-xmmgt/webserv.xmmlt/exx-xmmgt
ltexx-xmmgt/example.xmmlt/exx-xmmgt
ltexx-xmmgt/zipcodes.xmmlt/exx-xmmgt
ltexx-xmmgt/persread.xmmlt/exx-xmmgt
lt/xmmsgt lt/EntireXXMLInitgt
48
Calling a Mainframe Web Service
  • Create a client program to call the Web Service
  • In the example, XML Spy is the client
  • The WSDL is used to create the SOAP
  • Provide the SOAP input parameter(s)
  • A SOAP response will return the data

49
SOAP Request
lt?xml version"1.0"?gt ltSOAP-ENVEnvelope
xmlnsSOAP-ENV"http//schemas.xmlsoap.org/soap/en
velope/" xmlnsSOAP-ENC"http//schemas.xmlsoap.o
rg/soap/encoding/" xmlnsxsihttp//www.w3.org/20
01/XML Schema-instance xmlnsxsd"http//www.w3.o
rg/2001/XMLSchema"gt ltSOAP-ENVBodygt
ltmPersread xmlnsm"urncom-softwareag-entirex-rp
cWEBSERV" SOAP- ENVencodingStyle"htt
p//schemas.xmlsoap.org/soap/encoding/"gt
ltPersonnel-ID xsitype"xsdstring"gt50005800lt/
Personnel-IDgt ltFirst-Name
xsitype"xsdstring"gtStringlt/First-Namegt
ltName xsitype"xsdstring"gtStringlt/Namegt
ltSex xsitype"xsdstring"gtStringlt/Sexgt
ltCity xsitype"xsdstring"gtStringlt/City
gt lt/mPersreadgt lt/SOAP-ENVBodygt lt/SOA
P-ENVEnvelopegt
50
SOAP Response
lt?xml version"1.0" encoding"UTF-8"?gt ltSOAP-ENV
Envelope SOAP- ENVencodingStyle"http//schemas.x
mlsoap.org/soap/encoding/" xmlnsSOAP-
ENC"http//schemas.xmlsoap.org/soap/encoding/"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xmlnsxsdhttp//www.w3.org/2001/XML
Schema xmlnsSOAP- ENV"http//schemas.xmlsoap.or
g/soap/envelope/"gt ltSOAP-ENVBodygt
ltmPersreadResponse xmlnsm"urncom-softwareag-en
tirex-rpcWEBSERV"gt ltPersonnel-ID1
xsitype"xsdstring"gt50005800lt/Personnel-ID1gt
ltFirst-Name1 xsitype"xsdstring"gtSIM
ONElt/First-Name1gt ltName1
xsitype"xsdstring"gtADAMlt/Name1gt
ltSex1 xsitype"xsdstring"gtFlt/Sex1gt
ltCity1 xsitype"xsdstring"gtJOIGNYlt/City1gt
lt/mPersreadResponsegt
lt/SOAP-ENVBodygt lt/SOAP-ENVEnvelopegt  
51
Calling A Web ServiceFrom Natural
52
Calling a Web Service from Natural
  • Basic Steps
  • Get the WSDL from the Web Service Provided
  • Import the WSDL into the EntireX Workbench
  • Generate the XML and SOAP mappings
  • Save the IDL-XML file mapping
  • This generates the XMM file
  • Configure the XML RPC Server
  • Copy the XMM file to a directory where the XML
    RPC Server can load the XMM file
  • Configure Natural to perform RPC call to XML RPC
    Server
  • Write a Natural program to call the web service
  • The IDL file generated by the WSDL import will
    provide the Natural PDA information

53
XML Client Communication with SOAP
Using an XML RPC Server
54
Calling a Web Service from Natural Step1
  • Get the WSDL from the Web Service Provided
  • The WSDL is needed determine the layout of the
    Web Service
  • Copy the WSDL to your computer
  • The Natural program will be written based on this
    layout

55
Calling a Web Service from Natural Step 2
  • Import the WSDL into the EntireX Workbench
  • Use the EXX Workbench to Import the WSDL
  • The IDL file will be generated from the imported
    WSDL

56
Calling a Web Service from Natural Step 3
  • Generate the XML and SOAP mappings
  • In the EXX Workbench
  • Click on XML Tab
  • Select Define XML Mapping
  • Select SOAP 1.1 Mappings for all Programs
  • Save the IDL-XML Mapping file
  • This generates the XMM file

57
Calling a Web Service from Natural Step 4
  • Configure the XML RPC Server
  • XML RPC Server works the same in UNIX and Windows
  • Example in C\Program Files\Software
    AG\EntireX\Bin jxmlrpcserver.bat
  • Add the following parameter Dentirex.trace2 in
    the jxmlrpcserver.bat file.
  • Tracing is Extremely useful in diagnosing
    problems with the XML RPC Server and SOAP
    Request/Response.
  • Copy the entirex.trace.standard file found in
    C\Program Files\Software AG\EntireX\Etc into the
    same directory as jxmlrpcserver.bat
  • Rename it to entirex.trace.properties

58
Calling a Web Service from Natural Step 4
  • Configure the XML RPC Server (cont)
  • Edit the entirex.trace.properties file
  • Change entirex.sdk.default.trace.level to
    ADVANCED and entirex.sdk.default.trace.filename
    to something other than STDOUT or STDERR
  • The Name does not matter, the trace file will
    always be named exx.sdk.xml.runtime.log
  • Edit the entirex.xml.runtime.configuration.xml
    file
  • Located in C\Program Files\Software
    AG\EntireX\Etc
  • XMM file name
  • Target Server of Web Service
  • Broker-ID
  • Service Definition

59
Calling a Web Service from Natural Step 4
  • Configure the XML RPC Server (cont)
  • Example jxmlrpcserver.bat with trace

_at_setlocal _at_rem starts a xml rpc server _at_rem _at_rem
set own Java Runtime Environment, if exists. _at_rem
Otherwise use JAVA_HOME _at_if exist
"SAG_COMMON\jre1.3.1\bin\java.exe" set
JAVA_HOMESAG_COMMON\jre1.3.1 _at_if not exist
"JAVA_HOME\bin\java.exe" set JAVA_HOME_BIN _at_if
exist "JAVA_HOME\bin\java.exe" set
JAVA_HOME_BINJAVA_HOME\bin\ _at_echo JAVA_HOME
JAVA_HOME SET EXXDIRC\PROGRA1\SOFTWA1\
EntireX _at_set EXXCLSEXXDIR\classes\entirex.jar
EXXDIR\classes\xercesImpl.jar EXXDIR\classes\x
mlParserAPIs.jar _at_echo EntireX Runtime
EXXCLS _at_"JAVA_HOME_BINjava" -Dentirex.trace2
-classpath "EXXCLS" com.softwareag.entirex.xml.
rt.XMLRPCServer -p /../etc/entirex.xml.runtime.pr
operties -c /../etc/entirex.xml.runtime.configurat
ion.xml _at_endlocal
60
Calling a Web Service from Natural Step 4
  • Configure the XML RPC Server (cont)
  • Example of entirex.trace.properties file

EntireX SDK Trace settings Wed Dec 13 105222
GMT0100 2000 to activate rename to
'entirex.trace.properties' !!! trace.level
NONE, STANDARD or ADVANCED
trace.directory output directory, '.'
means path of working directory.
If necessary, another path will
created. trace.filename any name, BUT
two reserved words
STDOUT or STDERR for direct output to the
console. trace.threadoriented true or false,
if true, for each
thread a separate file will be created.
'default', settings for all components, can be
replaced by special componentname(s), like
'xml.runtime' or 'xml.servlet'.
---------------------------- entirex.sdk.default.t
race.level ADVANCED entirex.sdk.default.trace.di
rectory . entirex.sdk.default.trace.filename
XMLtrace entirex.sdk.default.trace.threadoriented
false
61
Calling a Web Service from Natural Step 4
  • Configure the XML RPC Server (cont)
  • Example of entirex.xml.runtime.configuration.xml
    file

lt?xml version"1.0" encoding"iso-8859-1" ?gt
ltEntireX xmlns"http//namespaces.softwareag.co
m/entirex/xml/runtime/configuration"
version"7.1.1"gt ltXmlRuntime Version"1"gt
ltBrokerInfogt ltBrokerIdgtETB0011971lt/BrokerIdgt
ltServerAddressgtRPC/XMLSERV/CALLNATlt/ServerAddr
essgt ltLogical_BrokerIdgtlt/Logical_BrokerIdgt lt
Logical_Servicegtlt/Logical_Servicegt ltLogical_Set
Namegtlt/Logical_SetNamegt ltOptions
/gt lt/BrokerInfogt ltTargetServer
name"http//services.xmethods.net80/soap/servlet
/rpcrouter"gt ltxmmsgt ltexx-xmm
name"../etc/TemperatureService.xmm"
/gt lt/xmmsgt lt/TargetServergt lt/XmlRuntimegt lt/E
ntireXgt
62
Calling a Web Service from Natural Step 5
  • Copy the XMM file
  • In Step 3 we created and saved an XMM file
  • Copy this XMM file to a location where it can be
    loaded by the XML RPC Server.

63
Calling a Web Service from Natural Step 6
  • Configure Natural to perform the RPC call
  • Start the Natural session with the following
    parameters
  • RPC(RPCSIZE32,MAXBUFF28,AUTORPCON,COMPR2,
  • SRVNAMEserver-name,SRVNODEbroker-name)
  • AUTORPC will cause the automatic stub generation
    for all unresolved (NAT0082) CALLNAT errors and
    assumes that the subprogram call will be handled
    by a XML RPC server
  • COMPR deals with RPC buffer compression. As of
    October 2004, this needs to be set or an error
    will occur (data will not be displayed to the
    Natural Client
  • SRVNAME is the name of the XML RPC Server
  • SRVNODE is the Broker-ID

64
Calling a Web Service from Natural Step 7
  • Write a Natural program to call the web service
  • The IDL file generated by the WSDL import will
    provide the Natural PDA information
  • Write the natural program to call the Web Service

65
Calling a Web Service from Natural Step 8
  • Maintain SYSRPC Service directory
  • Only necessary if Natural is used as an RPC
    client
  • Link NATRPC51 instead of NATRPC to the Natural
    nucleus in order to get longer than 8 byte names
    for server and broker
  • Set the LOGON flag to Y to be able to use
    another library name than SYSTEM in the IDL and
    generated XMM file

66
Calling a Web Service from Natural Step 8
67
Web Services andEntireX Security
68
Security
  • If EntireX Security is being used, then the
    security information will need supplied in the
    HTTP headers.
  • Setting security parameters in the HTTP Header
  • HTML Example
  • REQ.setRequestHeader ("exx-use-security",
    "true")
  • REQ.setRequestHeader ("exx-userID",
    myRacfUserId")
  • REQ.setRequestHeader ("exx-password",
    "myRacfPassword")
  • REQ.setRequestHeader ("exx-natural-security",
    "true")
  • REQ.setRequestHeader ("exx-rpc-userID",
    myNaturalUserId")
  • REQ.setRequestHeader ("exx-rpc-password",
    "myNaturalPassword")

69
Security (continued)
  • XML RPC Server
  • Security parameters can be passed in the startup
    job
  • java -Dentirex.trace2 -Dentirex.server.us
    eridexxuserid
  • -Dentirex.server.passwordexxpasswd
  • -Dentirex.server.securityyes
  • Another option is to place the security
    parameters in a Properties File
  • myServer.properties
  • XML RPC settings
  • Thu xx/xx/2005 myServer.properties
  • entirex.server.brokerid ETB0011971
  • entirex.server.securityyes
  • entirex.server.useridexxuserid
  • entirex.server.passwordexxpasswd
  • entirex.trace3
  • Start the XML RPC Server and specify the name
    of the properties file
  • java" -Dentirex.server.propertiesmyServer.pr
    operties

70
Security (continued)
  • EntireX Servlet
  • Security parameters can be place in the
    xml-init.xml configuration file
  • lt?xml version"1.0" encoding"utf-8"?gt
  • ltEntireXXMLInit Version"7.2.1"
  • xmlns"http//namespaces.softwareag.com/entirex
    /xml/rt"gt
  • ltxmms exx-use-securitytrue
    exx-userIDEXX-USER" exxpasswordEXXPASSWD
    "gt
  • ltexx-xmmgt/example.xmmlt/exx-xmmgt
  • ltexx-xmmgt/persread.xmmlt/exx-xmm
    gt
  • lt/xmmsgt
  • lt/EntireXXMLInitgt

71
Summary
  • Discussed some new terms used with Web Services
  • Identified the Web Services standards
  • SOAP
  • WSDL
  • UDDI
  • Described the architecture of Web Services
  • Identified the components of a WSDL
  • Described the steps for creating a Web Service
    with EntireX
  • Discussed SOAP and the components of a SOAP
    request/reply
  • Envelope
  • Header
  • Body
  • Reviewed the steps to create a Mainframe Web
    Service
  • Discussed the steps necessary to deploy the
    EntireX Servlet
  • Explained the steps to Create a Natural Client to
    call a Web Service
  • Describe the configuration/setup of the XML RPC
    Server
  • Reviewed various security configuration
    parameters

72
Thank You!Questions?
Write a Comment
User Comments (0)
About PowerShow.com