You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/05/16 10:37:32 UTC
DO NOT REPLY [Bug 19980] New: -
duplicate attachments with DEBUG mode.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19980>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19980
duplicate attachments with DEBUG mode.
Summary: duplicate attachments with DEBUG mode.
Product: Axis
Version: 1.1rc2
Platform: All
OS/Version: Linux
Status: NEW
Severity: Critical
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: toraneko@kun.ne.jp
Hi,
When I used axis with debug mode, I got duplicate attachment file. In the
first I modified properties file like this:
log4j.properties
-----
# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG, CONSOLE
... snip ...
------
and prepare test.txt file:
test.txt
----
test
----
Run attachment sample by following command:
$ java samples.attachments.EchoAttachment test.txt
Then, I confirmed duplicated attachment files in RequestMessage by tcpmon.
----------------------------------------------------------
POST /axis/servlet/AxisServlet HTTP/1.0
...
<soapenv:Envelope>
... snip ...
</soapenv:Envelope>
------=_Part_1_15206602.1053073193234
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <E01DBFF6415CD096AFF292BEFE2957B1>
test
------=_Part_1_15206602.1053073193234
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <8708DFEBE8A9D34D0B7528691868E6A0>
test
------=_Part_1_15206602.1053073193234--
----------------------------------------------------------
I'm not sure the cause but I could avoid this problem with following
modification.
--- Call.java.orig 2003-05-16 17:30:41.000000000 +0900
+++ Call.java 2003-05-16 17:31:10.000000000 +0900
@@ -2497,19 +2497,19 @@
msgContext.setTransportName( transportName );
// For debugging - print request message
- if (log.isDebugEnabled()) {
- StringWriter writer = new StringWriter();
- try {
- SerializationContext ctx = new SerializationContextImpl(writer,
- msgContext);
- reqEnv.output(ctx);
- writer.close();
- } catch (Exception e) {
- log.debug(Messages.getMessage("exceptionPrinting"), e);
- } finally {
- log.debug(writer.getBuffer().toString());
- }
- }
+// if (log.isDebugEnabled()) {
+// StringWriter writer = new StringWriter();
+// try {
+// SerializationContext ctx = new SerializationContextImpl
(writer,
+//
msgContext);
+// reqEnv.output(ctx);
+// writer.close();
+// } catch (Exception e) {
+// log.debug(Messages.getMessage("exceptionPrinting"), e);
+// } finally {
+// log.debug(writer.getBuffer().toString());
+// }
+// }
if(!invokeOneWay) {
invokeEngine(msgContext);
Please fix it.
regards,
Takashi Okamoto