Learn mule ESB step by step -- (Article 2: Ajax)

Source: Internet
Author: User
Tags xsl xsl file xslt mule esb
Functions to be completed
  1. Use Ajax requests to send requests to the backend
  2. Converts webpage data into request processing streams
  3. Convert XSL and mule transformers to a format that is understandable by Google APIs
  4. Create a Google API spelling check to process webpage Input
  5. Return XML data to the page
  6. Implement a jetty server in the process
Create a project


Create an ajaxflow project and add the following components to ajaxflow. mflow:

Figure: Ajax request process

Add and configure Ajax Interfaces



In ajaxflow. mflow, selectGlobal Elements:

Figure: Selecting global elements

ClickCreate, AppearsChoose Global TypeWindow.

OpenConnectorsAnd then selectAjax

Figure: Select Ajax in the interface

InServer URLAndResource baseInput:

Http: // 127.0.0.1: 8090/ajax

And src/main/APP/docroot

Figure: Ajax settings

Click OK to view the Ajax interface in the list.

Figure: Ajax Interface

Double-click the Ajax element in flow, configure the Ajax endpoint, and set the channel:

Figure: Channel settings

Then set reference:

Select the global Ajax interface we set above.

Configure XSLT Conversion




Download the XSL file:

Transform. XSL File

Save to yourMulestudio>Examples>Ajaxspellchecker>TransformfileDirectory

Right-click the project and selectImport, SelectFile SystemImport the saved transform. XSL file toSRC \ main \ appDirectory.

After completing the preceding steps, double-click XSLT transformer to seePattern PropertiesWindow, configure the following parameters:

Figure: conversion property Configuration

Configure HTTP requests





Double-clickHTTP endpointAppearsEndpoint PropertiesWindow.

The settings are as follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.