Working with Arrays

The “Hello, SOAP!” application from Chapter 4 illustrated the passing of strings and primitive data types. The next step up the SOAP ladder is working with arrays. Fortunately, Apache SOAP provides built-in support for arrays, making this task relatively painless.

To illustrate the basic concepts, we will create a simple e-commerce product catalog. Clients can connect to the catalog service and send a list of stockkeeping units (SKUs). The catalog service looks up each SKU and returns a list of current prices. Behind the scenes, the client passes an array of strings to the server, and the server returns an array of doubles.

Get Web Services Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.