Enterprise J2ME Developing Mobile Java Applications [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Enterprise J2ME Developing Mobile Java Applications [Electronic resources] - نسخه متنی

Michael Juntao Yuan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



17.4 The SPI for Implementers


The SPI specifies the interface to pass data between the generated Stub classes and the underlying implementation. The SPI benefits both application developers and the JSR 172 specification implementers.

Application developers can reuse the generated Stub classes when switching implementation providers. This makes the application more portable.

Multiple implementation providers can share the same Stub generator and focus on their core businessimplementing the communication and marshaling logic.


The SPI classes are defined in package javax.microedition.xml.rpc (Table 17.4). Those classes correspond to elements in the programming model defined in the WSDL document. The JSR 172 specification implementers must implement them.

For more up-to-date documentation and usage examples of the SPI, please refer to the specification documents released by JSR 172.


17.4.1 Support for Gateway-Based Clients


The SPI is just a set of interfaces. There are many innovative ways to implement it. For example, a vendor can implement most of the SOAP parsing methods on a gateway. The SPI implementation on the client device could communicate with the gateway using optimized proprietary protocols (Figure 17.2. This way, we can reduce the device hardware and bandwidth requirements of mobile Web Services clients. Oracle's J2ME Web Services gateway application server is a step toward this direction.


Figure 17.2. Implementing a mobile Web Services gateway using the SPI.


Table 17.4. SPI Classes in the javax.microedition.xml.rpc package

SPI Class

Description

Type

It represents a simple type defined in a WSDL document.

Element

It represents an xsd:element element with a qualified name (QName) and a type.

ComplexType

It represents an xsd:complextype element containing an array of Elements.

Operation

It represents a wsdl:operation element that defines a target endpoint in a WSDL document. This class defines the invoke() method which does the plumbing for the remote call.

FaultDetailHandler

It is an interface implemented by the stubs to handle custom faults.

FaultDetailException

This exception is thrown if the server returns a fault. It returns the fault details and associated QNames to the Stub.


/ 204