Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了实现一个简单的soapui异步响应模式,我需要检索发送初始请求的客户端的IP,以便能够将响应发送回正确的请求者。
我找不到使用soapui模拟请求API从请求中检索此信息的方法,想知道是否有人有办法做到这一点?
谢谢!
好的,当您查看好课程时,实际上真的很容易。我在看接口com.eviware.soapui.model.mock.MockRequest而不是实现com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest
com.eviware.soapui.model.mock.MockRequest
com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest
通过实施,这将提供响应 mockRequest.getHttpRequest().getRemoteAddr()
mockRequest.getHttpRequest().getRemoteAddr()
希望这对其他人有帮助!