web services client development

Upload: uday-kumar

Post on 30-May-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Web Services Client Development

    1/16

    IBM System i5

    8 Copyright IBM Corporation, 2006. All Rights Reserved.

    This publication may refer to products that are not currentlyavailable in your country. IBM makes no commitment to makeavailable any products referred to herein.

    Getting Started with SOA on System i5

    Building Web services client applications

  • 8/14/2019 Web Services Client Development

    2/16

    IBM System i5

    2006 IBM Corporation

    Agenda

    Client application requirements

    Web service client applications

    Web and Java based applications

    Other applications demonstrations

    Interoperability considerations

  • 8/14/2019 Web Services Client Development

    3/16

    IBM System i5

    2006 IBM Corporation

    Web services client

    Web service client

    An application that invokes a Web service

    Can be written in any programming language

    Programming language should be efficient in processing XML

    For a Web service client, calling a Web service is Executing a remote procedure call

    Sending an XML document

  • 8/14/2019 Web Services Client Development

    4/16

    IBM System i5

    2006 IBM Corporation

    Web services client

    Web service invocation steps

    1.Create a SOAP message: service location, procedure name, input

    parameters (or simply XML document)

    2.Send the SOAP message

    3.Process the response SOAP message: output parameters

    Web service client does not use a SOAP server, just APIsto construct a SOAP message

  • 8/14/2019 Web Services Client Development

    5/16

    IBM System i5

    2006 IBM Corporation

    Web services client

    Development

    Web service client creation is simplified by tools

    Most IDEs generate proxy code based on a WSDL document

    A proxy encapsulates logic to process SOAP message

  • 8/14/2019 Web Services Client Development

    6/16

    IBM System i5

    2006 IBM Corporation

    Web services clients

    Web application clients JavaServer Faces (JSF) applications

    PHP applications AJAX applications

    Portal application clients Portlets

    Web Services for Remote Portlets (WSRP)

    Rich client applications Java

    Microsoft .Net

    Traditional iSeries applications RPG COBOL

    C

  • 8/14/2019 Web Services Client Development

    7/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: Web applications

    JSF

    Java framework for building Web applications

    Extends servlet/JSP programming model

    Simplifies Web application development

    Can be used to develop Web applications and portlets

    JSF applications can be created with JSF tooling in WDSC or withEGL

    Demo JSF Web Service Client

    Demo EGL Web Service Client

    Demo JSF SDO Client

  • 8/14/2019 Web Services Client Development

    8/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: Web applications

    JSF Web service client development1.Use Web services JSF widget to generate Web services proxy code

    2.Customize JSF look and feel

    Java

    Web service

    Proxy

    Internet / IntranetWeb service

    Generated by WDSC tooling

    Web service client

  • 8/14/2019 Web Services Client Development

    9/16

  • 8/14/2019 Web Services Client Development

    10/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: Rich client Rich client Web service client development

    1.Build UI

    2.Generate Web service proxy from WSDL file

    3.Integrate UI events (button click, etc.) with Web service proxy

    Java

    Web service

    Proxy

    Internet / IntranetWeb service

    Generated by tooling

    Web service client

    Created manually

  • 8/14/2019 Web Services Client Development

    11/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: iSeries applications

    RPG, COBOL, C

    In previous examples, Web services invocation proxies were implemented

    in the same programming language as a Web service client

    For RPG and COBOL the recommended approach is to create proxies in in

    C, C++ or Java

    C/C++ Web service client prerequisites XML Parser (XML Toolkit for iSeries, licensed program product ID 5733XT1, option 9)

    C++ Compiler (Compiler - ILE C++, licensed program product ID 5722WDS, option 52)

    Java (IBM Developer Kit for Java, JDK 1.4, licensed program product ID 5722JV1, option

    6)

    C Compiler (Compiler - ILE C, licensed program product ID 5722WDS, option 51)

    Only needed if generating C stubs

  • 8/14/2019 Web Services Client Development

    12/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: iSeries applications

    RPG, COBOL or C Web service client

    1.Generate Web service proxy based on a WSDL file

    2.Add code to call Web service proxy to an RPG, COBOL or C program

    C or C++

    Web service

    Proxy

    Internet / IntranetWeb service

    Generated by tooling

    Web service client

    Created manually

    Demo RPG Web Service Client

  • 8/14/2019 Web Services Client Development

    13/16

    IBM System i5

    2006 IBM Corporation

    Web services clients: iSeries applications

    Java Web service wrapper Use JNI or Data Queues to communicate with the wrapper

    Development process1.Generate a Java proxy from a WSDL file

    2.Add code to the Java proxy to get a message from a data queue

    3.Add code to an iSeries program to put a message to a data queue

    Java

    Web service

    ProxyInternet / Intranet Web service

    Generated by tooling

    with some manual coding

    Web service client

    Request

    Data Queue

    ResponseData Queue

    Text Text

    SOAP

  • 8/14/2019 Web Services Client Development

    14/16

    IBM System i5

    2006 IBM Corporation

    Web service interface for maximum interoperability Web service client development is automated by tools

    The challenge is to create a Web service interface for maximum interoperability,especially for complex types

    Important to choose parameter types that are supported by most programminglanguages

    Type: String Type: StringXML Type: String

    Type: int XML Type: String Type: int

    Type: array of Strings XML Type: String Type: array of Strings

    Type: DataSet XML Type: String ?

    Microsoft .Net Web Service Client Java Web Service

  • 8/14/2019 Web Services Client Development

    15/16

    IBM System i5

    2006 IBM Corporation

    Troubleshooting Integration Problems Use TCP/IP Monitor in WebSphere Development Studio Client for

    iSeries (WDSC) to monitor SOAP messages (for Java clients only)

  • 8/14/2019 Web Services Client Development

    16/16