You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by John Baker <jb...@javasystemsolutions.com> on 2009/06/20 11:16:42 UTC

WSDL issue

Hello,

This question is more specifically WSDL related, and isn't due to any fault in 
CXF, but if someone could point me in the right direction (or at the correct 
documentation) then that would be very helpful.  Consider the following:

 wsdl2java -d src ServiceRequest-Service-1.0.wsdl

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create 
wsdl definition from : file:ServiceRequest-Service-1.0.wsdl
Caused by : WSDLException 
(at /wsdl:definitions/wsdl:import[2]/wsdl:definitions/import): 
faultCode=INVALID_WSDL: Encountered illegal extension element 'import' in the 
context of a 'javax.wsdl.Definition'. Extension elements must be in a 
namespace other than WSDL's.

What does this actually mean?  The following entry in ServiceRequest-Service 
is at fault:

<wsdl:import 
namespace="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/interface" 
location="ServiceRequest-Interface-1.0.wsdl"/>

If I comment that out, the error goes away (but other errors are generated as 
there are no types defined).

Thanks,


John

Re: WSDL issue

Posted by John Baker <jb...@javasystemsolutions.com>.
I spoke to soon!  It appears the problem was this:

  <import 
namespace="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/messagetypes" 
location="ServiceRequestConnector-MessageTypes-1.0.xsd"/>

Which should have been:

  <wsdl:import

And now I've got a pile of other errors to look through :-)

On Saturday 20 June 2009 10:16:42 you wrote:
> Hello,
>
> This question is more specifically WSDL related, and isn't due to any fault
> in CXF, but if someone could point me in the right direction (or at the
> correct documentation) then that would be very helpful.  Consider the
> following:
>
>  wsdl2java -d src ServiceRequest-Service-1.0.wsdl
>
> WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to
> create wsdl definition from : file:ServiceRequest-Service-1.0.wsdl
> Caused by : WSDLException
> (at /wsdl:definitions/wsdl:import[2]/wsdl:definitions/import):
> faultCode=INVALID_WSDL: Encountered illegal extension element 'import' in
> the context of a 'javax.wsdl.Definition'. Extension elements must be in a
> namespace other than WSDL's.
>
> What does this actually mean?  The following entry in
> ServiceRequest-Service is at fault:
>
> <wsdl:import
> namespace="http://www.caps-solutions.co.uk/webservices/connectors/servicere
>quest/interface" location="ServiceRequest-Interface-1.0.wsdl"/>
>
> If I comment that out, the error goes away (but other errors are generated
> as there are no types defined).
>
> Thanks,
>
>
> John