Web services tomcat服务器上的Soap消息名称空间问题

Web services tomcat服务器上的Soap消息名称空间问题,web-services,tomcat,soap,spring-boot,Web Services,Tomcat,Soap,Spring Boot,嗨,我有一个很长一段时间的问题,我不能解决。当我使用spring run boot命令在STS-spring上运行我的应用程序时,一切正常。但如果我尝试在tomcat上部署应用程序,除了在soap消息中添加名称空间以拒绝对soap服务的调用之外,其他一切都可以正常工作 我在spring boot上插入下面正确的soap消息,并在tomcat上遵循错误的消息 SPING引导成功SOAP消息: <RetrieveDocumentSetRequest xmlns="urn:ihe:iti:xd

嗨,我有一个很长一段时间的问题,我不能解决。当我使用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>
   <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>

2.16.840.1.113883.2.9.2.999.4.5.113883
2.16.840.1.113883.2.9.2.999.4.4^123456
TOMCAT 7失败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>
   <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>

2.16.840.1.113883.2.9.2.999.4.5.113883
2.16.840.1.113883.2.9.2.999.4.4^123456
正如您所看到的,除了n6名称空间之外,消息几乎是相同的。我不明白为什么tomcat上有一个关于springboot服务器的错误Jar。我已经解决了我的问题。 spring boot的pom.xml中指定的生成器类使用JAXB从接口WSDL生成类,而使用和发布tomcat的Jar使用jax ws库从WSDL生成类。 第一个库JAXB在类属性和生成的类的内部类上插入关于名称空间的注释。所有这些在使用jax-ws时都不会发生,但只适用于某些类。这件事即使乍一看不相关,也会创建一个被验证服务器端拒绝的答案,即发送的SOAP请求

我希望它将来能帮助别人