Configuring data types for data service operationsWhen connecting to a data service, Flash Builder needs to know the data type for the data returned by a service operation. The data types supported are those types recognized by AMF to exchange data with a data service or remote service. Many data services define the type of returned data on the server (server-side typing). However, if the server does not define the type, then the client application must configure the type for returned data (client-side typing). Service operations that specify parameters must also specify a type corresponding to data accessed on the service. With client-side typing, you configure the type for input parameters. When configuring types for client-side typing, Flash builder recognizes only AMF data types. The type can also be a custom data type representing complex data, or void to indicate the operation does not return any data. You can configure user-defined types for service operations that return complex data. For example, if you are retrieving records from an employee database, then you would define a complex data return as Employee. In this case, the custom data type for Employee would contain entries for each field in the database record. Data Types for client side typing
User-defined type (Employee)
Authenticating access to servicesTypically data services require user authentication before allowing access to the services. PHP, BlazeDS, and ColdFusion services that provide access using the HTTP protocol can require additional authentication. In some cases, these types of services require both HTTP and remote authentication. Flash Builder provides an option for service authentication when you are doing the following:
When you specify Authentication Required, Flash Builder opens the Service Authentication dialog. Depending on the type of service you are accessing, you can specify Basic Authentication or Remote Authentication. Basic authenticationBasic authentication provides access to HTTP and web services. Provide the user name and password for access to these services. Specify Remember Username and Password if you want Flash Builder to use the specified credentials throughout the session. Remote authenticationRemote authentication provides access to remote object services. Remote object services are services implemented as remote objects using ColdFusion, PHP, BlazeDS, or Adobe LiveCycle Data Services (LCDS). Flash Builder does not provide the remote authentication login interface for projects that do not implement remote object services. Provide the user name and password for access to the remote object services. Specify Remember Username and Password if you want Flash Builder to use the specified credentials throughout the session. Configuring input parameters to an operationFor client side typing, you configure input parameters to operations available from the data service. The following procedure assumes that you have connected to a data service in Flash Builder, and the data service has operations that require configurable input parameters.
For server side typing, the service specifies the data type for input parameters. Configuring the return type for data from an operationA service that defines data types returned by an operation provides server-side typing. If a service does not define the data type returned by an operation, then Flash Builder uses client-side typing to define the returned data type. Flash Builder introspects the data returned from a service operation to determine the data type. When you configure the return type of an operation, you have two options:
The procedures Flash Builder uses for introspecting data differs slightly, depending on the type of data service. For example, the procedure to introspect and configure the return type for an HTTP service differs from the procedure for PHP or ColdFusion services. Merging and changing data typesDuring the introspection of server data, you can merge fields from another data type or create a data type based on an existing data type. Here are some of the way you can modify a custom data type:
Configuring a custom data type (PHP or ColdFusion services)This procedure assumes that you have connected to a data service implemented with PHP or ColdFusion.
Configuring a custom data type (HTTP service)This procedure assumes that you have connected to an HTTP service.
|
|