• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Web service to get document / image content taking too long

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey All,

I have implemented a service which retrieves the contents of tiff file (having multiple pages / images in it) from FileNet IS. The function which retrieves this content has good response time, takes only 1 sec or less. However, while I am adding that content (List<Byte>) as webservice response, it is taking very long. The web service total response time equals around 5 - 6 sec.

The response looks something like -



Now as it turns out, I am definitely doing something not so good design-wise as it is taking that long, so I wanted to know how can I pass this content back to client in efficient way with quick response time.

I am getting back Byte[] ('Byte' array) from the function fetching document content. I want to populate this content as web service response, however it is not possible (?) to pass array as web service response, so I am converting to List and then passing it, as given above.

Please suggest any alternate way / good design approach to pass this content to client.

Regards,
Jaideep
 
Jai Kshir
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not get any responses on my query so trying to simplify it -

How to pass large binary data as webservice response?
How to implement HTTP compression in weblogic to pass large binary data quickly?
 
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!
First of all, give people some time to find, and perhaps even answer, your question. Do not expect that an answer will appear quickly, in fact, the best thing is not to count on an answer.

Sending binary data in a SOAP message is a bad idea. Instead, you want to take a look at SAAJ - SOAP with Attachments API for Java.
Additionally, I would also suggest using MTOM for larger binary attachments.
Best wishes!
 
Jai Kshir
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I resolved the performace issue by using 'base64Binary' as return type of my service instead of 'byte', it takes 1.5 secs from previous 8 sec.
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic