SOAP Header Parameters Incorrectly Placed in Message Body since SDK V10.0.0.1595 and .1613

SDK Version Comparison:

  • RemObjects SDK V10.0.0.1521: :white_check_mark: Working correctly

  • RemObjects SDK V10.0.0.1595 / .1613: :cross_mark: 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.

Hi,

this is known issue and was already fixed for next build.

Hello Evgeny
very good news. I just checked the current downloads and there is no preview (BETA) available. Is there a rough scheduling?

Hi,

you can update codegen4 manually.

  • close Service Builder & Delphi IDE
  • launch cmd.exe under admin rights
  • go to folder where archive is extracted
  • launch a.cmd
  • retest changes in ServiceBuilder under usual user

cg4.zip (601.3 KB)


by other hand, you can use rodl2code: rodl2code.zip (651.1 KB)

Hello Evgengy
thank you. The patch worked nicely :+1: !