[ https://issues.apache.org/jira/browse/CXF-1723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616825#action_12616825 ]
Glen Mazza commented on CXF-1723: --------------------------------- Apache CXF doesn't normally compile during generation, so you won't see the error until after you manually compile. But there is a CXF option (check our WSDL2Java page) for compiling immediately after JAX-WS artifact generation. For me, I saw plenty of compilation errors: /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[48,29] comment is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[50,11] DeliverFaultMessage() is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[54,11] DeliverFaultMessage(java.lang.String) is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[58,11] DeliverFaultMessage(java.lang.String,java.lang.Throwable) is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[62,11] DeliverFaultMessage(java.lang.String,java.lang.String) is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[67,11] DeliverFaultMessage(java.lang.String,java.lang.String,java.lang.Throwable) is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[72,28] getFaultInfo() is already defined in com.abc.mb.DeliverFaultMessage /work/workspace/MyTest/trunk/service-war/target/generated/com/abc/mb/DeliverFaultMessage.java:[15,46] duplicate annotation To see my setup, download my WSDL-first sample (http://www.jroller.com/gmazza/date/20080417), delete the two Java files within it, replace the contents of DoubleIt.wsdl with your WSDL, and from the DoubleIt/trunk directory just run "mvn install"--you'll see those errors above. Glen > wsdl2java generates errorneous code > ----------------------------------- > > Key: CXF-1723 > URL: https://issues.apache.org/jira/browse/CXF-1723 > Project: CXF > Issue Type: Bug > Components: Tooling > Affects Versions: 2.1.1 > Environment: Windows XP 5.1, java 1.5.0_12 > Reporter: Markus Schmid > > Code generation from "test.wsdl" results in errorneous java code > "DeliverFaultMessage.java" (without exceptions/error/warnings of wsdl2java). > ---- test.wsdl ---- START > <wsdl:definitions name="test" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:types="http://www.abc.com/mb/schema" > xmlns:tns="http://www.abc.com/mb" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > xmlns:SCXSD="http://www.abc.com/mb/schema.ws" > targetNamespace="http://www.abc.com/mb"> > <wsdl:types> > <schema xmlns="http://www.w3.org/2001/XMLSchema" > xmlns:xmime="http://www.w3.org/2005/05/xmlmime" > targetNamespace="http://www.abc.com/mb/schema" elementFormDefault="qualified"> > <xsd:element name="data" type="xsd:string"/> > <xsd:element name="comment" type="xsd:string"/> > </schema> > </wsdl:types> > <wsdl:message name="DeliverRequestMessage"> > <wsdl:part name="header" element="types:data"/> > <wsdl:part name="body" element="types:data"/> > </wsdl:message> > <wsdl:message name="DeliverResponseMessage"> > <wsdl:part name="header" element="types:data"/> > <wsdl:part name="body" element="types:data"/> > </wsdl:message> > <wsdl:message name="DeliverFaultMessage"> > <wsdl:part name="comment1" element="types:comment"/> > <wsdl:part name="comment2" element="types:comment"/> > </wsdl:message> > > <wsdl:portType name="DeliverPortType"> > <wsdl:operation name="Deliver"> > <wsdl:input message="tns:DeliverRequestMessage"/> > <wsdl:output message="tns:DeliverResponseMessage"/> > <wsdl:fault name="runtimeexception" > message="tns:DeliverFaultMessage"/> > </wsdl:operation> > </wsdl:portType> > > <wsdl:binding name="DeliveryBinding" type="tns:DeliverPortType"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="Deliver"> > <soap:operation soapAction=""/> > <wsdl:input> > <soap:header message="tns:DeliverRequestMessage" part="header" > use="literal"/> > <soap:body use="literal" parts="body"/> > </wsdl:input> > <wsdl:output> > <soap:header message="tns:DeliverResponseMessage" part="header" > use="literal"/> > <soap:body use="literal" parts="body"/> > </wsdl:output> > <wsdl:fault name="runtimeexception"> > <soap:fault name="runtimeexception" use="literal"/> > </wsdl:fault> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="DeliverService"> > <wsdl:port name="DeliverPort" binding="tns:DeliveryBinding"> > <soap:address location="http://localhost:1001/deliver"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > ---- test.wsdl ---- END -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.