Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation request parameter numbering #28

Closed
HappyPathAB opened this issue Oct 10, 2020 · 3 comments
Closed

Validation request parameter numbering #28

HappyPathAB opened this issue Oct 10, 2020 · 3 comments
Labels

Comments

@HappyPathAB
Copy link

The wiki page for Licensee Services states that model-specific validation parameters must be passed with a number suffixed to the parameter name, so that parameters belonging to different modules passed in the same request can be separated. This doesn't work as documented.

I have a PayPerUse module. If I issue a validation request with only that module in the request, and parameters created using ValidationParameters.put(moduleID, "reserveQuantity0", "1") (in order to reduce the remaining quantity by one), it doesn't work.
But if I create the parameter with put(moduleID, "reserveQuantity", "1") it does work.

On the Javadoc page for ValidationParameters, put() is undocumented. It is also uncommented in the C# source.

So is it the case that ValidationParameters.put() handles the numbering and I should always use the parameter name without numbers?
Or must parameters be numbered only if there is more than one module in the validation request? (There is no mention of that on the Licensee Services page).
Or is it that numbered parameters are not supported for PayPerUse modules (or even just for pre-payment)? Again, there is no mention of any different parameter numbering rules for this licensing model.

@r-brown
Copy link
Member

r-brown commented Oct 14, 2020

In the case of multiple product modules validation, required attributes indexes will be added while using client libraries.

C# source code for the reference: https://github.com/Labs64/NetLicensingClient-csharp/blob/master/NetLicensingClient/LicenseeService.cs#L122

While using another toolset, such as CLI, Postman, custom implementation, etc. - indexes need to be added manually.

@r-brown
Copy link
Member

r-brown commented Oct 14, 2020

@HappyPathAB thank you for this hint - we'll update the documentation (source code) accordingly.

@r-brown
Copy link
Member

r-brown commented Oct 14, 2020

All NetLicensing client libraries updated accordingly.

JavaDoc is part of the Labs64/NetLicensingClient-java and will be deployed with the next NetLicensing core release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants