将MTOM附件转换为二进制

时间:2019-02-15 16:28:18

标签: xml soap binary base64 mtom

关于这个问题,我想请教您:

我想将SOAP WS响应中的MTOM附件转换为binay base64。

示例:

我有这个有效载荷:

<ns2:Response xmlns:ns2="http://xxxxx.com" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<return>
    <messages>
        <id>0</id>
        <messageContent>Dummy text</messageContent>
        <type>INFOS</type>
    </messages>
    <LabelResponse>
        <label>
            <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:f6212d3d-7e86-4799-b227-1003bd7d0221-81412@cxf.apache.org"/>
        </label>
    </LabelResponse>
</return>

我想获得这个:

 <ns2:Response xmlns:ns2="http://xxxxx.com" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<return>
    <messages>
        <id>0</id>
        <messageContent>Dummy text</messageContent>
        <type>INFOS</type>
    </messages>
    <LabelResponse>
        <label>.....XXXxXxxXXxxxx .... [Binary Base64]</label>
    </LabelResponse>
</return>

我该怎么做?我指出,由于特定原因,我可以使用的语言是XSL Transformation,Javascript和Groovy。是否有办法通过使用这3种方法之一来实现?

谢谢!

0 个答案:

没有答案