Web服务信封问题

时间:2013-07-09 10:41:51

标签: web-services

我使用cxf.response is

从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>

如何获得预期结果

0 个答案:

没有答案