Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7520FC37F for ; Thu, 13 Nov 2014 13:20:34 +0000 (UTC) Received: (qmail 5171 invoked by uid 500); 13 Nov 2014 13:20:34 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 5133 invoked by uid 500); 13 Nov 2014 13:20:34 -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 5117 invoked by uid 99); 13 Nov 2014 13:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2014 13:20:34 +0000 Date: Thu, 13 Nov 2014 13:20:34 +0000 (UTC) From: "Gary Gregory (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6049) wsdl2java generates code in two folders instead of one (only one ObjectFactory class) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory updated CXF-6049: ------------------------------ Description: With the WSDL: http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL Calling:: {noformat} wsdl2java -server -impl -d C:/test/cxf/wsdl2java/src -classdir C:/test/cxf/wsdl2java/bin -compile http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL {noformat} This generates two source packages: - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo Instead of one. CXF replaces the dot in the namespace from the WSDL with an underscore. Then JAXB cannot create a JAXBContext for classes in {{org.oorsprong.websamples_countryinfo}} because JAXB throws an exception because there is no ObjectFactory in that package. It seems to me that all the code should be generated in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo}} and nothing in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples}}? If I use the {{-p}} option to force generation to either package, the runtime throws execptions. In one case, CXF cannot find the object factory class, in the other, it cannot find a generated model class. was: With the WSDL: http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL Calling:: {noformat} wsdl2java -server -impl -d C:/test/cxf/wsdl2java/src -classdir C:/test/cxf/wsdl2java/bin -compile http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL {noformat} This generates two source packages: - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo Instead of one. CXF replaces the dot in the namespace from the WSDL with an underscore. Then JAXB cannot create a JAXBContext for classes in {{org.oorsprong.websamples_countryinfo}} because JAXB throws an exception because there is no ObjectFactory in that package. It seems to me that all the code should be generated in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo}} and nothing in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples}}? > wsdl2java generates code in two folders instead of one (only one ObjectFactory class) > ------------------------------------------------------------------------------------- > > Key: CXF-6049 > URL: https://issues.apache.org/jira/browse/CXF-6049 > Project: CXF > Issue Type: Bug > Components: Tooling > Affects Versions: 2.7.12, 3.0.1, 2.7.13, 3.0.2 > Environment: Java 1.7.0 64-bit, Windows 7. > Reporter: Gary Gregory > > With the WSDL: > http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL > Calling:: > {noformat} > wsdl2java -server -impl -d C:/test/cxf/wsdl2java/src -classdir C:/test/cxf/wsdl2java/bin -compile http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL > {noformat} > This generates two source packages: > - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples > - C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo > Instead of one. > CXF replaces the dot in the namespace from the WSDL with an underscore. > Then JAXB cannot create a JAXBContext for classes in {{org.oorsprong.websamples_countryinfo}} because JAXB throws an exception because there is no ObjectFactory in that package. > It seems to me that all the code should be generated in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples_countryinfo}} and nothing in {{C:\test\cxf\wsdl2java\src\org\oorsprong\websamples}}? > If I use the {{-p}} option to force generation to either package, the runtime throws execptions. In one case, CXF cannot find the object factory class, in the other, it cannot find a generated model class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)