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=18711>.
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=18711

Documents returned by Axis being truncated

           Summary: Documents returned by Axis being truncated
           Product: Axis
           Version: 1.0
          Platform: PC
        OS/Version: MacOS 9
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I am trying to return a document via Axis Web Service and it is being truncated.

We have isolated the problem to the server side: Here is the code.

package xxxxxx.xxxxx;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.apache.axis.message.SOAPBodyElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class XXXXXX {

    /**
     * 
     */ 
    
    public Element[] doXXXXX(Element[] elem) throws Exception {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = factory.newDocumentBuilder();
                
                System.err.println("parsing file");
                Document document = builder.parse( "c:/temp/testHydro.xml" );
                System.err.println("parsing complete");
                Element elDoc = document.getDocumentElement();
        Element[] elarray = new Element[1];
        elarray[0]=elDoc;
        return elarray;
    }

}

The code doesn't do anything with the incoming element. It simply returns a 
file from c:/temp

Troubleshooting:
The first file I tried to return:
orig file size: 1164 kb
received file size: 1152 kb

second test file:
orig file: 2328 kb
received file: 2315

third test:
orig file: 582 kb
received file: 568 kb

Here is the deploy.wsdd in case you need it:

<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"; 
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
            xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";>
  <!-- note that either style="message" OR provider="java:MSG" both work -->
  <service name="XXXXXXXX" style="message">
    <parameter name="className" value="XXXXXX.XXXXX.XXXXX" />
    <parameter name="allowedMethods" value="doXXXXXXXXX" />
  </service>
</deployment>

Reply via email to