C# ASMX SOAP Изменить имя тега - PullRequest
0 голосов
/ 14 июля 2020

Я использовал инструмент SvcUtil для обратного проектирования файла wsdl. Я получаю следующий ответ

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" 
                xmlns:rpc="http://www.w3.org/2003/05/soap-rpc" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <billerBillPresentmentResponse xmlns="http://localhost/Services/Biller_bill_presentment.wsdl">
         <result xmlns="">
            <paramOut xmlns="http://localhost/Services/Biller_bill_presentment.wsdl/types/">
               <errorCode>000</errorCode>
               <errorDescription>SUCCESSFULL</errorDescription>
               <billingsRec>
                  <array>
                     <billingNo>?</billingNo>
                     <billNo>?</billNo>
                     <billStatus>?</billStatus>
                     <dueAmount>?</dueAmount>
                     <issueDate>?</issueDate>
                     <openDate>?</openDate>
                  </array>
               </billingsRec>
            </paramOut>
            <signature xmlns="http://localhost/Services/Biller_bill_presentment.wsdl/types/">aaa</signature>
         </result>
      </billerBillPresentmentResponse>
   </soap:Body>
</soap:Envelope>

, но мне нужен ответ, чтобы он выглядел нужным, добавив env: bil: typ: к имени тега в быть следующим образом:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/env-envelope" 
                xmlns:rpc="http://www.w3.org/2003/05/env-rpc" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <env:Body>
      <bil:billerBillPresentmentResponse xmlns="http://localhost/Services/Biller_bill_presentment.wsdl">
         <result xmlns="">
            <typ:paramOut xmlns="http://localhost/Services/Biller_bill_presentment.wsdl/types/">
               <typ:errorCode>000</typ:errorCode>
               <typ:errorDescription>SUCCESSFULL</typ:errorDescription>
               <typ:billingsRec>
                  <typ:array>
                     <typ:billingNo>?</typ:billingNo>
                     <typ:billNo>?</typ:billNo>
                     <typ:billStatus>?</typ:billStatus>
                     <typ:dueAmount>?</typ:dueAmount>
                     <typ:issueDate>?</typ:issueDate>
                     <typ:openDate>?</typ:openDate>
                  </typ:array>
               </typ:billingsRec>
            </typ:paramOut>
            <typ:signature xmlns="http://localhost/Services/Biller_bill_presentment.wsdl/types/">aaa</typ:signature>
         </result>
      </bil:billerBillPresentmentResponse>
   </env:Body>
</env:Envelope>

как я могу этого добиться?

...