home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeJava and XSLTSearch this book

14.3. SOAP::Data

The SOAP::Data class allows you specify a value, name, type, URI, or other attributes for SOAP elements. For example, you can serialize the name/value pair of "Nate/31" with the following code:


This becomes <Nate>31</Nate>.

You can also import SOAP::Data methods with import( ). To import 'name':


Once imported, 'name' can be used as follows:

name(Nate => 31);

SOAP::Data also provides an interface to get or set specific attributes, including actor( ), mustUnderstand( ), encodingStyle( ), and root( ). For example:

    ->name(Nate => 31)

This is serialized as follows:

<Nate SOAP-ENV:encodingStyle="http://www.some.site/soap/showmetheliteral"

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.