PHP CodeGen problem with SendSessionId

Hi,

When SendSessionId is selected on the Xml-Rpc message, the first parameter on all service calls must be the SessionID. PHP-generated interface does not take this into account, so it does not support the SendSessionId option.

Could a second PHP interface option be added with SessionID as the first parameter in all methods? CodeGen > PHP > Interface with SessionID

provide an example of correct code, pls

Correct code for SendSessionId option on Xml Rpc message:

function UserHasSecurityGroupAccess($SessionId, $SecurityGroup, &$HasAccess) {
    $___msg = new xmlrpcmsg("SKiExternal.UserHasSecurityGroupAccess");
    $___msg->addParam(new xmlrpcval($SessionId, "string"));
    $___msg->addParam(new xmlrpcval($SecurityGroup, "string"));
    $___msg->addParam(new xmlrpcval($HasAccess, "boolean"));
    $___res = $this->___server->send($___msg);
    if ($___res->faultCode()) SKiWebServiceHelpers::RaiseException($___res->faultString());
    return Response::FromXmlRpcVal($___res->value());
}

Wrong code for SendSessionId option on Xml Rpc message:

function UserHasSecurityGroupAccess($SecurityGroup, &$HasAccess) {
    $___msg = new xmlrpcmsg("SKiExternal.UserHasSecurityGroupAccess");
    $___msg->addParam(new xmlrpcval($SecurityGroup, "string"));
    $___msg->addParam(new xmlrpcval($HasAccess, "boolean"));
    $___res = $this->___server->send($___msg);
    if ($___res->faultCode()) SKiWebServiceHelpers::RaiseException($___res->faultString());
    return Response::FromXmlRpcVal($___res->value());
}

Thanks, logged as bugs://71362

bugs://71362 got closed with status fixed.

You can extract ROSBPHP.zip (19.1 KB) into …\RemObjects Software\RemObjects SDK (Common)\Bin.

Note: this fix requires the latest release (8.2.89.1153)

Thanks! This looks good :smile: