Exercise: Basic of Web Services 1
Learning WSDL and SOAP
Based on your knowledge of basic Web service concepts and specifications, the purpose of this exercise is to practice how to test Web services by using Web Service, SOA and SOAP Testing Tool (e.g., soapUI). Various language services (machine translator, multilingual dictionary, morphological analyzer, parallel texts and other services) are prepared for this exercise.
Steps for Testing Web Service by SOAP Message
To test Web service by SOAP message, the following steps are required. We will use the example of J-Server, which is a machine translation service, to describe the steps in details.
- STEP1: Download WSDL of language services.
- STEP2: Create WSDL project in soapUI using downloaded WSDL.
- Start soapUI and create a new WSDL project from File->New WSDL Project.
- Input Project Name (e.g., J-Server) and Initial WSDL (browse and select your downloaded J-Server.wsdl).
- Check Create Requests and click OK.
- STEP3: Test language services using SOAP message in the created WSDL project.
- After creating the WSDL project J-Server, it will be shown in the project list in soapUI. A request message for the operation defined in WSDL is generated. You can see the request message by opening nodes of J-Server. In the example of J-Server, the language service can be tested by using SOAP message Request 1.
- Select Request1 and set Username and Password of Request 1 using your temporary ID and password (or your Language Grid ID and password) in Request Properties as shown in the following figure.
- Create SOAP message Request 1. Double-click Request 1 and input values for sourceLang, targetLang and source by replacing "?".
"en" (English), "ja" (Japanese), "ko" (Korean) or "zh" (Chinese) can be specified for sourceLang and targetLang.
This service translates source in sourceLang into targetLang.
- Submit the request and get the response SOAP message by pressing button "Submit request to specified endpoint URL" (green triangle icon). An example is shown in the following figure.
Try More Language Services
You can practice this exercise using the above steps for testing Web services for more language services provided by participants of the Language Grid.
Try the following service as an advanced exercise.
- Google Translate
- Copyright: Google, Inc.
- Supported languages: Refer to Service Profile
- Operation: String translate (String sourceLang, String targetLang, String source)
- sourceLang: Source language
- targetLang: Target language
- source: Sentence to be translated