Qualcuno potrebbe far luce su questo comportamento? Sembra che Delphi SOAP imposti il risultato della funzione come ultimo argomento, ma WSDL.exe legge il primo argomento come risultato della funzione.Incoerenza SOAP? Delphi 2010 (Win32) Server e Client .NET che sostituiscono 'out-parameter' e 'result'
Ho la seguente metodo in un servizio SOAP Delphi, in cui viene utilizzata la stringa risultato per la gestione degli errori di base:
function LoadCustomer(CustomerID: Double; out CustomerName: String): String;
Il WSDL generato è simile al seguente:
<message name="LoadCustomer2Request">
<part name="CustomerID" type="xs:double"/>
</message>
<message name="LoadCustomer2Response">
<part name="CustomerName" type="xs:string"/>
<part name="return" type="xs:string"/>
</message>
Per qualche ragione , WSDL.exe genera il seguente codice C# che scambia le stringhe CustomerName e 'Result':
public string LoadCustomer(double CustomerID, out string @return) {
WindowsFormsApplication1.ServiceReference1.LoadCustomerRequest inValue = new WindowsFormsApplication1.ServiceReference1.LoadCustomerRequest();
inValue.CustomerID = CustomerID;
WindowsFormsApplication1.ServiceReference1.LoadCustomerResponse retVal = ((WindowsFormsApplication1.ServiceReference1.ISKiWebInterface)(this)).LoadCustomer(inValue);
@return = [email protected];
return retVal.CustomerName;
}