You are on page 1of 16

IBM System i5

Getting Started with SOA on System i5

Building Web services client applications

8 Copyright IBM Corporation, 2006. All Rights Reserved.


This publication may refer to products that are not currently
available in your country. IBM makes no commitment to make
available any products referred to herein.
IBM System i5

Agenda

• Client application requirements


• Web service client applications
– Web and Java based applications
– Other applications
– demonstrations

• Interoperability considerations

© 2006 IBM Corporation


IBM System i5

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

© 2006 IBM Corporation


IBM System i5

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 APIs
to construct a SOAP message

© 2006 IBM Corporation


IBM System i5

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

© 2006 IBM Corporation


IBM System i5

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

© 2006 IBM Corporation


IBM System i5

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 with
EGL

Demo – JSF Web Service Client

Demo – JSF SDO Client

Demo – EGL Web Service Client

© 2006 IBM Corporation


IBM System i5

Web services clients: Web applications


• JSF Web service client development
1.Use Web services JSF widget to generate Web services proxy code
2.Customize JSF “look and feel”

Web service client

Java
Internet / Intranet
Web service Web service
Proxy

Generated by WDSC tooling

© 2006 IBM Corporation


IBM System i5

Web services clients: Portals


• Portlets
– Portlets are very similar to Java Web applications
– Same approach: create a Java proxy from WDSL and integrate it
with a portlet

• Web Services for Remote Portlets (WSRP)


– Taking Web services to the “next level” – UI
– With WSRP, you can access portlets that run on a different Portal
server

© 2006 IBM Corporation


IBM System i5

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

Web service client

Java
Internet / Intranet
Web service Web service
Proxy

Created manually Generated by tooling

© 2006 IBM Corporation


IBM System i5

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

© 2006 IBM Corporation


IBM System i5

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

Web service client

C or C++
Internet / Intranet
Web service Web service
Proxy

Created manually Generated by tooling

Demo – RPG Web Service Client

© 2006 IBM Corporation


IBM System i5

Web services clients: iSeries applications


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

• Development process
1.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

Web service client


Text Text
Request
Java SOAP
Data Queue
Web service Internet / Intranet Web service
Proxy
Response
Data Queue

Generated by tooling
with some manual coding

© 2006 IBM Corporation


IBM System i5

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 programming
languages

Microsoft .Net Web Service Client Java Web Service

Type: String XML Type: String 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


?

© 2006 IBM Corporation


IBM System i5

Troubleshooting Integration Problems


• Use TCP/IP Monitor in WebSphere Development Studio Client for
iSeries (WDSC) to monitor SOAP messages (for Java clients only)

© 2006 IBM Corporation


IBM System i5

Trademarks and Disclaimers


© IBM Corporation 1994-2005. All rights reserved.
References in this document to IBM products or services do not imply that IBM intends to make them available in every country.

The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both:
Instruction: Refer to the following URL: http://www.ibm.com./legal/copytrade.shtml. Edit the list below, IBM subsidiary statement,
and special attribution companies which follow so they coincide with your presentation.

AS/400 e-business on demand OS/400


AS/400e IBM i5/OS
eServer IBM (logo)
iSeries

Rational is a trademark of International Business Machines Corporation and Rational Software Corporation in the United States, other countries, or both.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
Intel, Intel Inside (logos), MMX and Pentium are trademarks of Intel Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
SET and the SET Logo are trademarks owned by SET Secure Electronic Transaction LLC.
Other company, product or service names may be trademarks or service marks of others.

Information is provided "AS IS" without warranty of any kind.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics
may vary by customer.

Information concerning non-IBM products was obtained from a supplier of these products, published announcement material, or other publicly available sources and does not constitute an endorsement of such
products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly available information, including vendor announcements and vendor worldwide homepages. IBM has not
tested these products and cannot confirm the accuracy of performance, capability, or any other claims related to non-IBM products. Questions on the capability of non-IBM products should be addressed to the
supplier of those products.

All statements regarding IBM future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller for the full
text of the specific Statement of Direction.

Some information addresses anticipated future capabilities. Such information is not intended as a definitive statement of a commitment to specific levels of performance, function or delivery schedules with respect to
any future products. Such commitments are only made in IBM product announcements. The information is presented here to communicate IBM's current investment and development activities as a good faith
effort to help with our customers' future planning.

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon
considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore,
no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here.

Photographs shown are of engineering prototypes. Changes may be incorporated in production models.

© 2006 IBM Corporation

You might also like