JSON-RPC 到 SOAP 并返回到 JSON:将 JSON 对象映射到重要的 SOAP 消息
我正在尝试创建一个服务器,它从客户端获取 JSON-RPC 请求,将这些请求转换为发送给 SOAP 服务器的重要 SOAP 请求,然后获取 SOAP 响应并向客户端发送转换后的 JSON 响应。从 SOAP 服务器返回的响应可能非常复杂且嵌套,我正在尝试将 XML 字段映射到更扁平的 JSON。映射不会是 1:1。例如,我们可能会在 SOAP 响应中取回一系列代码,我们希望将其作为数据库中的值在 JSON 响应中返回。
我愿意使用最合适的任何语言或技术,那么有什么可以解决这个问题或可以提供帮助吗?
I'm trying to create a server that takes JSON-RPC requests from a client, transforms those into non-trivial SOAP requests to a SOAP server, then takes the SOAP response and sends the client a transformed JSON response. The responses that come back from the SOAP server are potentially very complicated and nested, and I'm trying to map the XML fields to flatter JSON. The mappings wont be 1:1. As an example, we may get back a sequence of codes in the SOAP response that we want to return in the JSON response as their values from a database.
I'm willing to use whatever languages or technologies are best appropriate, so is there anything out there that already solves this problem or can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
scalaxb 可以将 SOAP 转换为案例类和接口。 lift-json 可以将案例类转为json。
scalaxb 生成的代码将是 1:1。请参阅wsdl 1.1 支持。
如果您想将案例类映射到其他一些中间案例类,您可以先这样做。 将它们转换为 json
然后你可以应用 lift-json 自动或手动
scalaxb can turn SOAP into case classes and interfaces. lift-json can turn case classes into json.
The scalaxb-generated code would be 1:1. See wsdl 1.1 support.
If you want to map the case classes into some other intermediate case classes, you can do that first. Then you can apply lift-json to turn them into json automatically
or manually