[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: =?iso-8859-15?Q?Problem_with_HandlerMapping,_custom_RequestProcessorFa?=
From: kahooya () web ! de
Date: 2006-11-30 15:53:46
Message-ID: 976625110 () web ! de
[Download RAW message or body]
Hi,
after studying the api and the faq entry about initializing a request processor with \
some state (in this case the HttpServletRequest) i found similar hints to solve the \
problem:
Servlet:
1. overwriting "newXmlRpcServer" to save the request i a helper object
protected XmlRpcServletServer newXmlRpcServer(ServletConfig pConfig)
throws XmlRpcException {
return new XmlRpcServletServer(){
protected XmlRpcHttpRequestConfigImpl newConfig(HttpServletRequest pRequest) {
MyContext context = new MyContext();
context.setRequest(pRequest);
return context;
}
};
}
2. overwriting "newPropertyHandlerMapping" to do the mapping
PropertyHandlerMapping mapping = new PropertyHandlerMapping();
MyProcessorFactoryFactory factory = new MyProcessorFactoryFactory(new \
MDBServiceContext()); mapping.addHandler("Search", SearchWSManager.class);
mapping.setRequestProcessorFactoryFactory(factory);
...
3. Custom ProcessorFactoryFactory
public class MyProcessorFactoryFactory extends
StatelessProcessorFactoryFactory {
private MyContext serviceContext;
public MyProcessorFactoryFactory(MyContext serviceContext) {
super();
this.serviceContext = serviceContext;
}
protected Object getRequestProcessor(Class pClass) throws XmlRpcException{
RequestInitializableRequestProcessor proc =
(RequestInitializableRequestProcessor) super.getRequestProcessor(pClass);
proc.init(this.serviceContext);
return proc;
}
}
But: This custom getRequestProcessor Method is never called, so the Request Processor \
is never initialized as i want to.
So: It seems possible to register custom RequestProcessorFactories, but i'm not able \
to figure that out. And the sample in the faq is not very helpful because it is even \
not compiling...
Some help?
Best Regards,
Tom
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic