Web services is a new feature for 1.2. Archiva exposes two types of services: administrative and search. A sample client that shows how to access these services is provided in the source code. You can check out the module for the sample client at:
http://svn.apache.org/repos/asf/archiva/tags/archiva-1.2/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/
The SampleClient class shows how to connect to and invoke the Archiva web services. To execute the sample client, edit the following configuration in the archiva-xmlrpc-client module's pom.xml:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<mainClass>org.apache.archiva.web.xmlrpc.client.SampleClient</mainClass>
<arguments>
<!--
URL: ex. http://127.0.0.1:9091/xmlrpc
USERNAME & PASSWORD: Archiva credentials
-->
<argument>http://127.0.0.1:9091/xmlrpc</argument>
<argument>admin</argument>
<argument>${password}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>In the first <argument>, set the url of the Archiva instance you are running but make sure that you have /xmlrpc appended at the end. For example if your Archiva instance is running in localhost and port 8080, then set it to http://localhost:8080/archiva/xmlrpc.
The second <argument> corresponds to the username of the existing Archiva user that will be used to access the services while the last <argument> is where you set the user's password.
After configuring the pom, you can now run the sample client by executing mvn exec:java in the command-line. You should be able to see the list of managed and remote repositories, the list of database and repository consumers and more printed on the command-line.
In order for a user to be able to access the Administration services, the user must have a System Administrator role in Archiva.
The Administration Service exposes the following methods:
To access the Search Service, the user must have at least a Repository Observer role.
The Search Service exposes the following methods: