question

Carlos J. avatar image
Carlos J. asked ·

Get Data Object

Hello All,


I´m trying to get a value of java object. Here is the code of class where is the method that I´m tryng extract value.


package com.xxx.webservice.impl;


import com.xxx.Dicionario;

import com.xxx.AXGService;

import com.xxx.webservice.AXGSecurityWebservice;

import com.XXX.webservice.WebServiceException;

import org.springframework.web.context.support.SpringBeanAutowiringSupport;


public class AXGSecurityEndpoint extends SpringBeanAutowiringSupport

implements AXGSecurityWebservice

{


public Dicionario ManageDevice(Dicionario request)

throws WebServiceException

{

return service.manageDevice(request);

}


public Dicionario AnalyzeTransaction(Dicionario request)

throws WebServiceException

{

return service.analyzeTransaction(request);

}


public AXGSecurityEndpoint(AXGService service)

{

this.service = service;

}


public ASGSecurityEndpoint()

{

}


private ASGService service;

}


What can I be doing wrong?


Thank you so much



javarequest attributes
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Sebastian K. avatar image
Sebastian K. answered ·

What method you are trying to extract? In general if you will try to read object, dynatrace will make by default toString casting. This means that you will see class name in general. If you want value you have to use Accessor that will extract data of single type (like string or integer) from object. So it can looks like this:

MyObject.getUser().getUserName()

Accessors can be chained so you can make such think which will fetch from one object, another one. From second object we can fetch String with User Name.

You can't as well just instrument class that conains object you want to extract. You have to instrument method that passes this object as parameter or return value and than mark this param as Request Attribute. Than you have to use proper Accessors to extract simple type data :)

Sebastian

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello Sebastian,


Thank you so much for your help. Thanks to you and my colleague from Dynatrace, Allison, I managed to instrument and get the correct information.


Have a great day.

Best Regards

Carlos Coqueiro

0 Likes 0 · ·
Carlos J. avatar image
Carlos J. answered ·

I am trying to get an information that is in a SOAP object, in this case, I need to get the return value of the dictionary class that implements an AnalyzeTransaction interface -> return service.analyzeTransaction(request); How would I do for this return? AnalyzeTransaction.service.analyzeTransaction()?

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

For such case there would be not possible. You have to find place where such request is changed into POJO object or String (and use REGEX for data extraction).

Sebastian

0 Likes 0 · ·

Space Topics

mobile monitoring dotnet synthetic monitoring reports iis chat kubernetes servicenow amazon web services mysql mainframe rest api errors cassandra dashboard oneagent sdk cmc application monitoring openkit smartscape request attributes monitoring developer community user tagging log monitoring services ufo syntheticadvisory activegate ip addresses auto-detection high five award oracle hyperion webserver uem usql iib test automation license web performance monitoring ios news migration management zones index ibm mq web services notifications sso host monitoring knowledge sharing reports browser monitors java hybris sap vmware maintenance window user action naming javascript appmon ai synthetic classic availability tipstricks automation extensions session replay diagnostic tools permissions davis assistant faq documentation problem detection http monitors server easytravel apdex aws-quickstart network docker tags and metadata cloud foundry google cloud platform synthetic monitoring process groups account usability dynatrace saas gui paas openshift key user actions administration user actions postgresql synthetic locations oneagent security Dynatrace Managed user management custom python technologies mongodb openstack user session monitoring continuous delivery citrix configuration alerting NGINX action naming linux nam installation masking error reporting database mission control jmeter recorder apache mobileapp RUM php threshold azure purepath davis scripting agent aix nodejs android