嗨,我有一个问题,很长一段时间,我不能解决。当我使用spring run boot命令在STS spring上运行我的应用程序时,一切都运行正常。但是,如果我尝试在tomcat上部署应用程序,除了向拒绝对soap服务的调用的soap消息添加名称空间之外,一切都可以正常工作。
我在spring boot上插入了下面正确的soap消息,并在tomcat上遵循了错误的消息。
SPING启动成功SOAP消息:
<RetrieveDocumentSetRequest
xmlns="urn:ihe:iti:xds-b:2007"
xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0">
<DocumentRequest>
<RepositoryUniqueId>2.16.840.1.113883.2.9.2.999.4.5.113883</RepositoryUniqueId>
<DocumentUniqueId>2.16.840.1.113883.2.9.2.999.4.4^123456</DocumentUniqueId></DocumentRequest>
</RetrieveDocumentSetRequest>TOMCAT 7失败SOAP消息:
<ns6:RetrieveDocumentSetRequest
xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0"
xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:ns6="urn:ihe:iti:xds-b:2007">
<DocumentRequest><RepositoryUniqueId>2.16.840.1.113883.2.9.2.999.4.5.113883</RepositoryUniqueId>
<DocumentUniqueId>2.16.840.1.113883.2.9.2.999.4.4^123456</DocumentUniqueId>
</DocumentRequest>
</ns6:RetrieveDocumentSetRequest>正如您所看到的,除了n6名称空间之外,消息几乎是相同的。我不明白为什么以及tomcat上是否有一个错误的Jar关于springboot服务器。
发布于 2017-01-24 19:56:16
我已经解决了我的问题。在spring boot的pom.xml中指定的生成器类,使用JAXB从接口WSDL生成类,而在Jar中使用并发布tomcat,使用jax-ws库生成从WSDL开始的类。第一个库JAXB在类属性和生成的类的内部类上插入关于名称空间的注释。在使用jax-ws时,所有这些都不会发生,但仅针对某些类。这个东西即使乍一看是不相关的,它也会创建一个被验证器服务器端拒绝的答案,即发送的SOAP请求。
我希望它能在未来帮助一些人。
https://stackoverflow.com/questions/41652435
复制相似问题