web-services - 如何使用上下文路径来访问肥皂网络服务?
问题描述
我已经更改了属性文件中的上下文路径,之后当我尝试从 SOAPUI 访问 web 服务时,我得到空白页作为响应。所以,我给出了与 jboss-web 的上下文根中相同的值。 xml。尽管如此,面对同样的问题。
server.contextPath=/myvalue
<context-root>/myvalue</context-root>
我也对 SOAPWSConfig 类进行了一些更改。
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet,"/myvalue/*");
}
以下是我在骆驼路线中所做的更改以指向 URL:
from("spring-ws:uri:http://{{webservice.ipaddress}}:{{webservice.port}}/{{server.contextPath}}/CCSWebServiceBean/GetScheduleDetailsCCS?endpointMapping=#endpointMapping")
.unmarshal(jaxb).process(ccsServiceProcessor).marshal(jaxb);
}
它使用默认的 contextPath 值。我用来从 SOAPUI 访问的 URL 是:
http://10.80.11.65:8080/myvalue/CCSWebServiceBean/GetScheduleDetailsCCS
请帮助解决这个问题。提前致谢。
解决方案
要处理端点标头/属性依赖,您应该使用“ recipientList ”。在蓝图中,它会是这样的:
<recipientList><simple>spring-ws:uri:http://{{webservice.ipaddress}}:{{webservice.port}}/{{server.contextPath}}/CCSWebServiceBean/GetScheduleDetailsCCS?endpointMapping=#endpointMapping</simple></recipientList>
同样适用于普通的 java 骆驼路线。
推荐阅读
- reactjs - 如何只返回最终的 fetch 调用?
- c# - 在返回列中执行具有多个连接和多个权利的存储过程
- tcl - 链接时缺少 ttkstub.lib
- mongodb - CentOS 7 上的 Nginx 安装成功,也获得了默认页面,但是当尝试浏览应用程序时,它给出了 nginx 错误
- spring-boot - Netty - EventLoop 队列监控
- laravel - 重新加载表格后数据表显示“1”而不是实际的表格数据,直到我手动刷新页面
- cypress - 赛普拉斯工具 - 如何在显示和隐藏按钮上执行点击操作,无法在此按钮上执行操作
- javascript - 为什么开玩笑不调用我的模拟实现
- sql - PostgreSQL 模式结构
- python - python 3.9 discord.py asyncio.async 错误