English 中文(简体)
我应如何使用阿帕奇·XML-RPC的类型Convertor 服务器方面的工厂?
原标题:How am I supposed to use Apache XML-RPC s TypeConvertorFactory on the server side?
  • 时间:2011-09-21 07:11:53
  •  标签:
  • java
  • xml-rpc

我在努力争取阿帕奇·夏马-保喀,把我的类型冲突说成真。 它呼吁客户一方(只有确认的返回价值才能工作,有经过测试的参数),但服务器方根本不要求这样做。

My initialisation code looks like this:

XmlRpcServlet servlet = new XmlRpcServlet();
XmlRpcServerConfigImpl config = new XmlRpcServerConfigImpl();
config.setEnabledForExtensions(true);
servlet.getXmlRpcServletServer().setConfig(config);
servlet.getXmlRpcServletServer().setTypeConverterFactory(
    new ServerTypeConvertorFactory());

页: 1

private interface API {
    AvailableLicencesResponse availableLicences();
}

现有的LicencesResponse只是一种普通的堕胎,尽管 JavaBean根深蒂固。

目前,服务器将这一反应发送到第64号基地(由于我称之为<代码>EnabledForExtensions(true)——但是如果我不说的话,我会发现“未预见到的流端”的类型错误,而没有任何其他地方的错误来告诉我为什么)。

我在服务器TypeConvertorFactory内部设置了突破点,看来没有把任何方法放在服务器上。 同样的断点显示,当服务器击退结果时,客户要求转换,但是由于序列化魔法,结果已经是正确的,因此我无需转换。

基本上,我试图做的是执行符合标准XML-RPC(并且没有使用大量基地64数据......)的无线协议,同时还有一份不需要一千 cast的电文,需要绘制地图。 我也想避免发出比必要的更多的呼吁,这就是为什么我回来的是一个灯塔,而不是采取单独的方法来获得它的每一财产,因为这样做也会奏效。

(Also, if there is a simpler to use API than this one, I m open for suggestions. It started out being really easy, but that s until you need to customise it. Also, anyone suggesting Axis or other SOAP-based APIs will be shot at dawn.)

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签