archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: Usage of user management through xmlrpc patch
Date Mon, 23 Jan 2012 12:38:10 GMT
If I was you, personally I will take some time to use REST api.
As we won't support xmlrpc anymore (except if someone take care of
this in a separate plugin/project : do you want ?).

The rest api is very simple to use (have a look at the redback junits)
and the cxf community is very active (not sure the xmlrpc @asf is
really active).

BTW it's my POV :-)


2012/1/23 Gmail <barinluk@gmail.com>:
> Hi,
> seems that I found that problem. It was my fault, I just din't read the
> patch details good enough before.
> Now, I figured out that the redback has its own servlet mapping
> "/redback-xmlrpc"
>
> So I call
>>>> proxy =  xmlrpclib.ServerProxy("http://admin:passwordt@localhost
> :8080/archiv
> a/redback-xmlrpc")
>>>> proxy.RoleService.getRoles()
>
> I tested the services on Archiva-1.4.M2 where it works ok.
> I also tried to build Archiva-1.3.5 with that patch, but unfotunatelly when
> running the above command
> I am getting this authrorization error, below.
> Can you please shed some light on what is wrong here or is it even possible
> to add this capability to 1.3.5 version of Archiva?
>
> Thx for any comment
> Lukas
>
> 2012-01-23 11:14:47,089 [btpool0-7] INFO
> org.codehaus.plexus.redback.authorization.rbac.RbacAuthorizer  - permission
> map does not contain operation: user-administrator
> 2012-01-23 11:14:47,105 [btpool0-7] ERROR
> org.apache.xmlrpc.server.XmlRpcStreamServer  - execute: Error while
> performing request
> org.apache.xmlrpc.common.XmlRpcNotAuthorizedException: Not authorized
>    at
> org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:81)
>    at
> org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
>    at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
>    at
> org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:191)
>    at
> org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:104)
>    at
> org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:191)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>    at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>    at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>    at
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)
>    at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>    at
> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
>    at
> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
>    at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>    at
> org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
>    at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>    at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
>    at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>    at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
>    at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
>    at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>    at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>    at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>    at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>    at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>    at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>    at org.mortbay.jetty.Server.handle(Server.java:326)
>    at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
>    at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
>    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
>    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>    at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>    at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)
>
>
>
>
> 2012/1/23 Gmail <barinluk@gmail.com>
>
>> Hi Oliver,
>> I wanted to install latest stable version of Archiva which is currently
>> 1.3.5
>> and I wanted the user management xmlrpc services to be included as well.
>> Anyway, I also tried to install 1.4-M1 where the patch is already applied.
>> So in case the patch cannot be applied to lower version I would use this
>> one.
>>
>> But now, my main problem is how to actually use the added capability of
>> user management thru xmlrpc.
>> Can you please provide some examples how to use/call the services having
>> installed
>> 1.4-M1 or any usefull guide link?
>> I wasn't able to find any
>>
>> Thank you
>>
>> Lukas
>>
>>
>>
>> 2012/1/20 Olivier Lamy <olamy@apache.org>
>>
>>> 2012/1/20 Gmail <barinluk@gmail.com>:
>>> > Hello,
>>> > I have applied the patch: http://jira.codehaus.org/browse/MRM-1481
>>> > on the archiva version 1.3.5.
>>> > Now I would like to know actually how I can use the xmlrpc services in
>>> > archiva.
>>> >
>>> > As I use python to call the services, so for example the xmlrpc services
>>> > which were already part of the archiva 1.3.5 I call this way:
>>> > import xmlrpclib
>>> > proxy =  xmlrpclib.ServerProxy("http://admin:password@localhost
>>> > :8080/archiva/xmlrpc")
>>> > proxy.AdministrationService.getAllManagedRepositories()
>>> > So far everything works ok.
>>> >
>>> > And now,  I supposed that usage of those new exposed services by the
>>> patch
>>> > should be called in some similar way, e.g.
>>> > proxy.RoleService.getRoles()
>>> >
>>> > So what would be the correct usage/call of those new xmlrpc services
>>> neded
>>> > from following redback api:
>>> > I need to call methods from exactly this implementation class:
>>> >
>>> http://redback.codehaus.org/redback-core/apidocs/reference/org/codehaus/redback/xmlrpc/service/RoleServiceImpl.html
>>> >
>>> >
>>> > For me It seems that the ServiceObjects are not accessible or exposed
>>> yet
>>> > after even though the patch was applied
>>> >
>>> > As last comment, I don't like to use rest api in this moment
>>>
>>> Why ?
>>> BTW it's only available in 1.4-Mx
>>>
>>>
>>> >
>>> > Thanks for any advise folks
>>> >
>>> > BR.Lukas
>>>
>>>
>>>
>>> --
>>> Olivier Lamy
>>> Talend: http://coders.talend.com
>>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>>
>>
>>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
View raw message