cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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




4 REPLIES 4

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


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


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()?


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