WsGen and anonymous complexTypes with an xsd:choice not generating appropriately
--------------------------------------------------------------------------------
Key: XFIRE-819
URL: http://jira.codehaus.org/browse/XFIRE-819
Project: XFire
Issue Type: Bug
Components: Generator
Affects Versions: 1.2.3
Environment: Linux Fedora Core 6 on Intel based PC, Sun JDK 1.5.0_10,
Tomcat 5.5.20, Maven 2.0.4
Reporter: Eric Miles
Assigned To: Dan Diephouse
Attachments: WeatherService.wsdl
When I have an anonymous complexType defined on a Jaxb2 service elemnt with an
xsd:choice indicator, the WsGen task generates clients without parameters. For
example, if I take the WeatherService example provided in the distribution and
run WsGen on it, the resulting interface has the appropriate in parameters on
the web method. Below are the relevant code snippets:
xsd:
<xsd:element name="GetWeatherByZipCode">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="ZipCode"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
generated interface:
@WebMethod(operationName = "GetWeatherByZipCode", action = "")
@WebResult(name = "GetWeatherByZipCodeResult", targetNamespace =
"http://www.webservicex.net")
public WeatherForecastsType getWeatherByZipCode(
@WebParam(name = "ZipCode", targetNamespace =
"http://www.webservicex.net")
String ZipCode);
However, if I add an xsd:choice to the above XSD for the GetWeatherByZipCode
element and run WsGen, I get NO parameters for the resulting web method. See
below for relevant code snippets:
xsd:
<xsd:element name="GetWeatherByZipCode">
<xsd:complexType>
<xsd:choice>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="ZipCode"
type="xsd:string"/>
</xsd:sequence>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="TestZipCode"
type="xsd:string"/>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
</xsd:element>
generated interface:
@WebMethod(operationName = "GetWeatherByZipCode", action = "")
@WebResult(name = "GetWeatherByZipCodeResult", targetNamespace =
"http://www.webservicex.net")
public WeatherForecastsType getWeatherByZipCode();
Is this a bug with WsGen with an anonymous complexType?
--
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