generated wsdl schema does not include the definitions of all types
-------------------------------------------------------------------

                 Key: XFIRE-715
                 URL: http://jira.codehaus.org/browse/XFIRE-715
             Project: XFire
          Issue Type: Bug
          Components: Annotations
    Affects Versions: 1.2.2
            Reporter: chris thatcher
         Assigned To: Dan Diephouse
            Priority: Critical


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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to