I've attached a patch for this problem. The type mappings were generated from types that are used in operations. Having the "-a" option does not change that fact.
I've modified the code to get the types from the symbol table and only generate the type mappings where the types are referenced. (The "-a" flag makes all symbol table entries referenced) Charles > -----Original Message----- > From: Russell Butek [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 22, 2002 12:07 PM > To: [EMAIL PROTECTED] > Subject: Re: WSDL2Java - BindingStub not registering all types. > > > Sylvain, I thought the -a option ws supposed to register all > types. We > discussed this a while ago and I believe we agreed. Either > we never did > the work or it was inadvertently removed. > > All types should be registered in both the Stub AND in the > deploy.wsdd file > if -a is turned on. > > I'll fix this after beta 2. > > Russell Butek > [EMAIL PROTECTED] > > > "St-Germain, Sylvain" <[EMAIL PROTECTED]> on > 04/22/2002 10:19:58 > AM > > Please respond to [EMAIL PROTECTED] > > To: "Axis Dev (E-mail)" <[EMAIL PROTECTED]> > cc: > Subject: WSDL2Java - BindingStub not registering all types. > > > > Hi all, > > When the -a option was added to WSDL2Java it was mainly to serve the > purpose > of being able to use (thus serialize) the objects defined in > the WSDL even > though they appeared unused from a WSDL perspective. > > I realize now that WSDL2Java does some smarts about it and > will not define > the QName for a type for which it does not find a > reference... or something > like that. > > All types I define (this is true for all my SOAP Header types) are not > being > mapped in my BindingStub. Is it possible to add mapping in the > BindingStub > for all types defined in the WSDL regardless of them being > referred to or > not? > > This is using -the somewhat old- March 25th build. I will > check with a > more > recent build. > -- > Sylvain > > This message may contain privileged and/or confidential > information. If > you > have received this e-mail in error or are not the intended > recipient, you > may not use, copy, disseminate or distribute it; do not open any > attachments, delete it immediately from your system and > notify the sender > promptly by e-mail that you have done so. Thank you. > > This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
--- JavaStubWriter.java.orig Wed May 1 16:08:20 2002 +++ JavaStubWriter.java Wed May 1 16:02:44 2002 @@ -297,15 +297,15 @@ HashSet types = new HashSet(); HashSet firstPassTypes = new HashSet(); - // Get all the types from all the operations - List operations = portType.getOperations(); - - for (int i = 0; i < operations.size(); ++i) { - Operation op = (Operation) operations.get(i); - firstPassTypes.addAll(getTypesInOperation(op)); - + Iterator symbolTableTypesIterator = symbolTable.getTypes().iterator(); + SymTabEntry tableEntry; + while (symbolTableTypesIterator.hasNext()) { + tableEntry = (SymTabEntry) symbolTableTypesIterator.next(); + if (tableEntry.isReferenced()) { + firstPassTypes.add(tableEntry); + } } - + // Add all the types nested and derived from the types // in the first pass. Iterator i = firstPassTypes.iterator();