You can try Metro's wsimport (a copy of which should be in your JDK's bin
directory) to see what Metro has to say about whether or not the WSDL is
actually invalid.
If it is, you can save the WSDL locally, and (however nonideal and formally
frowned upon) alter it just prior to generating your JAX-WS objects with
it--as long as the generated JAX-WS artifacts will generate what the web
service is expecting you should be OK.
Glen
Lee Theobald wrote:
>
> Hi all,
>
> I'm trying to generate some classes for a third party web service but not
> having much luck. It appears that the WSDL is "invalid". It's not
> fantastically formed by the looks of things but I don't think it's
> invalid. Does anyone know if there's anyway I can disable the validation
> for this WSDL?
>
> The error message I am getting looks like the following:
>
> <pre>Caused by: javax.wsdl.WSDLException: WSDLException (at /head):
> faultCode=INVALID_WSDL: Expected element
> '{http://schemas.xmlsoap.org/wsdl/}definitions'.
> at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(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
> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:230)
> at
> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:179)
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91)
> ... 104 more</pre>
>
> (full stack trace if needed:
> http://old.nabble.com/file/p28780040/fullstacktrace.txt fullstacktrace.txt
> )
>
> <p>The WSDL I'm trying to parse can be seen at:
> https://www.parentknowhowdirectory.org.uk/isppsoap/deposit/?wsdl
> https://www.parentknowhowdirectory.org.uk/isppsoap/deposit/?wsdl </p>
> <p>I unfortunately have no control over the WSDL's contents so I cannot
> change it in anyway way so I need a way of getting a client to this
> service with the WSDL as is.</p>
> <p>Cheers for any help,<br />
> Lee</p>
>
--
View this message in context:
http://old.nabble.com/Validation---WSDL2Java-Generated-Classes-tp28780040p28785750.html
Sent from the cxf-user mailing list archive at Nabble.com.