English 中文(简体)
从C#数据类别中生成 Java数据类别——是否有现有的工具/方法?
原标题:Generating Java data classes from C# data classes - is there an existing tool / method?

I m 给一家WCF REST服务的 j客户写信。 这项服务使用由JSON传输的不同数据类别进行通信。 就我而言,利用Gson lib处理这些类别的序列化问题。 然而,为了做到这一点,我显然需要使用C#类的 Java定义。

目前按手写: 我检查C#类的定义,检查哪些财产有[DataMember]通知,并对这些财产形成相应的分类。 这是一个可怕的解决办法:它缓慢、浪费和难以以人工的方式使这些班级跟上。

我应该用什么工具/方法从其C#对口单位中选取这些课程? 是否写出某些蚊帐,以体现唯一的解决办法,产生java语种?

问题回答

你可以尝试一种工具,如wsdl4j,以创建代用java文档,并公正使用其中的类别定义。





相关问题
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 ...

热门标签