问题描述
平台 - Java、Ubuntu(首选 apache)
Platform - Java, Ubuntu (apache preferred)
我想为soap客户端实现rest web服务.Baiscally 该服务将模拟真实服务的行为.这可能吗?
I have a situation where i would like to implement rest web service for soap client. Baiscally this service will be simulating a behavior of real service. Is that possible?
如果是,另一个问题,Axis2 是否足以用于休息 Web 服务,如果不是最简单的替代方案.
If yes, another question, Is Axis2 good enough for rest web service, if not what is easiest alternative.
我的模拟器非常简单,它会根据请求的 xpath 解析以 xml 响应进行响应.
My simulator is very simple where it will respond with a xml response based on xpath parsing of request.
推荐答案
这绝对有可能.SOAP 请求使用 POST 方法发送,因此您只需要构建 REST 资源并使用适当的 SOAP 响应 xml 响应 POST 请求.我已经使用 RESTeasy 构建了类似的东西,这非常简单.
It's absolutely possible. SOAP requests are sent using POST method so you just need to build REST resource and respond with a proper SOAP response xml to POST requests.I've build something similar using RESTeasy which is pretty simple.
https://sourceforge.net/p/soaprest-mocker/
这篇关于为soap客户端休息网络服务,这可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!