cancel
Showing results for 
Search instead for 
Did you mean: 

wsdl2java conversion is huccupping

rsfeir
Champ in-the-making
Champ in-the-making
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)
2 REPLIES 2

gavinc
Champ in-the-making
Champ in-the-making
Hi,

The wsdl files you have pointed to were meant for documentation purposes, the header.xsd and types.xsd files you mention are not in the correct place on the website, hence the error you are seeing.

The intention was to point to the local copy in your Alfresco install. You should find the WSDL files at http://localhost:8080/alfresco/wsdl. So if you point wsdl2java at http://localhost:8080/alfresco/wsdl/repository-service.wsdl you should have more luck with generating the stubs.

rsfeir
Champ in-the-making
Champ in-the-making
nope tried that too, there was another post that mentioned the local install and got the same error when using the URL.

R
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.