Ann, Your solution solved my second issue. Seems like my first issue is not a problem, my service is working without them.
thanks, Karl -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 04, 2005 11:17 AM To: axis-user@ws.apache.org Subject: Re: Wrapped service wsdl does not generate wrapper classes Karl, When using "wrapped" your response wrapper element should provide a container for your return element. So what you want to do is define types:Catalog as a child of your two response elements. e.g.: <wsdl:message name="getCatalogAllResponse"> <wsdl:part name="result" element="types:getCatalogAllReturn"/> </wsdl:message> <xsd:element name="getCatalogAllReturn"> <xsd:complexType> <xsd:sequence> <element ref="types:Catalog"/> </xsd:sequence> </xsd:complexType> </xsd:element> Regards, Anne On 5/4/05, Schwarz, Karl <[EMAIL PROTECTED]> wrote: > Hi, > > I am having trouble with a wrapped service definition. I've included the > wsdl below. > > There are two issues I need some assistance with: > > 1. The wrapper classes are not being generated. If I define the return > type for both response messages(getCatalogAllResponse and > getCatalogTypeResponse) as "types:Catalog" the wrapper classes are not > generated. If I change the return type for the getCatalogTypeResponse to > "types:status", the wrapper classes GetCatalogAll and GetCatalogType are > generated. My requirement is to return the Catalog type so I am stuck on this > problem. > > 2. I also noticed that the return type "Catalog" is not used for the > return type for the getCatalogAll method in the BindindImpl class generated > for this service. The constituent parts of the "Catalog" type, namely > count(long) and catalog(ArrayofCatalog) are returned via holder classes. If I > abandon the use of the wrapper types and directly define the type for the > input request messages as "types:CatalogReq" and the return types for the > response messages as "types:Catalog", then the methods in the BindingImpl > class are defined to return the Catalog type and no holder classes are used. > > Any insights to my problems would be welcomed. > > regards > Karl Schwarz > > Here is the wsdl(this version generates the wrapper classes): > > <wsdl:definitions name="CatalogService" > targetNamespace="http://examples.com/CatalogService" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:types="http://examples.com/CatalogService/types" > xmlns:tns="http://examples.com/CatalogService"> > <wsdl:types> > > <xsd:schema targetNamespace="http://examples.com/CatalogService/types" > xmlns:types="http://examples.com/CatalogService/types"> > > <xsd:element name="getCatalogAll"> > <xsd:complexType> > <xsd:sequence> > <xsd:element ref="types:CatalogReq"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <xsd:element name="getCatalogType"> > <xsd:complexType> > <xsd:sequence> > <xsd:element ref="types:CatalogReq"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <xsd:element name="CatalogReq"> > <xsd:complexType > > <xsd:sequence> > <xsd:element name="catalog_id" nillable="true" > type="xsd:string"/> > <xsd:element name="product_type_id" type="xsd:long"/> > <xsd:element name="product_id" nillable="true" > type="xsd:string"/> > <xsd:element name="name" nillable="true" type="xsd:string"/> > <xsd:element name="create_time" nillable="true" > type="xsd:string"/> > <xsd:element name="update_time" nillable="true" > type="xsd:string"/> > <xsd:element name="count" type="xsd:long"/> > <xsd:element name="countOnly" type="xsd:boolean"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <xsd:complexType name="CatalogInfo"> > <xsd:sequence> > <xsd:element name="catalog_id" nillable="true" > type="xsd:string"/> > <xsd:element name="product_type_id" type="xsd:long"/> > <xsd:element name="product_id" nillable="true" > type="xsd:string"/> > <xsd:element name="name" nillable="true" type="xsd:string"/> > </xsd:sequence> > </xsd:complexType> > > <xsd:complexType name="ArrayOfCatalog"> > <xsd:sequence> > <xsd:element minOccurs ="0" maxOccurs="unbounded" name="entry" > type="types:CatalogInfo"/> > </xsd:sequence> > </xsd:complexType> > > <xsd:element name="Catalog"> > <xsd:complexType > > <xsd:sequence> > <xsd:element name="count" type="xsd:long" maxOccurs = "1"/> > <xsd:element name="catalog" type="types:ArrayOfCatalog"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <xsd:element name="status" type="xsd:string" /> > > </xsd:schema> > </wsdl:types> > > <wsdl:message name="getCatalogAllRequest"> > <wsdl:part name="body" element="types:getCatalogAll"/> > </wsdl:message> > <wsdl:message name="getCatalogAllResponse"> > <wsdl:part name="result" element="types:Catalog"/> > </wsdl:message> > > <wsdl:message name="getCatalogTypeRequest"> > <wsdl:part name="body" element="types:getCatalogType"/> > </wsdl:message> > <wsdl:message name="getCatalogTypeResponse"> > <wsdl:part name="result" element="types:status"/> > </wsdl:message> > > <wsdl:portType name="CatalogServicePortType"> > <wsdl:operation name="getCatalogAll"> > <wsdl:input message="tns:getCatalogAllRequest"/> > <wsdl:output message="tns:getCatalogAllResponse"/> > </wsdl:operation> > <wsdl:operation name="getCatalogType"> > <wsdl:input message="tns:getCatalogTypeRequest"/> > <wsdl:output message="tns:getCatalogTypeResponse"/> > </wsdl:operation> > > </wsdl:portType> > > <wsdl:binding name="CatalogServiceBinding" type="tns:CatalogServicePortType"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getCatalogAll"> > <soap:operation soapAction="getCatalogAll"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getCatalogType"> > <soap:operation soapAction="getCatalogType"/> > <wsdl:input> > <soap:body use="literal"/> > </wsdl:input> > <wsdl:output> > <soap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > > <wsdl:service name="CatalogService"> > <wsdl:port name="CatalogService" binding="tns:CatalogServiceBinding"> > <soap:address > location="http://localhost:8080/axis/services/CatalogService"/> > </wsdl:port> > </wsdl:service> > > </wsdl:definitions> > >