- Revenera Community
- :
- FlexNet Operations
- :
- FlexNet Operations Forum
- :
- Re: GetEntitlementLineItemPropertiesQuery - "9999:java.lang.NullPointerException
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi All,
Good days!
I have a skeleton code as below using sandbox account:-
searchActivatableItemDataType searchtype = new searchActivatableItemDataType();
Flexnet.Entitlement.SimpleQueryType qtype = new Flexnet.Entitlement.SimpleQueryType();
qtype.searchType = Flexnet.Entitlement.simpleSearchType.EQUALS;
qtype.value = "YH6D-SJIN-5GSH-8RPR";
searchtype.activationId = qtype;
searchEntitlementLineItemPropertiesRequestType request = new searchEntitlementLineItemPropertiesRequestType();
request.batchSize = "1";
request.pageNumber = "1";
request.queryParams = searchtype;
searchEntitlementLineItemPropertiesResponseType SearchResponse2 = new searchEntitlementLineItemPropertiesResponseType();
using (var eos = new EntitlementOrderClient())
{
eos.Open(ConfigurationManager.AppSettings["FNOODlogin"], ConfigurationManager.AppSettings["FNOODpassword"], ConfigurationManager.AppSettings["FNOCBaseURL"]);
try
{
SearchResponse2 = eos.GetEntitlementLineItemPropertiesQuery(request);
if (SearchResponse2.statusInfo.status == Flexnet.Entitlement.StatusType.SUCCESS)
{
:
:
:
***********************************************************************************
/// <summary>
/// Returns entitlements that match the query parameters in the request.
/// </summary>
/// <param name="request">
/// The request that contains query parameters.
/// </param>
/// <returns>
/// The entitlements.
/// </returns>
public virtual searchEntitlementLineItemPropertiesResponseType GetEntitlementLineItemPropertiesQuery(searchEntitlementLineItemPropertiesRequestType request)
{
CheckOpenAndNotDisposed();
return Client.getEntitlementLineItemPropertiesQuery(request);
}
Above code returned status => "FAILURE" with reason => 9999:java.lang.NullPointerException
Refer to sandbox Revenera Portal Line Item screenshot >> https://ibb.co/c6c4XRV
I need a guidance or any sample code for this? Basically I am trying to retrieve line item state status using ActivationID.
Please advise.
Regards,
Micheale
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @michealeseecc ,
The issue may be that Authorization should be Basic, not Bearer Basic. I have attached a Postman collection containing this API, try putting in your FNO Credentials for Authorization, site and Activation ID. You'll just need to unzip and then import the collection.
Thx,
Jim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
HI @michealeseecc , Here's a working example of the getEntitlementLineItemPropertiesQuery that returns the line item state:
Thx,
Jim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Jim,
Thanks for your great help.
I managed to run my code as below, but I getting the STATE as DRAFT instead INACTIVE:-
searchActivatableItemDataType searchtype = new searchActivatableItemDataType();
Flexnet.Entitlement.SimpleQueryType qtype = new Flexnet.Entitlement.SimpleQueryType();
qtype.searchType = Flexnet.Entitlement.simpleSearchType.EQUALS;
qtype.value = serialNumber;
searchtype.activationId = qtype;
entitlementLineItemResponseConfigRequestType respConfig = new entitlementLineItemResponseConfigRequestType();
respConfig.activationId = true;
respConfig.state = true;
searchEntitlementLineItemPropertiesRequestType request = new searchEntitlementLineItemPropertiesRequestType();
request.batchSize = "1";
request.pageNumber = "1";
request.entitlementLineItemResponseConfig = respConfig;
request.queryParams = searchtype;
searchEntitlementLineItemPropertiesResponseType SearchResponse2 = new searchEntitlementLineItemPropertiesResponseType();
using (var eos = new EntitlementOrderClient())
{
eos.Open(ConfigurationManager.AppSettings["FNOODlogin"], ConfigurationManager.AppSettings["FNOODpassword"], ConfigurationManager.AppSettings["FNOCBaseURL"]);
try
{
SearchResponse2 = eos.GetEntitlementLineItemPropertiesQuery(request);
if (SearchResponse2.statusInfo.status == Flexnet.Entitlement.StatusType.SUCCESS)
{
:
:
******************************************************************************
The status returned => SUCCESS
The state returned =>DRAFT but my actual line item state is "Inactive". I tried edit my lineitem state to Obselete. And the code above still returned state as DRAFT.
https://ibb.co/Q6sCh4k
Please advise.
Thanks.
Regards,
Micheale
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @michealeseecc ,
Are you sure you are looking at the state of the Entitlement line "state" vs the state of the Entitlement "entitlementState"? In the example below I have the state of the Entitlement line for the provided activation ID set to Inactive and the state of the Entitlement set to Deployed. The API correctly returns both:
Your screenshot leads me to believe you are looking at entitlementState instead of state. If this is not the case please submit a support ticket so someone can work with you directly to resolve.
Thanks,
Jim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Jim,
Many thanks for your respond. Would you able to share your Headers for POSTMAN screenshot? I am trying out using POSTMAN, but still no luck.
My POSTMAN Body Code:<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:v5.webservices.operations.flexnet.com">
https://ibb.co/3mL9Nc5
Bearer : Basic xxxleGVyYWFwaUXxxmV2XYXXb206RmxleFNXXXxx
Not sure what is missing, I am getting Responses failure
Last try, If not I will log support ticket on Monday.
Many thanks.
Regards,
Micheale
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @michealeseecc ,
The issue may be that Authorization should be Basic, not Bearer Basic. I have attached a Postman collection containing this API, try putting in your FNO Credentials for Authorization, site and Activation ID. You'll just need to unzip and then import the collection.
Thx,
Jim
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Awesome Jim. Happy Friday. 😇
I changed my Authorization
Type : Bearer Token to Basic Auth.
Now, I will figure out on my C# code to make it work, will share the solution once I did it.
Thanks.
Regards,
Micheale
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)