Hi
I ran Java2WSDL in a simple Java class to gnerate a doc/literal WSDL and got exception, it doesnt say what to fix to get the wsdl right, google also didnt help. same worked fine for RPC/enc and REPC/lit WSDL.
public class HelloWorld{ public String getMsg1(String str){ return "Hello World ! " + str ; } public String getMsg2(String str, int i){ return "Hello World ! " + str ; } public String getMsg3(String[] i){ return "Hello World ! array " ; } public String getMsg3(HelloWorld i){ return "Hello World ! array " ; } }
# ../java2wsdl.sh HelloWorld -l http://localhost:8080/axis/helloworld -o helloworld.wsdl --style DOCUMENT --use LITERAL -n http://test/helloworld
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultSubcode:
faultString: Attempted to write duplicate schema element : {http://test/helloworld}in0
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultSubcode:
faultString: Attempted to write duplicate schema element : {http://test/helloworld}in0
faultActor:
faultNode:
faultDetail:
Attempted to write duplicate schema element : {http://test/helloworld}in0
at org.apache.axis.wsdl.fromJava.Types.writeSchemaElementDecl(Types.java:832)
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1739)
at org.apache.axis.wsdl.fromJava.Emitter.writeRequestMessage(Emitter.java:1394)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1086)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1057)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:495)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:346)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:441)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:622)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:668)
regards Sanjay