1

我使用 cxf.response 从 wsdl 文件创建了一个 Web 服务生产者

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://esb.tiaa.org/life-insurance-correspondence-v1/types" xmlns:ns3="http://esb.tiaa.org/indianarmyshortservice">
    <soap:Body>
    <ns2:getSourcesResponse xmlns:ns2="http://channelmapwebservice.service.web.ccad/">
     <return>
        <sourceId>3</sourceId>
        <sourceName>DUMMY9</sourceName>
     </return>

预期的结果是

            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
  <ns1:getSourcesResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://com.ccadllc.dac.web.service.channelmapwebservice">
       <getSourcesReturn soapenc:arrayType="xsd:anyType[644]"
 xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <getSourcesReturn xsi:type="ns2:SourceInfo"    xmlns:ns2="http://channelmapwebservice.service.web.ccad">
           <sourceId xsi:type="xsd:int">3</sourceId>
           <sourceName xsi:type="xsd:string">DUMMY9</sourceName>
        </getSourcesReturn>

如何获得预期的结果

4

0 回答 0