My apologies - I should have specified, we are not yet on Axis2 (cannot upgrade for the foreseeable time). We are currently on Axis WS 1.4.
In this example IS generated: GeoCoordsFromModelRunIDRequestType NOT generated: GeoCoordsFromModelRunIDResponseType If I add a 2nd element to the Response operation, then the above response type is generated without issues. Notice the above request type contains only a single element and is generated without issues. If this is, perhaps, just an unfixed bug in WS1.4 - then it sounds like I'll just need to add a 2nd element and simply not use it for the time being. Thank you in advance, Devin From: Jorge Medina [mailto:[email protected]] Sent: Thursday, May 20, 2010 11:29 AM To: [email protected] Subject: Re: WSDL2Java Problem: Cannot generate single element complex type Post the relevant segment of your WSDL and the parameters used to call wsdl2java. I use Axis2 to generate a lot of complex types with a single element without problems On Thu, May 20, 2010 at 2:05 PM, McBride, Devin (TS) < [email protected]> wrote: I have a complex class that, for the time, only holds a single element. While WSDL2Java runs successfully (without errors) no stub is created for this complex type. Further, a call to this operation returns a type of the element being held by the complex type, rather than the complex type itself. While troubleshooting, I was able to 'fix' this by adding any second element. Running WSDL2Java then creates the class for the complex type. Obviously since is not the fix I want, I'm wondering if there is a way around this - specifically: I want a complex type to be created that holds a single element. The odd thing about this is I was able to generate a complex Request Type with a single element just fine - the Response Type is the only one having an issue. By design? Please advise. Thank you, Devin
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WeatherRequestService" targetNamespace="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/"> <wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/"> <xsd:complexType name="WRException"> <xsd:sequence> <xsd:element name="code" type="xsd:int"></xsd:element> <xsd:element name="description" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="GeoCoordsFromModelRunIDRequestType"> <xsd:sequence> <xsd:element name="ModelRunID" type="xsd:int"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="GeoCoordsFromModelRunIDResponseType"> <xsd:sequence> <xsd:element name="CartToGeoArr" type="tns:DataItem2DCartToGeoMap" maxOccurs="unbounded" minOccurs="1"> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DataItem2DCartToGeoMap"> <xsd:sequence> <xsd:element name="xy" type="xsd:string"></xsd:element> <xsd:element name="latlon" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema></wsdl:types> <wsdl:message name="getGeoCoordsFromModelRunIDRequest"> <wsdl:part name="getGeoCoordsFromModelRunIDRequest" type="tns:GeoCoordsFromModelRunIDRequestType"></wsdl:part> </wsdl:message> <wsdl:message name="getGeoCoordsFromModelRunIDResponse"> <wsdl:part name="getGeoCoordsFromModelRunIDResponse" type="tns:GeoCoordsFromModelRunIDResponseType"></wsdl:part> </wsdl:message> <wsdl:message name="getGeoCoordsFromModelRunIDFault"> <wsdl:part name="getGeoCoordsFromModelRunIDFault" type="tns:WRException"></wsdl:part> </wsdl:message> <wsdl:portType name="WeatherRequestService"> <wsdl:operation name="getGeoCoordsFromModelRunID"> <wsdl:input message="tns:getGeoCoordsFromModelRunIDRequest"></wsdl:input> <wsdl:output message="tns:getGeoCoordsFromModelRunIDResponse"></wsdl:output> <wsdl:fault name="fault" message="tns:getGeoCoordsFromModelRunIDFault"></wsdl:fault> </wsdl:operation> </wsdl:portType> <wsdl:binding name="WeatherRequestServiceSOAPBinding" type="tns:WeatherRequestService"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getGeoCoordsFromModelRunID"> <soap:operation soapAction="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/getGeoCoordsFromModelRunID"/> <wsdl:input> <soap:body use="literal" namespace="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/" parts=" getGeoCoordsFromModelRunIDRequest"/> </wsdl:input> <wsdl:output> <soap:body use="literal" namespace="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService/" parts=" getGeoCoordsFromModelRunIDResponse"/> </wsdl:output> <wsdl:fault name="fault"> <soap:fault use="literal" name="fault" parts=" getGeoCoordsFromModelRunIDFault" /> </wsdl:fault> </wsdl:operation> </wsdl:binding> <wsdl:service name="WeatherRequestService"> <wsdl:port binding="tns:WeatherRequestServiceSOAPBinding" name="WeatherRequestService"> <soap:address location="http://<URL REMOVED FOR FORUM POST>/WeatherRequestService"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
