Martin, I am not exactly sure what you are asking, and whether this is a general WSDL question, or a question pertaining to the implementation of polymorphism.
You use the term "entity". Are you talking about attributes of the element WSDL tag? We typically see the attributes minoccurs and maxoccurs also included in the element tag. I have included the WSDL to my test service which I have used to demonstrate polymorphism. The service has one webmethod: BaseRetObject MorphThis(BaseParmObject inPoly); I have conducted experiments which have a client create a SubParmObject (extends BaseParmObject) and pass it in to the MorphThis method. The service takes the data and stuffs it in a SubRetObject (extends BaseRetObject) before returning it to the client. Thanks, Dave =====wsdl below======== <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/"> <s:element name="MorphThis"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="inPoly" type="tns:BaseParmObject" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="BaseParmObject"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="baseParmStr" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="baseParmInt" type="s:int" /> </s:sequence> </s:complexType> <s:element name="MorphThisResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="MorphThisResult" type="tns:BaseRetObject" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="BaseRetObject"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="baseRetInt" type="s:int" /> </s:sequence> </s:complexType> <s:complexType name="SubParmObject"> <s:complexContent mixed="false"> <s:extension base="tns:BaseParmObject"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="subParmStr" type="s:string" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="SubRetObject"> <s:complexContent mixed="false"> <s:extension base="tns:BaseRetObject"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="subRetStr" type="s:string" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="SubParm2Object"> <s:complexContent mixed="false"> <s:extension base="tns:BaseParmObject"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="subParmInt" type="s:int" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="SubRet2Object"> <s:complexContent mixed="false"> <s:extension base="tns:BaseRetObject"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="subRetInt" type="s:int" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> </s:schema> </wsdl:types> <wsdl:message name="MorphThisSoapIn"> <wsdl:part name="parameters" element="tns:MorphThis" /> </wsdl:message> <wsdl:message name="MorphThisSoapOut"> <wsdl:part name="parameters" element="tns:MorphThisResponse" /> </wsdl:message> <wsdl:portType name="PolyServiceSoap"> <wsdl:operation name="MorphThis"> <wsdl:input message="tns:MorphThisSoapIn" /> <wsdl:output message="tns:MorphThisSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="PolyServiceSoap" type="tns:PolyServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="MorphThis"> <soap:operation soapAction="http://tempuri.org/MorphThis" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="PolyService"> <wsdl:port name="PolyServiceSoap" binding="tns:PolyServiceSoap"> <soap:address location="http://localhost:8080/PolyTest/services/PolyService" /> </wsdl:port> </wsdl:service> </wsdl:definitions> ======end wsdl========= -----Original Message----- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 7:09 PM To: Kraus, David Cc: [email protected] Subject: Re: Re: Confused... Good Evening Dave looking quickly at the WSDL A defined service has 1+ Binding/Port combination for each location e.g. <wsdl:service name="StockQuoteService"> <wsdl:port name="StockQuoteServiceSOAP11port" binding="axis2:StockQuoteServiceSOAP11Binding"> <soap:address location="http://localhost:8080/axis2/services/StockQuoteService" /> </wsdl:port> so looking at the example of binding of StockService which has binding="axis2:StockQuoteServiceSOAP11Binding" (as we have been shown binding StockQuoteServiceSOAP11Binding has 1 PortType called 'StockQuoteServiceSOAP11port') PortType has input and output messages <wsdl:portType name="StockQuoteServicePortType"> <wsdl:operation name="getPrice"> <wsdl:input message="axis2:getPriceMessage" /> <wsdl:output message="axis2:getPriceResponseMessage" /> </wsdl:operation> The inputMessage getPriceMessage has a definition which contains one or more part names <wsdl:message name="getPriceMessage"> <wsdl:part name="part1" element="ns:getPrice" /> </wsdl:message> the localpart element getPrice has the message getPrice which is a complexType defined of even more elements <xs:element name="getPrice"> <xs:complexType> <xs:sequence> <xs:element name="symbol" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> Any other entities which getPrice does not need (other than symbol) is extraneous to the run characteristics of the operation and are not identified or carried by the message Are you envisioning a need to carry any other entity?..if so how should the message identify these characteristics ? Thanks, Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, May 30, 2007 2:02 PM Subject: Re: Re: Confused... >I have recently used Axis2 1.2 wsdl2java to process some Dotnet specific >WSDL to produce the necessary service classes to demonstrate polymorphism. > > For example, in that WSDL, there is a base class (BaseRetObject), and a > sub class (SubRetObject) which extends BaseRetObject. > > <s:complexType name="BaseRetObject"> > <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="baseRetStr" > type="s:string" /> > <s:element minOccurs="1" maxOccurs="1" name="baseRetInt" type="s:int" > /> > </s:sequence> > </s:complexType> > <s:complexType name="SubRetObject"> > <s:complexContent mixed="false"> > <s:extension base="tns:BaseRetObject"> > <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="subRetStr" > type="s:string" /> > </s:sequence> > </s:extension> > </s:complexContent> > </s:complexType> > > There is a webmethod which simply returns the BaseRetObject. The (Java) > service code creates a SubRetObject and returns it as a BaseRetObject. The > (DotNet) client receives the BaseRetObject, checks to see its type (using > C# "is" operator) and successfully casts it. TcpTrace shows that the > return object is serialized as a SubRetObject so that all data is > included. > > The real problem that I am running into is that wsdl2java will not produce > the necessary objects for SubRetObject unless it is used in a webmethod > interface. Simply adding the SubRetObject definition to the WSDL does not > influence wsdl2java to produce the associated classes. I had to add a > webmethod stub that contained references to the subclass (SubRetObject) > before wsdl2java was able to produce the correct service objects. Is there > someway to generate objects for classes not included in a webmethod > interface? I ran into the same problem in DotNet. > > thanks, Dave > > -- > This message was sent on behalf of [EMAIL PROTECTED] at > openSubscriber.com > http://www.opensubscriber.com/message/[email protected]/6553779.ht ml > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
