【发布时间】:2012-11-14 12:30:56
【问题描述】:
当我调用 web 服务函数时,我得到这个响应 xml:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope>
<soap:Body>
<Response>
<Result>
<Status>Success</Status>
<Text>Some text</Text>
</Result>
</Response>
</soap:Body>
</soap:Envelope>
如您所见,响应 xml 不包含soap命名空间。
我想通过删除soap-stuff来转换xml,当我进行xsl转换时,我通过将soap命名空间添加到响应xml中来实现这一点:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Response>
<Result>
<Status>Success</Status>
<Text>Some text</Text>
</Result>
</Response>
</soap:Body>
</soap:Envelope>
当soap命名空间不包含在响应xml中时,我该如何做这个转换?
【问题讨论】: