o changed from TestService to PingService
o fixed bean config in applicationContext in webapp
o added service object annotation for xmlrpc binder
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@883066
13f79535-47bb-0310-9956-
ffa450edef68
<bean id="propertyPlaceholder" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:application.properties" />
</bean>
-
- <bean name="testXmlRpcService" lazy-init="true" scope="singleton" class="org.apache.archiva.web.xmlrpc.services.PingServiceImpl"/>
<bean name="xmlRpcUserRepositories" class="org.apache.archiva.web.xmlrpc.security.XmlRpcUserRepositories">
<constructor-arg ref="userRepositories"/>
<constructor-arg ref="xmlRpcAuthenticator"/>
</bean>
+ <!-- Web Service : Ping Service -->
+ <bean name="pingService" lazy-init="true" scope="singleton" class="org.apache.archiva.web.xmlrpc.services.PingServiceImpl"/>
+
<!-- Web Services : Search Service -->
<bean name="searchService" lazy-init="true" scope="singleton" class="org.apache.archiva.web.xmlrpc.services.SearchServiceImpl">
<constructor-arg ref="xmlRpcUserRepositories"/>
<list>
<ref bean="administrationService"/>
<ref bean="searchService"/>
+ <ref bean="pingService"/>
</list>
</constructor-arg>
</bean>
--- /dev/null
+package org.apache.archiva.web.xmlrpc.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.atlassian.xmlrpc.ServiceObject;
+
+@ServiceObject("PingService")
+public interface PingService
+{
+ public String ping();
+}
+++ /dev/null
-package org.apache.archiva.web.xmlrpc.api;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import com.atlassian.xmlrpc.ServiceObject;
-
-@ServiceObject("Test")
-public interface TestService
-{
- public String ping();
-}
"SearchService.getArtifactVersions", "SearchService.getArtifactVersionsByDate",
"SearchService.getDependencies", "SearchService.getDependencyTree",
"SearchService.getDependees" );
-
+
+ public static final String PING = "PingService.ping";
}
{\r
throw new XmlRpcException( 401, e.getMessage() );\r
}\r
- } \r
+ }\r
+ else if ( methodName.equals( ServiceMethodsPermissionsMapping.PING ) )\r
+ {\r
+ return new AuthorizationResult( true, username, null );\r
+ }\r
else\r
{\r
return securitySystem.authorize( session, ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE );\r
* under the License.\r
*/\r
\r
-import org.apache.archiva.web.xmlrpc.api.TestService;\r
+import org.apache.archiva.web.xmlrpc.api.PingService;\r
\r
-public class PingServiceImpl implements TestService\r
+public class PingServiceImpl implements PingService\r
{\r
public String ping()\r
{\r