Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3069

XmlElement(required=true) on @WebParam not honored in WSDL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.2.12, 2.3.1, 2.4
    • None
    • None

    Description

      My service looks like this:
      @WebService
      public interface ServiceTest
      {
      @WebMethod(operationName="testService")
      public void testService(
      @WebParam(name="foo")
      @XmlElement(required=true)
      String foo,

      @WebParam(name="bar")
      int bar
      );
      }

      But the WSDL fragment for the testService method request looks like:

      <xs:complexType name="testService">
      <xs:sequence>
      <xs:element minOccurs="0" name="foo" type="xs:string"/>
      <xs:element name="bar" type="xs:int"/>
      </xs:sequence>
      </xs:complexType>

      I did the endorsed dirs thing and think CXF is seeing the JAX-WS 2.2 jars. To test did the following:

      • Checked the value of org.apache.cxf.jaxws.spi.ProviderImpl.isJaxWs22(), it returns true
      • Checked the class of my endpoint, it is org.apache.cxf.jaxws22.spring.JAXWS22SpringEndpointImpl

      (I am not sure if this is a sufficient test.)

      Attachments

        1. cxf3069.tar
          18 kB
          Eric Pederson

        Activity

          People

            dkulp Daniel Kulp
            ericacm Eric Pederson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: