cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alain Pannetier (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-5070) CDATA sections are not taken into account by wsdl2java but are by xjc
Date Sat, 08 Jun 2013 10:56:20 GMT

     [ https://issues.apache.org/jira/browse/CXF-5070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alain Pannetier updated CXF-5070:
---------------------------------

    Description: 
When generating javadoc comments in emitted java classes from xsd:documentation/xsd:annotation,
CDATA are systematically disregarded by wsdl2java.

Narrowed down to a simple test

1/ wsdl2java -d src stuff.wsdl
2/ xjc -wsdl -d src stuff.wsdl

Simple wsdl:

{code:xml}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http:/com.example/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    targetNamespace="http:/com.example/"
    jaxb:version="1.0"
    >
  <wsdl:types>
    <xsd:schema
    targetNamespace="http:/com.example/">

      <xsd:element name="doStuff">
         <xsd:complexType >
           <xsd:annotation>
              <xsd:documentation>
                 This does show up
                 <![CDATA[This doesn't]]>
              </xsd:documentation>
              <xsd:appinfo>
                  <jaxb:class name="DoStuff">
                      <jaxb:javadoc>This does show up
                          <![CDATA[This doesn't]]>
                      </jaxb:javadoc>
                  </jaxb:class>
              </xsd:appinfo>
           </xsd:annotation>
           <xsd:sequence/>
         </xsd:complexType>
      </xsd:element>

      <xsd:element name="doStuffResponse">
        <xsd:complexType>
            <xsd:sequence/>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>

  </wsdl:types>

  <wsdl:message name="doStuffRequest">
    <wsdl:part name="input" element="tns:doStuff"/>
  </wsdl:message>

  <wsdl:message name="doStuffResponse">
    <wsdl:part name="result" element="tns:doStuffResponse"/>
  </wsdl:message>


  <wsdl:portType name="stuffPortType">

    <wsdl:operation name="doStuff">
        <wsdl:input message="tns:doStuffRequest"/>
        <wsdl:output message="tns:doStuffResponse"/>
    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="stuffBinding" type="tns:stuffPortType">

    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="doStuff">
        <soap:operation soapAction="http:/com.example/doStuff" />
        <wsdl:input>
            <soap:body use="literal" />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="stuffService">
    <wsdl:port binding="tns:stuffBinding" name="stuffPort">
      <soap:address location="http://localhost:8080/stuff/stuffService"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>
{code} 


  was:
When generating javadoc comments in emitted java classes from xsd:documentation/xsd:annotation,
CDATA are systematically disregarded by wsdl2java.

Narrowed down to a simple test

1/ wsdl2java -d src stuff.wsdl
2/ xjc -wsdl -d src stuff.wsdl

Simple wsdl:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http:/com.example/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    targetNamespace="http:/com.example/"
    jaxb:version="1.0"
    >
  <wsdl:types>
    <xsd:schema
    targetNamespace="http:/com.example/">

      <xsd:element name="doStuff">
         <xsd:complexType >
           <xsd:annotation>
              <xsd:documentation>
                 This does show up
                 <![CDATA[This doesn't]]>
              </xsd:documentation>
              <xsd:appinfo>
                  <jaxb:class name="DoStuff">
                      <jaxb:javadoc>This does show up
                          <![CDATA[This doesn't]]>
                      </jaxb:javadoc>
                  </jaxb:class>
              </xsd:appinfo>
           </xsd:annotation>
           <xsd:sequence/>
         </xsd:complexType>
      </xsd:element>

      <xsd:element name="doStuffResponse">
        <xsd:complexType>
            <xsd:sequence/>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>

  </wsdl:types>

  <wsdl:message name="doStuffRequest">
    <wsdl:part name="input" element="tns:doStuff"/>
  </wsdl:message>

  <wsdl:message name="doStuffResponse">
    <wsdl:part name="result" element="tns:doStuffResponse"/>
  </wsdl:message>


  <wsdl:portType name="stuffPortType">

    <wsdl:operation name="doStuff">
        <wsdl:input message="tns:doStuffRequest"/>
        <wsdl:output message="tns:doStuffResponse"/>
    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="stuffBinding" type="tns:stuffPortType">

    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="doStuff">
        <soap:operation soapAction="http:/com.example/doStuff" />
        <wsdl:input>
            <soap:body use="literal" />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="stuffService">
    <wsdl:port binding="tns:stuffBinding" name="stuffPort">
      <soap:address location="http://localhost:8080/stuff/stuffService"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>



    
> CDATA sections are not taken into account by wsdl2java but are by xjc
> ---------------------------------------------------------------------
>
>                 Key: CXF-5070
>                 URL: https://issues.apache.org/jira/browse/CXF-5070
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.7.4
>         Environment: Java 1.7 (Sun JDK, Linux Mint 14)
>            Reporter: Alain Pannetier
>            Assignee: Daniel Kulp
>            Priority: Minor
>              Labels: newbie
>
> When generating javadoc comments in emitted java classes from xsd:documentation/xsd:annotation,
CDATA are systematically disregarded by wsdl2java.
> Narrowed down to a simple test
> 1/ wsdl2java -d src stuff.wsdl
> 2/ xjc -wsdl -d src stuff.wsdl
> Simple wsdl:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http:/com.example/"
>     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
>     targetNamespace="http:/com.example/"
>     jaxb:version="1.0"
>     >
>   <wsdl:types>
>     <xsd:schema
>     targetNamespace="http:/com.example/">
>       <xsd:element name="doStuff">
>          <xsd:complexType >
>            <xsd:annotation>
>               <xsd:documentation>
>                  This does show up
>                  <![CDATA[This doesn't]]>
>               </xsd:documentation>
>               <xsd:appinfo>
>                   <jaxb:class name="DoStuff">
>                       <jaxb:javadoc>This does show up
>                           <![CDATA[This doesn't]]>
>                       </jaxb:javadoc>
>                   </jaxb:class>
>               </xsd:appinfo>
>            </xsd:annotation>
>            <xsd:sequence/>
>          </xsd:complexType>
>       </xsd:element>
>       <xsd:element name="doStuffResponse">
>         <xsd:complexType>
>             <xsd:sequence/>
>         </xsd:complexType>
>       </xsd:element>
>     </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="doStuffRequest">
>     <wsdl:part name="input" element="tns:doStuff"/>
>   </wsdl:message>
>   <wsdl:message name="doStuffResponse">
>     <wsdl:part name="result" element="tns:doStuffResponse"/>
>   </wsdl:message>
>   <wsdl:portType name="stuffPortType">
>     <wsdl:operation name="doStuff">
>         <wsdl:input message="tns:doStuffRequest"/>
>         <wsdl:output message="tns:doStuffResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="stuffBinding" type="tns:stuffPortType">
>     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"
/>
>     <wsdl:operation name="doStuff">
>         <soap:operation soapAction="http:/com.example/doStuff" />
>         <wsdl:input>
>             <soap:body use="literal" />
>         </wsdl:input>
>         <wsdl:output>
>             <soap:body use="literal" />
>         </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="stuffService">
>     <wsdl:port binding="tns:stuffBinding" name="stuffPort">
>       <soap:address location="http://localhost:8080/stuff/stuffService"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message