
Java Proxy Objects
Definition
All Java objects that are created from a
message interface from the Integration Repository in an SAP system, are called Java Proxy Objects. Multiple proxy objects are created in the system for each message interface (Java classes or Java interfaces).
Message interfaces contain message types, and these in turn contain data types. All objects referenced to message interfaces (including fault message types), are also called Interface Objects. They are the counterparts of the generated proxy objects.
Structure
You can divide the different interface objects into two classes: The message interface itself and the corresponding parameters and data types (also see:
Converting WSDL to the Target Language).
Each generated proxy object can be assigned to its corresponding interface object in the Integration Repository even after generation.
Interfaces
There are two types of interfaces to differentiate between here, namely synchronous and asynchronous interfaces. In the case of asynchronous interfaces, the sender system can continue with the business process locally after it has sent the message, since the receiver system does not return a response to the sender system. In the case of synchronous interfaces, the receiver system returns a result, therefore the sender system is blocked until the response has arrived.

The Java runtime is at present still unable to provide queues for the asynchronous processing of messages. If an error occurs when sending an asynchronous message, an exception is thrown.
You call an inbound interface to start a service that, in the synchronous case, returns a result. The proxy generation functions generate a Java interface for an inbound interface. To make this service available, implement this interface using a Java class. Note the following for the implementing class: If the name of the generated Java interface is
JavaInterface, then the implementing class must be JavaInterfaceImpl and it must be located in the same package as the generated Java interface.You call an outbound interface to send a message to an inbound interface. An outbound interface is mapped to a Java class.
In general, the signature of the generated method for a message interface
MI from the Integration Repository, looks as follows (in the synchronous case, without return parameters):The class for the input or output message corresponds to the data type referenced by the message type used. No public global classes are generated for message types (fault message types are the only exception here).
Parameters and Data Types
The following objects are generated, regardless of whether they are inbound or outbound:
In XSD, you can also define elements that can occur infinitely in the message. This exceptional case is described in the section
tables.Example
The following graphic illustrates how an interface from the Integration Repository is mapped to a Java proxy:

The original names of the interface objects are highlighted in bold. You can see that proxy generation had enhanced the names (see also:
Naming Java Proxy Objects). The method bookOut expects the formal parameter om of type Ct_Type. Therefore, you transfer the data type directly. The message type is included internally by the proxy framework by using the private class Om_Message.