WS-API Sample
The WS Registry API exposes a complete set of registry operations that can be accessed through Web Service calls. This section explains how to run the sample that uses the WS Registry client sample.
Pre-requisites
To get the sample to work, you must first do the following:
Access the
GREG_HOME/bindirectory and run Ant from there. This action will copy all the necessary libraries to their respective locations. To run Ant from the command-line, type the following command and press <Enter>:antStart the WSO2 Governance Registry by running the appropriate script from
GREG_HOME/bin.
For Windows:wso2server.bat --runFor Linux:
sh wso2server.sh
See Running the Product for more information.
JAR dependencies
The following are the JAR dependencies for this sample to work:
axiom_1.2.11-wso2v3.jar
axis2_1.6.1-wso2v7.jar
commons-codec_1.4.0-wso2v1.jar
commons-httpclient_3.1.0-wso2v2.jar
httpcore_4.1.0-wso2v1.jar
neethi_2.0.4-wso2v4.jar
org.wso2.carbon.authenticator.stub_4.0.0.jar
org.wso2.carbon.base_4.0.0.jar
org.wso2.carbon.core.common_4.0.0.jar
org.wso2.carbon.governance.api_4.0.5.jar
org.wso2.carbon.logging_4.0.0.jar
org.wso2.carbon.registry.api_4.0.0.jar
org.wso2.carbon.registry.core_4.0.5.jar
org.wso2.carbon.registry.ws.client_4.0.2.jar
org.wso2.carbon.registry.ws.stub_4.0.0.jar
org.wso2.carbon.user.api_4.0.3.jar
org.wso2.carbon.user.core_4.0.5.jar
org.wso2.securevault_1.0.0-wso2v2.jar
woden_1.0.0.M8-wso2v1.jar
wsdl4j_1.6.2-wso2v4.jar
XmlSchema_1.4.7-wso2v2.jar
Steps to get this sample to work
Execute the
ant runcommand from theGREG_HOME/samples/ws-clientdirectory.Each operation that occurred will be displayed on the console.
A resource will be created in root by the name of
abc(i.e.,path = /abc). And the resource will contain a rating of three stars, comments and the content of the resource will be printed. This can be checked through the Resource Browser which can be accessed through the Management Console.