CXF v2.5.3
Spring v3.1.1.RELEASE

I've annotated a class with @WebService(name="..."), annotated methods with
@WebMethod(operationName="...", action="..."), and annotated method
parameters (one per method) with @WebParam(name="...").

The method parameters are classes generated by the maven-jaxb2-plugin from
an XSD and annotated as such.

The generated WSDL contains some types and elements from the XSD schema in
the wsdl:types section twice ("..." denotes the same namespace):

<wsdl:types>
  <xs:schema xmlns:tns="..." xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" targetNamespace="..." version="1.0">
    <xs:element name="a">
      <xs:complexType>
        <xs:sequence>
          <xs:element maxOccurs="unbounded" name="b" type="tns:b"/>
          <xs:element maxOccurs="unbounded" name="c" type="tns:c"/>
          <xs:element maxOccurs="unbounded" name="d" type="tns:d"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    ...
  </xs:schema>
  <xs:schema xmlns:ns1="..." xmlns:tns="..."
xmlns:xs="http://www.w3.org/2001/XMLSchema";
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="...">
    <xs:import namespace="..."/>
    <xs:element name="foo" type="tns:foo"/>
    ...
    <xs:complexType name="foo">
      <xs:sequence>
        <xs:element minOccurs="0" name="a">
          <xs:complexType>
            <xs:sequence>
              <xs:element form="qualified" maxOccurs="unbounded"
minOccurs="0" name="a">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element form="qualified" maxOccurs="unbounded"
name="a" type="ns1:a"/>
                    <xs:element form="qualified" maxOccurs="unbounded"
name="b" type="ns1:b"/>
                    <xs:element form="qualified" maxOccurs="unbounded"
name="c" type="ns1:c"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
    ...
 </xs:schema>
</wsdl:types>

I define my bean service following way:

<bean id="bar" class="com.foo.SoapService" scope="request">
  <aop:scoped-proxy/>
</bean>
<jaxws:endpoint id="barSoap" implementor="#bar"
implementorClass="com.foo.SoapService" address="/soap"/>

I expected the second schema (which defines the elements of the SOAP
operations) not to repeat the schema but reference the elements and types
from previous one. Is this a bug or am I expecting the wrong thing?

- chris

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Generated-wsdl-includes-XSD-schema-twice-tp5709876.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to