axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 谭煌 <spring801...@hotmail.com>
Subject RE: about receive different types of attachment
Date Mon, 10 Nov 2008 02:34:39 GMT

hi,the stack trace is follow:
OMException in getSOAPBuilderorg.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException:
Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:110)
at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609) at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:178)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111) at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at org.apache
 .axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.chinacreator.test.SWAClient.transferFile(SWAClient.java:192) at com.chinacreator.test.SWAClient.main(SWAClient.java:89)Caused
by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]:
[1,0] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:153) ... 12 moreException
in thread "main" org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected
EOF in prolog at [row,col {unknown-source}]: [1,0] at org.apache.axis2.AxisFault.makeFault(AxisFau
 lt.java:417) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:89)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.chinacreator.test.SWAClient.transferFile(SWAClient.java:192)-
Remaining input stream :[] at com.chinacreator.test.SWAClient.main(SWAClient.java:89)Caused
by: org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
prolog at [row,col {unknown-source}]: [1,0] at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
at org.apache.axiom.soap.impl.builder.StAX
 SOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:110) at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:609)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:178)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111) at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:87) ... 6
moreCaused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]:
[1,0] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661) at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040) at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:153) ... 12 more
I have tested it.I thought if the problem happend in .net side?

Date: Thu, 6 Nov 2008 07:49:56 -0500From: csethil@gmail.comTo: axis-user@ws.apache.orgSubject:
Re: about receive different types of attachmentHi,Posting the whole stack trace might help
us to identify it... Also you can use a tcp sniffer like tcpmon (ws.apache.org/commons/tcpmon)
to capture ur messages.. In that way you can see whether ur .net service returns the error
or any other errornous response..AFAIKS wstxEOFException occurres in Axis2...thanks,Thilina
2008/11/3 th <spring801212@hotmail.com>


i changed the axis to 1.4, and the problem was sovled,but another problem occrus.that is ,use
axis 1.4 to send request soap message with a 10M attachment to a .net services ,there was
a exception,as follow:
WstxEOFException: Unexpected EOF in prolog error
i wonder if the problem is happen in .net services or in the axis 1.4 client



 

----- Original Message ----- 
From: th 
To: axis-user@ws.apache.org 
Sent: Monday, November 03, 2008 11:48 PM
Subject: about receive different types of attachment


hi,
 i'm using axis 1.3 to deploy a service to get request soap message with attachment using
mtom,but i found the service can only receive .txt file.if receive another type file,for example
test.rar which is 2M ,the attachment is in SOAP message,but when i get the attachment from
a element that contains the attachment,i can only get 1K data.i do not know why .hope some
help. thanks. the code that get attachment is follow:
        OMText binaryNode = (OMText) content.getFirstOMChild();        binaryNode.setOptimize(true);
        DataHandler actualDH = (DataHandler) binaryNode.getDataHandler();        FileOutputStream
textOutStream = new FileOutputStream("c:\\th.txt");        InputStream is = actualDH.getInputStream();
       textOutStream.write(IOUtils.getStreamAsByteArray(is));-- Thilina Gunarathne  - http://thilinag.blogspot.com
_________________________________________________________________
超炫人气榜给您所有偶像的最新资讯和排名,快来支持自己的偶像!
http://cnweb.search.live.com/xrank/results.aspx?q=%e5%91%a8%e6%9d%b0%e4%bc%a6&FORM=MSNH
Mime
View raw message