You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Joanne Corless <jc...@etsos.co.uk> on 2010/09/28 17:43:03 UTC
Problem with a .Net generated WSDL erroring in Axis
I have to build a webservices client in Java (I was using Coldfusion but its
caused far too many problems so I'm dropping down to Java) however when I
try and use wsdl2java from Eclipse to create the stubs etc - It's falling
over with an error saying
WSDLException: faultCode=INVALID_WSDL: : Content is not allowed in prolog.
The same thing happens if I run it from the command line -
[Fatal Error] EnquireByPropertyDescriptionV1_1WebService.wsdl:2:1: Content
is no
t allowed in prolog.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:156)
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:
Prob
lem parsing '../xsd/EnquireByProper
tyDescriptionV1_1WebService.wsdl'.: org.xml.sax.SAXParseException: Content
is no
t allowed in prolog.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(
CodeGenerationEngine.java:288)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:111)
... 2 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
... 7 more
I am unable to get the supplier of this webservice to change anything until
I can prove its definitely their WSDL that is at fault - Do you have any
idea of what causes this error - I can supply the WSDL code if required but
am loathe to as it's a UK Government service and its taken months just to
get behind their certificates to get at the WSDL in the first place - they
are very twitchy about it all
Jo Corless