Web services 在web服务请求中将字符串内容编码为XML

Web services 在web服务请求中将字符串内容编码为XML,web-services,websphere-7,Web Services,Websphere 7,我要处理的问题是,我必须使用从WSDL开发的遗留web服务客户机,该客户机将实际XML请求作为请求中唯一一个变量的值传递。我现在使用的web服务有一个不同的WSDL,我试图欺骗我的XML解析器,但是它正在编码我的实际XML响应 是否仍要配置解析器,以便请求: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org

我要处理的问题是,我必须使用从WSDL开发的遗留web服务客户机,该客户机将实际XML请求作为请求中唯一一个变量的值传递。我现在使用的web服务有一个不同的WSDL,我试图欺骗我的XML解析器,但是它正在编码我的实际XML响应

是否仍要配置解析器,以便请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <request>&lt;elemA&gt;&lt;elemB&gt;abc&lt;/elemB&gt;&lt;/elemA&gt;</request>
   </soapenv:Body>
</soapenv:Envelope>
改为:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <foo>
         <elemA>
            <elemB>abc</elemB>
         </elemA>
      </foo>
   </soapenv:Body>
</soapenv:Envelope>
我正在使用JAX-WS和WebSphere7

提前谢谢


Pablo

去年我曾经处理过这种情况,我的解决方案是将soap消息中的XML封装在CDATA部分中

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header/>
       <soapenv:Body>
          <![CDATA[
          <foo>
             <elemA>
                <elemB>abc</elemB>
             </elemA>
          </foo>
          ]]
       </soapenv:Body>
    </soapenv:Envelope>

原始设计值得发布到