To enable applications running in the portal to perform cross-domain Ajax calls to
external data services, you need to configure a destination object for each external domain
and modify the corresponding URLs in the application source code.
Context
Note
Due to serious impact on performance, this solution is intended for development environments
only.
Procedure
To configure destination objects for external domains, perform the
following steps:
- Log on to SAP NetWeaver Administrator, and choose .
- Choose Create.
- Enter Destination Name (short, without spaces), set
Destination Type to HTTP, and
choose Next.
- In the URL field, enter the domain URL of the external
data service to which your application performs an Ajax call.
- Enter additional settings as required for your back-end system and landscape. Choose
Next.
- Select the required authentication type, and choose
Finish.
- Repeat the above steps to create a destination for each external data service that you need
to access.
- In your application code, make the following replacement in all URLs that reference
external domains:
http://<ExternalDomain>/<dataServicePath> to
http://<PortalDomain>/DestinationServlet/<DestinationName>/<dataServicePath>,
where DestinationName is the name of the destination that you
configured for this domain.