axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Coyne, Jimmy" <Jimmy.Co...@Terranua.com>
Subject Wsdl2java generated code
Date Fri, 30 Sep 2005 16:03:09 GMT
Hi all , 
Our  customer have designed there different services   such as CreateAccount
, UpdateAccount , DeleteAccount etc  in a very a very similar manner.
For example CreateAccount

<element name="CreateAccount">
	 <complexType>
          <sequence>
             <element name="Request">
                <complexType>
                  <sequence>
                    <element name="accountDetails" minOccurs="0">
                      <complexType>
                        <sequence>
                          <element name="country" type="string"/>
                          <element name="accountId" type="string"/>
                          <element name="Profile">
                            <complexType>
                              <sequence>
                                <element name="name" type="string"
minOccurs="0"/>
                              </sequence>
                            </complexType>
                          </element>
                        </sequence>..........




Is the same as  UpdateAccount  except for a few elements names ..

<element name="UpdateAccount">
	 <complexType>
          <sequence>
             <element name="Request">
                <complexType>
                  <sequence>
                    <element name="accountDetails" minOccurs="0">
                      <complexType>
                        <sequence>
                          <element name="country" type="string"/>
                          <element name="accountId" type="string"/>
                          <element name="Profile">
                            <complexType>
                              <sequence>
                                <element name="name" type="string"
minOccurs="0"/>
                              </sequence>
                            </complexType>
                          </element>
                        </sequence>. . . . . . . 



Using wsdl2java  The classes  created very similar

CreateAccount--- generates 
CreateAccountRequest
CreateAccountRequestAccountDetails
CreateAccountRequestAccountDetailsProfile
......... . . . .  . .
UpdateAccountRequest ----- generates 

UpdateAccountRequest
UpdateAccountRequestAccountDetails
UpdateAccountRequestAccountDetailsProfile
 . . . . . . . . . . . . .  . .


Although the  classes  are almost identical  , because they  don't extend
any common   class  , I cant see a way of building up the binding objects
 in a clean way i.e.  I will have to write code to set the binding object
for all cases with no reuse . Can any one think of a clean way to solve this
problem ?
Thanks
Jimmy 







Mime
View raw message