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

When use mtom to transfer one file, server log shows the file is accessed twice.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, all:
I found out that when I use jax-ws mtom to transfer file, the server log shows that the file is accessed twice - I tested the sample in both glassfish and jboss server.

The test code is like this:

Web service code:


Web service client code:

When I try to get one small file, about 2 kb, the following line would be recorded in localhost_access_log:
127.0.0.1 - - [03/Nov/2011:15:04:49 +0800] "GET /file HTTP/1.1" 200 1748
127.0.0.1 - - [03/Nov/2011:15:04:49 +0800] "GET /file HTTP/1.1" 200 1748
===> accessed twice.
10.32.98.213 - - [03/Nov/2011:15:04:49 +0800] "POST /example-ws/GetContentService HTTP/1.1" 200 25700

When I try to get one big file - 3074 k, the following line would be recorded in localhost_access_log:
127.0.0.1 - - [03/Nov/2011:15:10:38 +0800] "GET /file HTTP/1.1" 200 3147690
10.32.98.213 - - [03/Nov/2011:15:10:38 +0800] "POST /example-ws/GetContentService HTTP/1.1" 200 3148515
127.0.0.1 - - [03/Nov/2011:15:10:42 +0800] "GET /file HTTP/1.1" 200 40960
=====> accessed twisce, but the size of the get request is much smaller.

This should be related how mtom and datahandler is implemented in jax-ws.
I am wondering why the file is accessed twice, and is this expected behavior or not?
reply
    Bookmark Topic Watch Topic
  • New Topic