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
