将soap响应转换为已定义的json

问题描述

我需要将soap响应转换为json。我的肥皂反应如下。

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Header>
  <header xmlns="tested">
     <requestId>NA</requestId>
  </header>
  </SOAP:Header>
  <SOAP:Body>
  <findValue xmlns="tested">
     <result>
        <test.Option>
           <name>NA</name>
           <children-Set>
              <test.TestClass>
                 <value>25</value>
                 <value1>20.0</value1>
                 <value2>5.0</value2>
                 <value3>88</value3>
                 <testval>2545</testval>
                 <testval1>3</testval1>
                 <testval2>3</testval2>
                 <children-Set />
              </test.TestClass>
           </children-Set>
        </test.Option>
     </result>
  </findValue>
</SOAP:Body>
</SOAP:Envelope>

在这里,我需要转换json格式。我的json格式如下所示。

    {
    "type": "com.test.package","properties": {
        "name": "","testlist": [],"object": {
            "value": "25.167969","value1": "-20.0","value2": "-25.0","value3": "85.0"
        },"object1": {
            "testval": "3.2545","testval2": "3.05","testval3": "3.0"
        }
    }
}

我有一个时间表来完成这个任务。谁能帮助我使用Java进行此转换。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)