• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

SOAPConnection.call() method consumes more CPU

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SoapConnection.call() method consumes more cpu, can anybody help me to optimize the code and reduce the CPU usage for this blocking call?

Please refer the following code

private static SOAPConnectionFactory soapFactory = null;
soapFactory = SOAPConnectionFactory.newInstance();
SOAPMessage responseMessage = null;
SOAPConnection con = soapFactory.createConnection();
responseMessage = con.call(message, endpoint);

Thanks in advance,
Ravi
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi am having a similar issue in web application

where i am making soap call to Sap for retriving data .......
soap call takes lots of CPU memory ...hw can i optimize the process
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
The first approach I would consider is to use generated artifacts, instead of using SAAJ to call the web service.
If this is not possible, then I would investigate exactly where the program consumes most CPU. I fear that it will be somewhere in the SAAJ implementation, which I assume that you do not want to hack.
Another approach would be to replace the SAAJ client with a general HTTP client, such as the Jetty or Apache HTTPClient. The Jetty client supports issuing of asynchronous requests with a callback mechanism for notifying the caller about received responses etc. This approach will probably require some coding effort.
Best wishes!
 
Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic