XFire
  1. XFire
  2. XFIRE-715

generated wsdl schema does not include the definitions of all types

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Annotations
    • Labels:
      None
    • Number of attachments :
      0

      Description

      It appears that the wsdl generated from web service annotations do not include all the types it refernces internally, nor does it include an import statement to include these definitions via an external xml schema. This should be able to be reproduced by following these steps:

      Create an xml schema that includes something like:

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

      <xs:complexType name="doSomething">
      <xs:sequence>
      <xs:element name="doSomethingDetails" type="tns:doSomethingDetails" minOccurs="0"/>
      </xs:sequence>
      </xs:complexType>

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

      <xs:complexType name="doSomethingResponse">
      <xs:sequence>
      <xs:element name="doSomethingResponseDetails" type="tns:doSomethingResponseDetails" minOccurs="0"/>
      </xs:sequence>
      </xs:complexType>

      <xs:complexType name="doSomethingDetails">
      <xs:sequence>
      <xs:element name="goop" type="xs:string" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="draw" type="xs:string" />
      </xs:complexType>

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

      Define the service via (here IDoSomething is the exact interface without service annotations):

      @WebService(name = "IDoSomething", targetNamespace = "http://www.example.com/2006/dosomething")
      @SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL, parameterStyle = ParameterStyle.BARE)
      public interface IDoSomethingService extends IDoSomething

      { @WebMethod(operationName = "doSomething", action = "doSomething") @WebResult(name = "doSomethingResponse", targetNamespace = "http://www.example.com/2006/dosomething") public DoSomethingResponse start( @WebParam(name = "doSomething", targetNamespace = "http://www.example.com/2006/dosomething") DoSomething doSomething); }

      I use spring to create the factory and services. Not positive this matters, though it should not. Register the service, check the published wsdl:

      <wsdl:definitions targetNamespace="http://www.emergent.net/2006/servertools/processmanagement/model">

      <wsdl:types>

      <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://www.emergent.net/2006/servertools/processmanagement/model">
      <xsd:element name="doSomething" type="tns:doSomething"/>
      <xsd:element name="doSomethingResponse" type="tns:doSomethingResponse"/>
      </xsd:schema>
      ...(the rest)
      </wsdl:definitions>

      Note that there is not a definiton of tns:doSomething, tns:doSomethingDetails, or the types it is composed of so accurate bindings could never be generated from the wsdl alone.

      Thanks
      Thatcher

        Activity

        Hide
        Alan Baldwin added a comment -

        I am having the exact same issue. In my case, I am unable to create client bindings in .NET. I was hopeful with this when I saw that doc/literal/bare services could be created using annotations, but I am considering backing out annotations and going back to a WSDL-first approach.

        Like the poster, I also use Spring for the factories and services. My bindings are XmlBeans if that matters.

        Show
        Alan Baldwin added a comment - I am having the exact same issue. In my case, I am unable to create client bindings in .NET. I was hopeful with this when I saw that doc/literal/bare services could be created using annotations, but I am considering backing out annotations and going back to a WSDL-first approach. Like the poster, I also use Spring for the factories and services. My bindings are XmlBeans if that matters.
        Hide
        Karl Palsson added a comment -

        We're seeing this too, with 1.2.4

        We have the choice of aegis, in which case we get all the correct types, but in the wrong namespace, or jaxb, which gives us the correct namespaces, but missing types.

        Show
        Karl Palsson added a comment - We're seeing this too, with 1.2.4 We have the choice of aegis, in which case we get all the correct types, but in the wrong namespace, or jaxb, which gives us the correct namespaces, but missing types.

          People

          • Assignee:
            Dan Diephouse
            Reporter:
            chris thatcher
          • Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: