You can invoke services located in a custom component using
Remoting. For example, consider the Bank component that contains
the Customer service. You can invoke operations that belong to the
Customer service using a client application written in Flex. Before
you can execute the quick start associated with this section, you
have to create the Bank custom component. (See Creating Components That Use Custom Data Types.)
The Customer service exposes an operation named createCustomer.
This discussion describes how to create a Flex client application
that invokes the Customer service and creates a customer. This operation
requires a complex object of type com.adobe.livecycle.sample.customer.Customer that
represents the new customer. The following illustration shows the
client application that invokes the Customer service and creates
a new customer. The createCustomer operation returns
a customer identifier value. The identifier value is displayed in
the Customer Identifier text box.
The following table lists the controls that are part of this
client application.
Control name
|
Description
|
txtFirst
|
Specifies the customer’s first name.
|
txtLast
|
Specifies the customer’s last name.
|
txtPhone
|
Specifies the customer’s phone number.
|
txtStreet
|
Specifies the customer’s street name.
|
txtState
|
Specifies the customer’s state.
|
txtZIP
|
Specifies the customer’s zip code.
|
txtCity
|
Specifies the customer’s city.
|
txtCustId
|
Specifies the customer identifier value
to which the new account belongs. This text box is populated by
the return value of the Customer service’s createCustomer operation.
|
|
|
|