Is the client grabbing the "live" wsdl at runtime at startup? It LOOKS like
you pointed it at the endpoint address without adding the ?wsdl to the end of
the URL. It's thus getting a SOAP message back (probably a fault) instead of
the wsdl.
Dan
On Thu March 5 2009 2:46:27 pm Diginside wrote:
> I've a client consuming a web service using the WSDL file given. When I
> started to test, I got the following exception thrown.
>
> javax.wsdl.WSDLException: WSDLException (at /soapenv:Envelope):
> 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 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.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:2
>11) at
> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:17
>6) at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
> ... 7 more
> Disconnected from the target VM, address: '127.0.0.1:1180', transport:
> 'socket'
>
> I've searched the internet all over but found only somewhat related thread,
> indicating the WSDL file might be done in 1.0. But looking at the WSDL I
> have, I don't think that's the case.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XMLSpy v2007 sp1 (http://www.altova.com) -->
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:nts="http://www.mycompany.com/as/notification/pub/xsd"
> xmlns:tns="http://www.mycompany.com/as/notification/pub/wsdl"
> xmlns:ns1="http://www.mycompany.com/as/common/xsd"
> targetNamespace="http://www.mycompany.com/as/notification/pub/wsdl">
> <wsdl:types>
> <xsd:schema
> targetNamespace="http://www.mycompany.com/as/notification/pub/xsd"
> elementFormDefault="qualified">
> <xsd:include schemaLocation="notification.xsd"/>
> </xsd:schema>
> <xsd:schema
> targetNamespace="http://www.mycompany.com/as/common/xsd"
> elementFormDefault="qualified">
> <xsd:include schemaLocation="common.xsd"/>
> </xsd:schema>
> </wsdl:types>
> ...
>
> I am new to CXF. Any idea or suggestion would be greatly appreciated.
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog