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 2002/10/05 00:35:25 UTC

DO NOT REPLY [Bug 13319] New: - simple fix to make WSDD generation i18n comliant

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

simple fix to make WSDD generation i18n comliant

           Summary: simple fix to make WSDD generation i18n comliant
           Product: Axis
           Version: current (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: wchen@vitria.com


If the WSDL's service name is any double-bytes string, the WSDL2Java generates 
invalid WSDD.

Since the generated WSDD doesn't have prolog, it is assumed using UTF-8. 
However, the WSDD itself actually uses local encoding.

The fix is to simply overwrite getPrintWriter in both JavaDeployWriter and 
JavaUndeployWriter as the following:

    protected PrintWriter getPrintWriter(String filename) throws IOException {
        File file = new File(filename);
        File parent = new File(file.getParent());
        parent.mkdirs();
        FileOutputStream out = new FileOutputStream(file);
        OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8");
        return new PrintWriter(writer);
    }