Data type representation - choosing between Generic classes and Deployed Java classes

 

When you deploy a Web service, the Message part representation option allows you to choose between Generic classes and Deployed Java classes.

As your message passes through the gateway, the message parts are represented as actual Java objects. The data type used for each part is defined as follows:

  1. It is one of the set of XML schema and SOAP supported simple and compound data types, or
  2. It is a complex type defined in the WSDL schema section.

A complex type is a data type represented by a Java class (such as a user-written class) that is not part of the native Java language.

Generic classes and Deployed Java classes can both represent simple, compound and complex data types, subject to the following constraints:

  • The gateway only supports the simple and compound types that are listed in Web services gateway - Supported types.

  • Only Deployed Java classes can represent Vectors, Enumerations, Hashtables and Maps (but either Generic classes or Deployed Java classes can represent Arrays).

  • If Deployed Java classes are used to represent complex types, then the actual Java classes representing these complex types must be deployed to the appserver on which the gateway is running.

  • If the target service uses Java or EJB WSDL bindings (that is, if the target service is a Java class deployed on the local appserver, or it is an enterprise bean) then Deployed Java classes must be used, and the bindings must be made available as described in Deploying Web services with Java bindings.

The gateway's schema parser determines all top-level types that are defined in the WSDL schema section, and generates mappings to generic classes for all of these types. This enables the gateway to forward requests (and responses) containing most complex data type parameters (and return values) to a remote destination without requiring the actual Java classes representing these complex types to be deployed to the appserver on which the gateway is running. So if your Web service uses complex data types, and there is no other constraint that forces you to use Deployed Java classes, then select Generic classes.

Performance is the same whether you choose to use Deployed Java classes or Generic classes.


Complex data types - mapping namespaces to packages
Deploying Web services to the Web services gateway
Deploying Web services with Java bindings
Web services gateway - Supported types