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/08/22 13:05:07 UTC

DO NOT REPLY [Bug 11928] New: - WSDL2Java incorrectly processes '&' in Service URL

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

WSDL2Java incorrectly processes '&' in Service URL

           Summary: WSDL2Java incorrectly processes '&' in Service URL
           Product: Axis
           Version: beta-3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: Christian.Mittermaier@fabasoft.com


If the service location URL in the WSDL file contains an '&' character, it has 
to be quoted to '&amp;' in order to be valid XML. When WSDL2Java creates the 
*Locator class, the string
  private final java.lang.String *_address
contains the character sequence '&amp;' where '&' is expected.

Example:
Look at the following <service> element of a WSDL:

  <service name="FSCGOVXML_SOAPSearch">
    <port name="FSCSoapSoapPort" binding="wsdlns:FSCSoapSoapBinding">
      <soap:address location="http://localhost/fsc/fscdav/wsdl?
ACTION=COO.1.1001.1.58817&style=doc"/>
    </port>
  </service>

In order to make this valid XML, one has to quote the '&' in the location URL 
to '&amp;'. Actually, the <soap:address> element looks like the following 
(e.g. when saved to a file):
  <soap:adress location=http://localhost/fsc/fscdav/wsdl?
ACTIONS=COO.1.1001.1.58817&amp;style=doc"/>

In the FSCGOVXML_SOAPSearchLocator class generated by WSDL2Java, the string 
  private final java.lang.String FSCSoapSoapPort_address
is not aware of the quoted '&', i.e. it is generated as
  "http://localhost/fsc/fscdav/wsdl?ACTIONS=COO.1.1001.1.58827&amp;style=doc"
instead of 
  "http://localhost/fsc/fscdav/wsdl?ACTIONS=COO.1.1001.1.58827&style=doc"
which would be correct.