小编Phi*_*sen的帖子

是否可以在Spring WS Web服务中重命名响应命名空间前缀?

我基于http://spring.io/guides/gs/producing-web-service/上的示例构建了一个Spring WS Web服务.响应包含带有前缀"ns2"的命名空间.

xmlns:ns2="http://www.mycompany.com/somewhere"
Run Code Online (Sandbox Code Playgroud)

皂响应

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns2:mitteilungResponse xmlns:ns2="http://www.mycompany.com/somewhere">
         <ns2:responseContent>
            <ns2:message>Hello World!</ns2:message>
         </ns2:responseContent>
      </ns2:mitteilungResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)

是否可以将该前缀重命名为"myprefix"?怎么样?任何人?

spring web-services spring-ws jaxb xml-namespaces

0
推荐指数
1
解决办法
2960
查看次数

标签 统计

jaxb ×1

spring ×1

spring-ws ×1

web-services ×1

xml-namespaces ×1