客户端 Axis 1.2 中 JDK5 Enum 的自定义序列化
我正在将 SOAP Web 服务迁移到 JDK1.5。 我在新代码中利用了本机 java 枚举。 由于某些原因,我一直使用 Axis 1.2,而且它本身并不支持 JDK5“枚举”。
我找到了一个关于如何为 java 枚举实现自定义序列化/反序列化的教程: http: //www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/(法语)。
我已经能够通过使用“.wsdd”文件中的“typeMapping”元素在服务器端成功注册这些自定义序列化处理程序。
但是,我不知道如何在客户端注册相同的类,因为我这里没有“.wssd”文件。
任何帮助将不胜感激。
谢谢, 拉斐尔
I am migrating a SOAP web service to JDK1.5.
I have took advantage of native java enums in the new code.
For some reasons, I'm stuck with Axis 1.2 and it does not natively support JDK5 "enums".
I have found a tutorial on how to implement custom a serialization / deserialization for java enums:
http://www.developpez.net/forums/d236564/java/developpement-web-java/web-services/utiliser-type-enum-jdk5-axis/ (in French).
I have been able to successfully register those custom serialization handlers on the server side via the use of "typeMapping" elements in the ".wsdd" file.
However, I can't figure out how to register the same classes on the client side, as I do not have a ".wssd" file here.
Any help would be appreciated.
Thanks,
Raphael
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于找到了如何手动注册自定义类型映射。
我在创建 Service 实例时执行此操作:
我不知道这是否是正确的方法,但它有效!
I have finally found how to manually register a custom type mapping.
I do it when creating an instance of a Service :
I don't know whether it is the right way to do it, but it works !