axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teresa Canales" <tcana...@agora-inc.com>
Subject Referring to Creating Web Services with Apache Axis -- 5/22/2002
Date Mon, 05 Nov 2007 21:18:03 GMT
I was going through your article written in 2002 on Apache Axis.  Since then Axis2 has come
out.  I am new to Axis2 and Web Services.  I was trying to follow the steps you wrote for
Axis2.  I was going through step 2 -- Java2WSDL: Generate WSDL File For the Given Fibonacci
Interface.  I ran the following for Axis2.
C:\Documents and Settings\tcanales\workspace\Fibonacci\bin>%AXIS2_HOME%\bin\Java
2WSDL -o "fib.wsdl" -l "http://localhost:8080/axis/services/fibonacci" -tn "urn:
fibonacci" -tp "fibonacci" -cn "fibonacci.Fibonacci"

It created the attached wsdl.

Then I tried to run the third step 3 -- WSDL2Java: Generate the Server-side Wrapper Code and
Stubs For Easy client Access. 
I ran it with C:\Documents and Settings\tcanales\workspace\Fibonacci\bin>%AXIS2_HOME%\bin\WSDL
2Java -o . -p "fibonacci.ws" -uri "fib.wsdl"

I get the following error:

Using AXIS2_HOME:   C:\Teresa\Downloads\Axis\axis2-1.3
Using JAVA_HOME:    C:\Program Files\Java\jdk1.5.0_13
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:150)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Pars
er SAX Error: org.xml.sax.SAXException: Fatal Error: URI=file:///C:/Documents%20
and%20Settings/tcanales/workspace/Fibonacci/bin/fib.wsdl Line=1: Content is not
allowed in prolog.
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(
CodeGenerationEngine.java:292)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:105)
        ... 2 more
Caused by: org.xml.sax.SAXException: Fatal Error: URI=file:///C:/Documents%20and
%20Settings/tcanales/workspace/Fibonacci/bin/fib.wsdl Line=1: Content is not all
owed in prolog.
        at org.apache.axis2.util.XMLUtils$ParserErrorHandler.fatalError(XMLUtils
.java:390)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)

        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispat
ch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.apache.axis2.util.XMLUtils.newDocument(XMLUtils.java:205)
        at org.apache.axis2.util.XMLUtils.newDocument(XMLUtils.java:250)
        at org.apache.axis2.util.XMLUtils.newDocument(XMLUtils.java:233)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(
CodeGenerationEngine.java:285)
        ... 3 more


I think I have to run Java2WSDL with different options and that may be the reason for the
problem in WSDL2Java.  Can you tell me what I am doing wrong??  If I need to email someone
else please let me know.

Thanks,
Teresa Canales
 <<Fibonacci.wsdl>> 

Mime
View raw message