Info | ||
---|---|---|
| ||
Web Service is one of many well-defined extension points supported by the WSO2 Governance Registry. Read more on Supported Extension Points for a complete list of extension points supported by WSO2 Governance Registry. |
This sample explains how to use the Governance API of WSO2 Governance Registry to create a simple webservice which is capable of looking up service endpoints. WSO2 Governance Registry contains an Apache Axis2 based runtime as a part of the WSO2 Carbon Framework. You can deploy web services on this runtime, which can be used as internal endpoints to receive notifications generated on the WSO2 Governance Registry. We will be reusing the code of the Handler Sample in this example. This sample requires Apache Maven. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux. This example also explains how to use soapUI, which is a very useful tool for testing web services.
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup>
<service name="EndpointLookupService" scope="transportsession">
<transports>
<transport>http</transport>
</transports>
<parameter name="ServiceClass" locked="false">
org.wso2.carbon.registry.samples.services.EndpointLookupService
</parameter>
</service>
</serviceGroup> |
...
Info | ||
---|---|---|
| ||
The command |
A successful run of Apache Maven will generate a report similar to the following:
...
10. Start the server and observe the command prompt. See Starting Governance Registry Management Console Installing on Windows or Starting Governance Registry Management Console Installing on Linux.
Running the Sample
1. After the sample has been successfully deployed and the server has started, open a browser Window and type the following URL:
...
1. Create a new project using soapUI.
2. Simply copy the WSDL URL in the New soapUI Project dialog box. Use the following URL:
Code Block |
---|
http://localhost:9763/services/EndpointLookupService?wsdl |
Press the "OK" button to create the project. Make sure to keep the Create Requests
option selected.
3. Expand the getEndpoints operations and right-click the auto-generated request to display the request editor.
4. Fill in the following payload as the request:
...
5. Click the submit button to make the request to WSO2 Governance Registry.
6. Obtain the response from the server.
Excerpt | ||
---|---|---|
| ||
Instructions on how to use the Governance API in Governance Registry to build in-VM services. |