You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by nicolas de loof <ni...@apache.org> on 2008/10/02 15:46:35 UTC
name collision : Exception
Hello,
My WSDL declares a XSD type named "Exception" declared as Fault,
The generated code creates a conflict with java.lang.Exception :
<xsd:complexType name="Exception"> <xsd:sequence> <xsd:element minOccurs="0"
name="message" type="xsd:string"/> </xsd:sequence>
</xsd:complexType>
<operation name="SCA_initierParcours"> <input message="..."/> <output
message=".."/> <fault name="Exception" message="def:Exception"/>
</operation>
generated code :
public class Exception extends Exception {
...
Is there any way to force CXF to use fully qualified class name :
public class Exception extends java.lang.Exception {
Nicolas
Re: name collision : Exception
Posted by Daniel Kulp <dk...@apache.org>.
I just checked the code and the velocity template we use specifically
looks like:
public class $expClass.Name extends Exception {
Thus, we would need an update to that template. A bug report and a
patch would be great.
The file to look at is:
tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
However, I'm not sure if just changing to java.lang.Exception will work
cause the methods on the interface may say:
doFoo(..) throws Exception;
and I'm not sure which it would pick up.
Dan
On Thursday 02 October 2008, nicolas de loof wrote:
> Hello,
> My WSDL declares a XSD type named "Exception" declared as Fault,
> The generated code creates a conflict with java.lang.Exception :
>
>
> <xsd:complexType name="Exception"> <xsd:sequence> <xsd:element
> minOccurs="0" name="message" type="xsd:string"/> </xsd:sequence>
> </xsd:complexType>
>
> <operation name="SCA_initierParcours"> <input message="..."/> <output
> message=".."/> <fault name="Exception" message="def:Exception"/>
> </operation>
>
> generated code :
>
> public class Exception extends Exception {
> ...
>
> Is there any way to force CXF to use fully qualified class name :
>
> public class Exception extends java.lang.Exception {
>
> Nicolas
--
J. Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog