There is an ocean of WSDL files out there, with minOccurs="0" and maxOccurs="1". Here are four more, but I'm sure I could find hundreds, if I really wanted to look. http://www.esynaps.com/WebServices/DailyDiblert.asmx?WSDL http://HOSTING.MSUGS.CH/cheeso9/zips/ZipService.asmx?WSDL http://hosting.msugs.ch/aravindc/BookPriceComparison.asmx?wsdl http://services.pagedownweb.com/ZipCodes.asmx?WSDL These are from http://www.xmethods.com Cheers. Stan
----- Original Message ----- From: "Glen Daniels" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 24, 2002 4:25 PM Subject: RE: WSDL2Java emitter issue (confusing String[] and String) I still feel that minoccurs="0" maxoccurs="1" should map to to a wrapped type, i.e. both "soap-enc:int" and a min="0"/max="1" xsd:int should map to "Integer" when dealing with WSDL2Java. --Glen > -----Original Message----- > From: Russell Butek [mailto:[EMAIL PROTECTED]] > Sent: Sunday, February 24, 2002 5:24 PM > To: [EMAIL PROTECTED] > Subject: Re: WSDL2Java emitter issue (confusing String[] and String) > > > There's still a standing question of what is correct, here. > The type is > declared as minOccurs=0, maxOccurs=1 and there is no way, for > primitive > types, to indicate 0 occurances in Java. For String there > is, but if this > were an int, there's no way to say 0 ints. You have to either use an > Integer (which we already use for soap-enc:int) or use an int[] of 0 > length. I THOUGHT an array would work, but you say it > doesn't, so we've > obviously got some problems. > > Russell Butek > [EMAIL PROTECTED] > > > "Stan Jordan" <[EMAIL PROTECTED]> on 02/23/2002 04:34:20 PM > > Please respond to [EMAIL PROTECTED] > > To: <[EMAIL PROTECTED]> > cc: > Subject: WSDL2Java emitter issue (confusing String[] and String) > > > > > The emitter seems to get confused by WSDL files generated by .NET. I > found many examples of this problem on www.xmethods.com but > this one here > is very simple and illustrates the problem well... > http://alethea.net/webservices/LocalTime.asmx?WSDL > When you generate stubs from this file, they compile fine. > However, the > interface generated is wrong (see below). The signature should be: > public java.lang.String > localTimeByZipCode(java.lang.String zipCode) > throws java.rmi.RemoteException; > In other words, "String" is correct and "String[]" is wrong. > I verified > this by editing the interface and stub java files, recompiling, and > executing a client. The client works fine when the > interface and stub > files are fixed (by hand). > I did this work with nightly download Feb 22. > Cheers. > Stan > --------------------------------------------------------------------- > /** > * LocalTimeSoap.java > * > * This file was auto-generated from WSDL > * by the Apache Axis Wsdl2java emitter. > */ > > package net.alethea; > > public interface LocalTimeSoap extends java.rmi.Remote { > > // Returns the local time for a given zip code. > public java.lang.String[] localTimeByZipCode(java.lang.String[] > zipCode) throws java.rmi.RemoteException; > } > String[] wrong here > String[] > wrong here too > >
