Hi,
I have a problem with 2.1.1 I didn't have with 2.1
Here is my WSDL :

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns="http://example/namespace1";
xmlns:n2="http://example/namespace2";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
targetNamespace="http://example/namespace1";>
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://example/namespace2";
schemaLocation="my-definitions.xsd" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="MessageSoapIn">
<wsdl:part name="parameters" element="n2:myElement" />
</wsdl:message>
....

It imports the xsd my-definitions.xsd with this definition :
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns="
http://example/namespace2t";
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"; targetNamespace="
http://example/namespace2";>
...

I generate java code with maven plugin. Everything is fine. Then when I
deploy the webapp and invoke the http://host:port/webapp/service?wsdl, I get
this error :
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR:
Can't find prefix for 'http://example/namespace2'. Namespace prefixes
must be set on the Definition object using the addNamespace(...) method.

With the exact same WSDL and deployment (except cxf version), I have no
problem with cxf 2.1.
Is it a known issue (I didn't find anything similar in the JIRA) ?
Does anyone has the same problem ?

Thanks,
Vincent

Reply via email to