axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12452] New: - Axis fails to http-encode & (ampersands)
Date Mon, 09 Sep 2002 18:33:37 GMT
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=12452>.
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=12452

Axis fails to http-encode & (ampersands)

           Summary: Axis fails to http-encode & (ampersands)
           Product: Axis
           Version: current (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: hhuang@kodak.com


If I have the following Java code, where http is a String:

UrlType url = new urlType();
url.name = "http://mysite.com?a=1&b=2";

Axis should serialize as:

<url>
  <name>http://mysite.com?a=1&amp;b=2</name>
</url>

Where an ampersand (&) is serialized as:  &amp;

Axis currently does not do this. The &amp; must be explicitly written in code, 
like:

url.name = "http://mysite.com/a=1&amp;b=2";

Apache SOAP 2.2 automatically HTML-encodes strings. Apache also automatically 
HTML-decodes &amp;'s to &'s.

I did not test whether Axis HTML-decodes. Axis should HTML-encode and decode 
automatically. Otherwise, every string must be encoded and decoded in the Java 
code.

-Han Huang
hhuang@kodak.com

Mime
View raw message