Generated interface for PHP 2


I using RemObjects SDK for Delphi.
I have a function edited with Service Builder.

in Delphi interfaces this is like this:

function StergeComandaDinERP(const ORDERCMSID: UnicodeString; const APPID: Integer; out ErrMsg: UnicodeString): Boolean;

In PHP interface is generated as:

// StergePozitiiComandaDinERP($SessionId, ORDERCMSID: WideString, APPID: Integer, out ErrMsg: WideString) {
function StergePozitiiComandaDinERP_with_SessionID($ORDERCMSID, $APPID, &$ErrMsg) {
$___msg = new xmlrpcmsg(“DataService.StergePozitiiComandaDinERP”);
$___msg->addParam(new xmlrpcval($SessionId, “string”));
$___msg->addParam(new xmlrpcval($ORDERCMSID, “string”));
$___msg->addParam(new xmlrpcval($APPID, “int”));
$___msg->addParam(new xmlrpcval($ErrMsg, “string”));
$___res = $this->___server->send($___msg);
if ($___res->faultCode()) eCommerceConnectorHelpers::RaiseException($___res->faultString());
return $___res->value()->scalarval();

When I call this function from PHP,
result is what should be in ErrMsg param, and
ErrMsg remains empty.

Best Regards,
Tiberiu Stoicescu


according to XML-RPC Specification, only one param (i.e. result) can be present:

The body of the response is a single XML structure, a <methodResponse>, which can contain a single <params> which contains a single <param> which contains a single <value>.

we also put var/our parameters into response after result value:


so if you could parse the server response manually, you also can read out param.


That means not all function defined with “Service Builder” can work as defined in PHP implementation.

A warning about that would be very useful.

I’ll log an issue for this.
That said, you could look at HttpAPI as a client<->server transport for new projects: HttpAPI

This feature allows Remoting SDK-based server to expose its methods via REST endpoint. Even more, definition of this endpoint is exposed as OpenAPI ( aka Swagger ) metadata. This means that you can use any existing PHP toolset to generate classes required to interact with the server.

HttpAPI support can be added to existing RO SDK server as well with minimal changes in code needed

Thanks, logged as bugs://85727

bugs://85727 got closed with status fixed.