Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 45717 invoked from network); 8 Dec 2008 02:22:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2008 02:22:46 -0000 Received: (qmail 95078 invoked by uid 500); 8 Dec 2008 02:22:58 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 95059 invoked by uid 500); 8 Dec 2008 02:22:58 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 95048 invoked by uid 99); 8 Dec 2008 02:22:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Dec 2008 18:22:58 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Dec 2008 02:21:25 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 330EE234C324 for ; Sun, 7 Dec 2008 18:21:44 -0800 (PST) Message-ID: <1608733899.1228702904192.JavaMail.jira@brutus> Date: Sun, 7 Dec 2008 18:21:44 -0800 (PST) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Subject: [jira] Commented: (CXF-1934) Generating source from wsdl2java does not respect namespace of complexTypes in included schema. In-Reply-To: <1175879505.1228697864384.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654284#action_12654284 ] Daniel Kulp commented on CXF-1934: ---------------------------------- xjc (the JAXB RI command line tool) has a command line option (-npa) to turn off generating the package-info things. I've never had the time to figure out how to wire that into our tools. For now, you could probably use xjc to regenerate just the schema types. > Generating source from wsdl2java does not respect namespace of complexTypes in included schema. > ----------------------------------------------------------------------------------------------- > > Key: CXF-1934 > URL: https://issues.apache.org/jira/browse/CXF-1934 > Project: CXF > Issue Type: Bug > Components: Tooling > Affects Versions: 2.1.3 > Reporter: Derek Adams > Priority: Minor > Attachments: calculator.wsdl > > > When generating classes via wsdl2java, the JAXB generated classes for complex types in the schema section do not reflect the correct namespace. For example, generating code from the WSDL below: > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:y="http://example.org/math/" xmlns:type="http://example.org/math/types/" > targetNamespace="http://example.org/math/"> > > targetNamespace="http://example.org/math/types/"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > transport="http://schemas.xmlsoap.org/soap/http" /> > > > > > > > > > > > > > > > > > > > > > > > > > > results in JAXB classes with no namespaces. For example, MathInput should be in namespace ttp://example.org/math/types/. The @XmlType declaration in MathInput.java looks like: > @XmlType(name = "MathInput", propOrder = { > "x", > "z" > }) > with no namespace entry. Running the generated code results in the following errors on CXF startup (in this case from Mule): > 14:32:04,606 ERROR [STDERR] Dec 7, 2008 2:32:04 PM org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}SubtractResponse referenc > es undefined type MathOutput for service {http://example.org/math/}MathInterface > Service. > 14:32:04,606 ERROR [STDERR] Dec 7, 2008 2:32:04 PM org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}Subtract references undef > ined type MathInput for service {http://example.org/math/}MathInterfaceService. > 14:32:04,621 ERROR [STDERR] Dec 7, 2008 2:32:04 PM org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}AddResponse references un > defined type MathOutput for service {http://example.org/math/}MathInterfaceServi > ce. > 14:32:04,621 ERROR [STDERR] Dec 7, 2008 2:32:04 PM org.apache.cxf.service.factor > y.ReflectionServiceFactoryBean fillInSchemaCrossreferences > SEVERE: Schema element {http://example.org/math/types/}Add references undefined > type MathInput for service {http://example.org/math/}MathInterfaceService. > .. and the WSDL served by CXF relects two 'xs:schema' (one for elements and a separate for the complex types) with different targetNamespaces. Adding the namespace declaration to the JXC-generated sources for the complexTypes fixes the problem. > Thanks, > Derek -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.