jax-ws
  1. jax-ws
  2. JAX_WS-1096

Incorrect Schemas generated if two services contains an operation with the same name but different return type

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.7
    • Fix Version/s: None
    • Component/s: runtime
    • Labels:
      None

      Description

      -create two entities (or simple DTO for them), ie Customer and Order
      -create a web service for each entity with findAll() operation returning collection of given DTO (2 services, CustomerWS and OrderWS)
      -deploy a project with these entities and services to GF 3.1.2.2 (or newer)
      -check generated WSDLs and schemas

      Expected:
      one schema defines:

      <xs:complexType name="findAllResponse">
      <xs:sequence>
      <xs:element name="return" type="tns:order" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      </xs:complexType>
      

      the other defines:

      <xs:complexType name="findAllResponse">
      <xs:sequence>
      <xs:element name="return" type="tns:customer" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      </xs:complexType>
      

      Actual:
      both schemas defines same findAllResponse element therefore on the client side one can get correct response only from one of the services

      Workaround:
      I haven't found combination of JAXB annotations to be put on DTOs which would make sure that schemas are generated correctly, so the only workaround seems to be to download wsdl/xsds, edit them and use them in @WebService.wsdlLocation

        Activity

        Hide
        Lukas Jungmann added a comment - - edited

        few notes:
        -this is reproducible also in GF 2.1.1
        -using @WebMethod(operationName = "findAllOrders") and @WebMethod(operationName = "findAllCustomers") for service operations makes this issue more visible and shows that correct elements in schema can be generated but they're incorrectly bound to matching web service operations (-this changes the right and wrong schemas)
        -if wsgen is used on the command line, WSDLs and schemas seem to be generated correctly (but this might be related to the fact that one can pass only one SEI to ws gen)

        Show
        Lukas Jungmann added a comment - - edited few notes: -this is reproducible also in GF 2.1.1 -using @WebMethod(operationName = "findAllOrders") and @WebMethod(operationName = "findAllCustomers") for service operations makes this issue more visible and shows that correct elements in schema can be generated but they're incorrectly bound to matching web service operations (-this changes the right and wrong schemas) -if wsgen is used on the command line, WSDLs and schemas seem to be generated correctly (but this might be related to the fact that one can pass only one SEI to ws gen)

          People

          • Assignee:
            miroslav.kos
            Reporter:
            Lukas Jungmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: