Please do raise a JIRA

Saminda

On 6/5/07, vinay singh <[EMAIL PROTECTED]> wrote:

Hi

>  I am sending an xml file ( not as attachment, it was generated using
> > XML beans)
> > through AXIS using TCP protocol( TCP is using for efficiency here)
> > and getting the error as below.
> > For some files I get the Connection reset by peer. I am not able to
> > understand.
> > Code :
> >
> >     private static String toEpr = "tcp:///abc1999:7777/";
> >
> >     public static void main(String[] args) throws AxisFault {
> >         String fileName = "C:/temp/TestDS1.xml";
> >         Options options = new Options();
> >
> >         options.setTo(new EndpointReference(toEpr));
> >
> >         options.setTransportInProtocol(Constants.TRANSPORT_TCP);
> >
> >         // options.setAction("urn:echo");
> >
> >         ServiceClient sender = new ServiceClient();
> >
> >         // sender.engageModule (Constants.MODULE_ADDRESSING);
> >
> >         sender.setOptions(options);
> >
> >         // OMElement result = sender.sendReceive(getPayload());
> >
> >         try {
> >
> >             FileReader soapFileReader = new FileReader(fileName);
> >
> >             XMLStreamReader parser =
> >
> >             XMLInputFactory.newInstance().createXMLStreamReader(
> >
> >             soapFileReader);
> >
> >             StAXOMBuilder builder =
> >
> >             new StAXOMBuilder(parser);
> >
> >             OMElement documentElement = builder.getDocumentElement();
> >
> >             // System.out.println(documentElement.toStringWithConsume
> > ());
> >
> >             System.out.println(" ** gng to Invoke ***");
> >
> >             XMLStreamWriter writer = XMLOutputFactory.newInstance()
> >
> >             .createXMLStreamWriter(System.out);
> >
> >             OMElement result = sender.sendReceive(documentElement);
> >
> >             System.out.println(" ** Invokation complete &&");
> >
> >             result.serialize(writer);
> >
> >             writer.flush();
> >
> >             // String response=result.getFirstElement().getText();
> >
> >             // System.out.println(" Result "+response);
> >
> >         } catch (FileNotFoundException e) {
> >             e.printStackTrace();
> >         } catch (XMLStreamException e) {
> >             e.printStackTrace ();
> >         } catch (FactoryConfigurationError e) {
> >             e.printStackTrace();
> >         }
> >     }
> >
> >
> > Error:*****
> >
> > Exception 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.transport.TransportUtils.createSOAPMessage(
> > *TransportUtils.java:81*)
> >
> > at org.apache.axis2.description.OutInAxisOperationClient.send(
> > *OutInAxisOperation.java:356*)
> >
> > at org.apache.axis2.description.OutInAxisOperationClient.execute(
> > *OutInAxisOperation.java:294*)
> >
> > at org.apache.axis2.client.ServiceClient.sendReceive(
> > *ServiceClient.java:520*)
> >
> > at org.apache.axis2.client.ServiceClient.sendReceive(
> > *ServiceClient.java:500*)
> >
> > at axis.AxisTcpClient.main(
> > *AxisTcpClient.java:52*)
> >
> > 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:211*)
> >
> > at
> > org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope
> > (
> > *StAXSOAPModelBuilder.java:163*)
> >
> > at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(
> > *StAXSOAPModelBuilder.java:111*)
> >
> > at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(
> > *BuilderUtil.java:474*)
> >
> > at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> > *TransportUtils.java:142*)
> >
> > at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> > *TransportUtils.java:77*)
> >
> > ... 5 more
> >
> > 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:125*)
> >
> > ... 10 more
> >
>
>



--
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org

Reply via email to