Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8169981

wsgen -wsdl can't generate WebMethod in schema for the parent class of a WebService class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: xml

      Description

      Run wsgen t.Foo2 -wsdl against the following java files:
      Foo1.java:
      package t;
      import javax.jws.WebService;
      import javax.jws.WebMethod;

      public class Foo1 {
          @WebMethod
          public String method1(String str) {
              return str;
          }
      }

      Foo2.java:
      package t;
      import javax.jws.WebService;
      import javax.jws.WebMethod;

      @WebService
      public class Foo2 extends Foo1{
          @WebMethod
          public String method3(String str) {
              return str;
          }
      }

      generate Foo2Service_schema1.xsd
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <xs:schema version="1.0" targetNamespace="http://t/" xmlns:tns="http://t/" xmlns:xs="http://www.w3.org/2001/XMLSchema">

        <xs:element name="method3" type="tns:method3"/>

        <xs:element name="method3Response" type="tns:method3Response"/>

        <xs:complexType name="method3">
          <xs:sequence>
            <xs:element name="arg0" type="xs:string" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>

        <xs:complexType name="method3Response">
          <xs:sequence>
            <xs:element name="return" type="xs:string" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:schema>

      and a Foo2Service_schema2.xsd
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

        <xs:element name="arg0" nillable="true" type="xs:string"/>

        <xs:element name="return" nillable="true" type="xs:string"/>
      </xs:schema>


      method1 is lost in the schema.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aefimov Aleksej Efimov
              Reporter:
              fyuan Frank Yuan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: