74
Designing a Service's Interaction Layer
  Java primitive types 
boolean
, 
byte
, 
short
, 
int
, 
long
, 
float
, and 
double
, along 
with their corresponding wrapper Java classes
  Standard Java classes: 
String
, 
Date
, 
Calendar
, 
BigInteger
, 
BigDecimal
, 
QName
, and 
URI 
  Java arrays with JAX RPC supported Java types as members
  JAX RPC value types user defined Java classes, including classes with 
JavaBeans
TM
 component like properties
E
When designing parameters for method calls in a Web service interface, 
choose parameters that have standard type mappings. (See Figure 3.3.) Always 
keep in mind that the portability and interoperability of your service is reduced 
when you use parameter types that by default are not supported. 
As Figure 3.3 shows, parameters that have standard type mappings are bound
implicitly. However, the developer must do more work when using parameters
that do not have standard type mappings. See  Handling Nonstandard Type
Parameters  on page 76 for more details on using nonstandard Java types and pos 
sible side effects of such use.
Here are some additional helpful points to consider when you use Java objects
with standard type mappings as parameters.
1. Many applications and services need to pass lists of objects. However, utilities 
for handling lists, such as 
ArrayList
 and 
Collection
, to name a few, are not 
supported standard types. Instead, Java arrays provide equivalent functional 
ity, and have a standard mapping provided by the platform.
2. JAX RPC value types are user defined Java classes with some restrictions.
They have constructors and may have fields that are public, private, protected,
static, or transient. JAX RPC value types may also have methods, including set
and get methods for setting and getting Java class fields.
However, when mapping JAX RPC value types to and from XML, there is no 
standard way to retain the order of the parameters to the constructors and other 
methods. Hence, avoid setting the JAX RPC value type fields through the con 
structor. Using the get and set methods to retrieve or set value type fields 
avoids this mapping problem and ensures portability and interoperability.
3. The J2EE platform supports nested JAX RPC value types; that is, JAX RPC
value types that reference other JAX RPC value types within themselves. For






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

 

Our web partners: Inexpensive Web Hosting Java Web Hosting personal webspace webspace php  linux webhost

 html web templates DreamweaverQuality Web Templates PSD Web Templates

cheap webhost j2ee web Hosting buy webspace ftp webspace adult webspace

frontpage WebHosting webspace hosting cheap webhost

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved

webhosting