You can use any SOAP client to invoke an API. We use the SOAP UI in this example.
See the following topics for a description of the concepts that you need to know when invoking an API:
The examples here use the PhoneVerification
API, which is created in section Create and Publish an API .
Let's invoke the PhoneVerification
API using a SOAP client.
- Sign in to the API Store and click an API that you want to invoke (e.g.,
PhoneVerification
). - The API's Overview page opens. Select an application (e.g.,
DefaultApplication
), the Bronze tier and subscribe to the API.
- Click the Applications menu, open the default application using which you subscribed to the API, and generate a production key.
Copy the access token to the clipboard as you need it later to invoke the API.
Make sure the flash plug-in of your web browser is updated in order to get the copy button in the Store UI working.
- Download the SOAP UI installation that suits your operating system from https://www.soapui.org/downloads/soapui.html and open its console.
- In the SOAP UI, right click on the Projects menu and create a new SOAP project.
- Give your API's WSDL and click OK.
In this case, the WSDL is as follows: http://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl
- The WSDL defines two operations. Let's work with
CheckPhoneNumber
. Double click onRequest 1
. Then, click the Header tab and add an authorization header to your request by clicking on the add icon.
Give the value of the Authorization header in the following format:
Bearer <the-access-token-you-copied-in-step4>
Add the following dummy values and submit the request.
Change the endpoint with the production URL of the API.
You can copy the production URL from the API's Overview tab in the API Store (i.e., It ishttps://localhost:8243/phoneverify/1.0.0
for thePhoneVerification
API). Append the resources to the end of the URL, if any. The resource is/CheckPhoneNumber
for thePhoneVerification
API that we use here.In the SOAP request, change the parameters, which are PhoneNumber and LicenseKey.
PhoneNumber Give a dummy phone number E.g., 123456 LicenseKey Give 0 for testing purpose
Note the result on the right-hand side panel. As you gave a dummy phone number in this example, you get the result as invalid.
Add the following values and submit the request:
Maintain the same endpoint that you used in the previous step.
In the SOAP request, change the parameters, which are PhoneNumber and LicenseKey.
PhoneNumber Give a proper phone number E.g., 18006785432 LicenseKey Give 0 for testing purpose
Note the result on the right-hand side panel. As you gave a valid phone number in this example, you get the result as valid.
You have invoked an API using a SOAP client.
You can treat the Admin Services APIs as if they were back-end server APIs, and get all the benefits of API management for the admin services.
Do the following WSO2 API Manager to expose SOAP APIs with OAUTH2.0.
- Create a SOAP API for an admin service in the Publisher.
- Add backend admin credentials for basic auth in the Implement page.
- Publish the app with a scope protecting access - use the admin role for your scope.
Admins can then subscribe to the app and invoke it using OAUTH2.0 security.