SDK Version Comparison:
-
RemObjects SDK V10.0.0.1521:
Working correctly
-
RemObjects SDK V10.0.0.1595 / .1613:
Not working
Issue Description:
When using the Delphi Interface Service generated from ServiceBuilder, there’s a breaking change between SDK versions regarding SOAP header parameter handling.
In V10.0.0.1521 (Working):
lMessage.InitializeRequestMessage(lTransportChannel,
'SFEnterpriseAPI_V64', __InterfaceName, 'login');
lMessage.Write('_LoginScopeHeader',
System.TypeInfo(SFEnterpriseAPI_V64_Intf.LoginScopeHeader),
_LoginScopeHeader, []);
The Write
method correctly identifies header parameters using:
procedure TROSOAPMessage.Write(const aName: string; aTypeInfo: PTypeInfo;
const Ptr; Attributes: TParamAttributes);
var
l_node: IXMLNode;
begin
l_node := nil;
if fHeaderParams.IndexOf(Unprefix(aName)) > -1 then begin
// Header parameter handling...
In V10.0.0.1595 (Not Working):
lMessage.InitializeRequestMessage(lTransportChannel,
'SFEnterpriseAPI_V64', __InterfaceName, 'login');
lMessage.WriteStruct('_LoginScopeHeader',
_LoginScopeHeader, SFEnterpriseAPI_V64_Intf.LoginScopeHeader);
Problem: The generated code now uses WriteStruct
instead of Write
, which doesn’t check if the parameter should be placed in the SOAP header. This results in all header parameters being incorrectly placed in the SOAP message body, causing the service call to fail.