axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Jamason <pjama...@gpsmail.ucsd.edu>
Subject attachment problem: no carriage return before content-type
Date Fri, 19 Aug 2005 20:21:12 GMT
Hi,

I'm running the attachments sample found in the Axis 1.2 
samples/attachments directory.  I'm able to successfully execute the 
client on the host that the service resides on.  However, when I 
run the client on another host (all axis and supplemental jars 
are in the classpath, including activation.jar and mail.jar), the 
following error is shown in the apache catalina.out log:

In echo
Received "javax.activation.DataHandler".
In echo
Received "javax.activation.DataHandler".
- InvocationTargetException:
java.lang.reflect.InvocationTargetException
         at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at 
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at org.apache.axis.Message.setup(Message.java:341)
         at org.apache.axis.Message.<init>(Message.java:232)
         at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:628)
         at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
         at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) 
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
Caused by: Error reading data stream:  Error in MIME data stream, 
start boundary not found, expected: 
------=_Part_0_23886295.1124479565789

         at 
org.apache.axis.attachments.MultiPartRelatedInputStream.<init>(MultiPartRelatedInputStream.java:339)
         at 
org.apache.axis.attachments.AttachmentsImpl.<init>(AttachmentsImpl.java:111)
         ... 36 more



>From tcpmon, I see the problem: there's no carriage return before 
"Content-type" in the soap header:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><echo
xmlns=""><source href="cid:6AADE35DF8C361C9F4726A3017B7CFA1" 
xmlns=""/></echo></soapenv:Body></soapenv:Envelope>------=_Part_0_21479899.1124481915585Content-Type:
text/plain


Executing the client on the service host results in a carriage 
return before "Content-type", and thus no error.

This problem is discussed on sourceforge in a perl SOAP::Mime context:

http://sourceforge.net/tracker/index.php?func=detail&aid=685570&group_id=71173&atid=530394

I can post the source code if necessary.  Is there anything I can 
add to the client to force a carriage return above, assuming this is 
not a classpath/jar issue?

Thanks,
Paul


-----------------------------------------------------------------
Paul Jamason
Programmer/Analyst
Scripps Orbit and Permanent Array Center  (http://sopac.ucsd.edu)
California Spatial Reference Center        (http://csrc.ucsd.edu)

Institute of Geophysics and Planetary Physics
Scripps Institution of Oceanography
University of California, San Diego            work: 858-822-4472
9500 Gilman Dr.                                cell: 619-961-7260
La Jolla, CA 92093-0225                         fax: 858-534-9873
-----------------------------------------------------------------


Mime
View raw message