Here is the WSDL for a working service that I modified to return an array of
beans instead of just a single bean.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://service.test.axis.saic.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://service.test.axis.saic.com"
xmlns:intf="http://service.test.axis.saic.com"
xmlns:tns1="http://beans.service.test.axis.saic.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)-->
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="http://service.test.axis.saic.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://beans.service.test.axis.saic.com"/>
<element name="getPersonBeans">
<complexType/>
</element>
<element name="getPersonBeansResponse">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="getPersonBeansReturn"
type="tns1:PersonBean"/>
</sequence>
</complexType>
</element>
</schema>
<schema elementFormDefault="qualified"
targetNamespace="http://beans.service.test.axis.saic.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PersonBean">
<sequence>
<element name="FName" nillable="true" type="xsd:string"/>
<element name="LName" nillable="true" type="xsd:string"/>
<element name="born" nillable="true" type="xsd:string"/>
<element name="index" type="xsd:int"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getPersonBeansResponse">
<wsdl:part element="impl:getPersonBeansResponse"
name="parameters"/>
</wsdl:message>
<wsdl:message name="getPersonBeansRequest">
<wsdl:part element="impl:getPersonBeans" name="parameters"/>
</wsdl:message>
<wsdl:portType name="PersonArray">
<wsdl:operation name="getPersonBeans">
<wsdl:input message="impl:getPersonBeansRequest"
name="getPersonBeansRequest"/>
&nbs p; <wsdl:output message="impl:getPersonBeansResponse"
name="getPersonBeansResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PersonArraySoapBinding" type="impl:PersonArray">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getPersonBeans">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getPersonBeansRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getPersonBeansResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PersonArrayService">
<wsdl:port binding="impl:PersonArraySoapBinding" name="PersonArray">
<wsdlsoap:address
location="http://localhost:8080/axis/services/PersonArray"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Jim
<wsdl:definitions targetNamespace="http://service.test.axis.saic.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://service.test.axis.saic.com"
xmlns:intf="http://service.test.axis.saic.com"
xmlns:tns1="http://beans.service.test.axis.saic.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)-->
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="http://service.test.axis.saic.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://beans.service.test.axis.saic.com"/>
<element name="getPersonBeans">
<complexType/>
</element>
<element name="getPersonBeansResponse">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="getPersonBeansReturn"
type="tns1:PersonBean"/>
</sequence>
</complexType>
</element>
</schema>
<schema elementFormDefault="qualified"
targetNamespace="http://beans.service.test.axis.saic.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="PersonBean">
<sequence>
<element name="FName" nillable="true" type="xsd:string"/>
<element name="LName" nillable="true" type="xsd:string"/>
<element name="born" nillable="true" type="xsd:string"/>
<element name="index" type="xsd:int"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getPersonBeansResponse">
<wsdl:part element="impl:getPersonBeansResponse"
name="parameters"/>
</wsdl:message>
<wsdl:message name="getPersonBeansRequest">
<wsdl:part element="impl:getPersonBeans" name="parameters"/>
</wsdl:message>
<wsdl:portType name="PersonArray">
<wsdl:operation name="getPersonBeans">
<wsdl:input message="impl:getPersonBeansRequest"
name="getPersonBeansRequest"/>
&nbs p; <wsdl:output message="impl:getPersonBeansResponse"
name="getPersonBeansResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PersonArraySoapBinding" type="impl:PersonArray">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getPersonBeans">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getPersonBeansRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getPersonBeansResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PersonArrayService">
<wsdl:port binding="impl:PersonArraySoapBinding" name="PersonArray">
<wsdlsoap:address
location="http://localhost:8080/axis/services/PersonArray"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Jim
Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
Define the schema the way you'd like it to be in your WSDL and generate your bean from it.
Anne
On 1/26/06, Vinicius Carvalho <[EMAIL PROTECTED]> wrote:Hello there! I have this following Bean:
public class User{
private List<Car> cars;
...
}
Axis is generating a WSDL that contains an array of any type instead of Car and defining a qName for Car. How can I change this?
Regards