Compound TypesSome web service operations require compound types as parameters. Compound types are data that cannot be represented by a single simple value such as a string, integer, real, true or false. Compound types are a sequence of base types. They are bounded by a list in Mathematica. Items inside a compound type are represented by a rule. The left side of the rule is the description of the element. The description of the element contains its name but may also contain its type and other attributes describing it (See Type Mapping). The right side of the rule will be the value of the element. The value of the element may be a simple or compound type. In the example below, AuthorSearchRequest has a parameter that requires a compound value.
| Out[2]= |  |
This shows how to use the OperationPalette to see the signature of the method. Using the OperationPalette, you can see that this method requires a complex type with a qualified name of {http://soap.amazon.com}AuthorRequest. "Documentation was not provided.\n\nPlease refer to ButtonBox[\"OperationPalette[AuthorSearchRequest]\", Active->True, ButtonEvaluator->Automatic, ButtonFunction->OperationPalette[AuthorSearchRequest], ButtonStyle->\"Hyperlink\"] for help." As mentioned before, the OperationPalette can be used to inspect information about the type. The OperationPalette also can be used to paste a template of the type needed for the function. In this case, a user may click the gray AuthorSearchRequest button, and it pastes an expression representing {http://soap.amazon.com}AuthorRequest. A user can tab through the placeholders to easily input the values of the expression. The OperationPalette may be used as a reference for inputting these values. A user may click on the hyperlink, {http://soap.amazon.com}AuthorRequest, to go to documentation describing the type. As mentioned before, often it is useful to visit the web site documentation for a web service to find how to properly use the operations. To find out more information about the Amazon Web Services please visit http://www.amazon.com/webservices. Once the placeholders are filled, the user may invoke the function.
| Out[8]= |  |
The result that is returned is similar to the input except that it is a bit more lengthy. It is a compound type as well. The syntax for the output is the same as the input, a rule. And as such a user will find the data contains pieces of data with descriptions on the left and values on the right. The OperationPalette can also be used to inspect information about the output type.
|