我有一个包封的签名XML,如下所示:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SolicitudRegistro xmlns...
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod...
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<XPath>ancestor-or-self::*[local-name()='SolicitudRegistro']</XPath>
</Transform>
</Transforms>
</SignedInfo>
</Signature>
</SolicitudRegistro>
当我尝试通过Web服务发送它时,Jax-WS将请求内容更改为:
<SolicitudRegistro xmlns...
<!-- Here -->
<Signature:Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:Signature="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod...
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform>
<Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<XPath>ancestor-or-self::*[local-name()='SolicitudRegistro']</XPath>
</Transform>
</Transforms>
</SignedInfo>
<!-- Here -->
</Signature:Signature>
</SolicitudRegistro>
XPath转换包含一些签名元素,文档无效。我尝试在测试环境中使用Soap定义创建HttpRequest,并且期望响应。但是,在生产中,Web服务具有MTOM优化。你会推荐什么解决方案?
由于