Skip to main content

Low webservice throughput

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
cristianp
Offline
Joined: 2012-06-13

Greetings,
we have developed several webservices on glassfish. Some of these webservice methods return a list of DTOs.

If we call such webservices from the LAN everything works smooth and fast. But as soon as we call these webservices over a WAN, performances drops.

our method is something like this

public List GetListaDiciture(String instanceId,String sessionId) throws Exception

where DTODicitura is a

public class DTODicitura 
{
public DTODicitura ()
{
super();
}   
 
protected long id;

public long getId()
{
return id;
}

public void setId(long value_property_dto)
{
id=value_property_dto;
}
   
 
protected long idEntity;

public long getIdEntity()
{
return idEntity;
}

public void setIdEntity(long value_property_dto)
{
idEntity=value_property_dto;
}
   
 
protected String codice;

public String getCodice()
{
return codice;
}

public void setCodice(String value_property_dto)
{
codice=value_property_dto;
}
   
 
protected String descrizione;

public String getDescrizione()
{
return descrizione;
}

public void setDescrizione(String value_property_dto)
{
descrizione=value_property_dto;
}
   
 
protected long idGruppo;

public long getIdGruppo()
{
return idGruppo;
}

public void setIdGruppo(long value_property_dto)
{
idGruppo=value_property_dto;
}
   
 
protected int e_version;

public int getE_version()
{
return e_version;
}

public void setE_version(int value_property_dto)
{
e_version=value_property_dto;
}

private List<DTODicituraInLingua> DicitureInLingua;


@javax.xml.bind.annotation.XmlElement(nillable=true)
public List<DTODicituraInLingua> getDiciture()
{
return DicitureInLingua;
}

public void setDiciture(
List<DTODicituraInLingua> dicitureInLingua)
{
this.DicitureInLingua = dicitureInLingua;
}


} // Dicitura

public class DTODicituraInLingua
{
public DTODicituraInLingua()
{
super();
}   
 
protected long id;

public long getId()
{
return id;
}

public void setId(long value_property_dto)
{
id=value_property_dto;
}
   
 
protected long idEntity;

public long getIdEntity()
{
return idEntity;
}

public void setIdEntity(long value_property_dto)
{
idEntity=value_property_dto;
}
   
 
protected String testoDicitura;

public String getTestoDicitura()
{
return testoDicitura;
}

public void setTestoDicitura(String value_property_dto)
{
testoDicitura=value_property_dto;
}
   
 
protected int e_version;

public int getE_version()
{
return e_version;
}

public void setE_version(int value_property_dto)
{
e_version=value_property_dto;
}
 

So DTO are not complex at all. The size of the response of the webservice call is just 155k, and we timed the execution of the method server side using a LogicalHandler, and tracking start time inside LogicalHandler's handleMessage call, and end time inside LogicalHandler's close call.

Such time is just few milliseconds, while the entire call takes almost four seconds on the client to complete.

here you are the annotations on the webservice.

@WebService(name = "xxx" )
@SOAPBinding
(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
)
@HandlerChain(file="handler-chain.xml")
public class xxx extends WebServiceBase implements Ixx

any clue?

thank you in advance