What he's recommending, is for you to put the "PrizeType" object goes in a specific namespace. For example, let's call it the "Common-Object Namespace". All of the other web services, which reside in their own specific namespaces, would import the schema objects from the "Common-Object Namespace".
When you generate stubs, you can specify a mapping from namespaces to java packages. So if you follow this strategy, then only one PrizeType object would be generated, in whichever java package you mapped the "Common-Object Namespace" to. HTH - Aaron -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Thursday, February 19, 2009 10:24 AM To: users Subject: Re: duplicated complex type sorry if i stress yuo bu i desperatly need to now ho to avoid duplicated context type and specifing a common namaspace for my common interface. Could you help me? Regards Giovanni ---------- Initial Header ----------- >From : "Daniel Kulp" [email protected] To : [email protected] Cc : "gionnyDeep" [email protected] Date : Wed, 18 Feb 2009 13:14:09 -0500 Subject : Re: duplicated complex type > > This is "normal". The best option is to put the PrizeType in a specific > namespace for all the services. Thus, when it's code generated, it would > always be generated into the same place thus they all "share" it. > > Dan > > > On Wed February 18 2009 6:32:32 am gionnyDeep wrote: > > Hi all > > I'm newbie using cxf and webservices. > > So I apologize if I use not right terms. > > I defined my webservices using annotations. > > I created also interfaces used by my webservice. > > When I create my war and I see in my browser, all wsdls show me complextype > > as follow > > ... > > <xsd:complexType name="PrizeType"> > > <xsd:sequence> > > <xsd:element minOccurs="0" name="prizeTypeDesc" nillable="true" > > type="xsd:string"/> > > <xsd:element minOccurs="0" name="prizeTypeId" nillable="true" > > type="xsd:int"/> > > <xsd:element minOccurs="0" name="prizeTypeName" nillable="true" > > type="xsd:string"/> > > </xsd:sequence> > > </xsd:complexType> > > .... > > The problem is that the complextype PrizeType appears in all wsdl of all > > webservices.So when i generate the stubs I have redundant stubs created! > > Any idea? > > sorry for my english > > Giovanni > > -- > Daniel Kulp > [email protected] > http://www.dankulp.com/blog >
