Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Web Service Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.2 Simple Data

WSDL messages may contain zero or any number of parts. Each part defines a single object and its type, either simple or complex. This section considers messages that contain zero, single, or multiple parts representing simple data.

6.2.1 Messages with No Parts

The simplest message contains no parts. This can be achieved using a WSDL message defined with no part elements as children:

This style of messaging is useful to execute a web service as a function with no data, like a void method in C++. It can also be used in a response, as a notification of completion. Otherwise, its use is fairly limited compared to the other styles, as it conveys no runtime data.

The generated client and server implementation will look just like functions for messages with parts (see below) except the arguments for the message parameters will be absent:

6.2.2 Messages with a Single Part

For messages that contain runtime data, the simplest type contains just one part that includes a simple type.

Consider the following WSDL file excerpt, taken from the HelloWorld example:

The input and output messages each include a single part containing a string.

The generated service operation method in the client implementation GreetingPortClient.cpp creates a simple string to represent the input and output values, like so:

On the server side, the generated code is equally simple, providing the string as an argument to the service operation method:

6.2.3 Messages with Multiple Parts

Messages may contain multiple parts. Here is an excerpt from the WeatherSummary example's WSDL file. Each message contains multiple parts that define simple-type data:

In this case, the generated service operation methods simply instantiate multiple simple-type objects representing the input and output parameters to the operation, and then pass them to the proxy. On the client side, the generated service operation method in WeatherSummaryClient.cpp looks like this:

Likewise, on the server side, the signature of the generated code's service operation method takes these input and output messages as its parameters:

Note that the return type is the part type when the response message has one part, and void when the response message has multiple parts. In this case, the response parts are given as reference parameters. All parameters have _in or _out appended to their names to signify whether they represent request or response parts.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.