AnsweredAssumed Answered

wsdl2java conversion is huccupping

Question asked by rsfeir on Nov 29, 2005
Latest reply on Nov 29, 2005 by rsfeir
Trying to generate the stubs using wsdl2java, I was able to generate the authentication classes, but for some reason it's choking on the repository wsdl.  It's looking for a header.xsd, but that should be coming from your end I think.  The URL I am using is below.  I am guessing it's looking for the header for various data types and somehow we're not getting those across the URL.  I found the wsdl files locally in the war file and used those along with the local header.xsd and types.xsd files and everything generated properly.  Just thought you might want to know, and perhaps I was doing something wrong as well.

$ java -classpath "axis.jar;log4j-1.2.8.jar;commons-discovery-0.2.jar;commons-logging-1.0.4.jar;axis-schema.jar;jaxrpc.jar;saaj.jar;wsdl4j-1.5.1.jar" org.apache.axis.wsdl.WSDL2Java http://www.alfresco.org/specification/ws/service/repository/1.0/repository-service.wsdl
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
WSDLException (at /wsdl:definitions/wsdl:import[1]): faultCode=OTHER_ERROR: Unable to resolve imported document at 'headers.xsd', relative to 'http://www.alfresco.org/specification/ws/service/repository/1.0/repository-service.wsdl': This file was not found: http://www.alfresco.
org/specification/ws/service/repository/1.0/headers.xsd: java.io.FileNotFoundException: This file was not found: http://www.alfresco.org/specification/ws/service/repository/1.0/headers.xsd
        at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:595)

        at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Thread.java:595)

Outcomes