Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 8660 invoked from network); 22 Feb 2008 18:12:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2008 18:12:09 -0000 Received: (qmail 35419 invoked by uid 500); 22 Feb 2008 18:11:55 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 35410 invoked by uid 500); 22 Feb 2008 18:11:55 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 35386 invoked by uid 99); 22 Feb 2008 18:11:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 10:11:55 -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; Fri, 22 Feb 2008 18:11:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6A4C7234C010 for ; Fri, 22 Feb 2008 10:11:19 -0800 (PST) Message-ID: <500442123.1203703879420.JavaMail.jira@brutus> Date: Fri, 22 Feb 2008 10:11:19 -0800 (PST) From: "Daniel Kulp (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Resolved: (CXF-1446) null pointer in java2wsld In-Reply-To: <1575379085.1203638540169.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-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-1446. ------------------------------ Resolution: Fixed Fix Version/s: 2.0.5 Assignee: Daniel Kulp > null pointer in java2wsld > ------------------------- > > Key: CXF-1446 > URL: https://issues.apache.org/jira/browse/CXF-1446 > Project: CXF > Issue Type: Bug > Components: Tooling > Affects Versions: 2.0.4 > Environment: ubuntu linux > Reporter: Sean Bridges > Assignee: Daniel Kulp > Priority: Minor > Fix For: 2.0.5 > > > The default output directory lookup for java2wsdl is not optimal. > If I have a web interface that looks like, > @WebService(name="service", > targetNamespace="http:\\\\soap.example.com", > wsdlLocation="http:\\\\soap.example.com\trinityService?wsdl") > public interface Example { > And run java2wsdl without the -d param, I get an exception, > java.lang.NullPointerException > at java.io.File.(File.java:194) > at org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.getOutputDir(JavaToProcessor.java:196) > at org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToProcessor.java:95) > at org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLContainer.java:58) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:52) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:39) > at org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74) > at org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42) > at t.Run.main(Run.java:7) > JavaToWSDL Error : null > org.apache.cxf.tools.common.ToolException > at org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLContainer.java:75) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:52) > at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:39) > at org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74) > at org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42) > at t.Run.main(Run.java:7) > This is caused by JavaToProcessor, > protected File getOutputDir(File wsdlLocation) { > String dir = (String)context.get(ToolConstants.CFG_OUTPUTDIR); > if (dir == null) { > if (wsdlLocation == null) { > dir = "./"; > } else { > dir = wsdlLocation.getParent(); > } > } > return new File(dir); > } > dir is null, since no output dir was specified. The wsdl location param is a File with path, "http:\\soap.example.com service?wsdl", and this has no valid parent. > I would not expect the wsld location specified in @WebService to be a valid output directory for java2wsdl. wsdl location will usually be an http url. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.