Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 22029 invoked from network); 19 Jun 2009 19:48:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jun 2009 19:48:45 -0000 Received: (qmail 92115 invoked by uid 500); 19 Jun 2009 19:48:56 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 92041 invoked by uid 500); 19 Jun 2009 19:48:56 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 92032 invoked by uid 99); 19 Jun 2009 19:48:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 19:48:56 +0000 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jun 2009 19:48:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 83D4323888D8; Fri, 19 Jun 2009 19:48:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r786640 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/i18n/ rt/core/src/main/java/org/apache/cxf/wsdl11/ Date: Fri, 19 Jun 2009 19:48:31 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090619194831.83D4323888D8@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Jun 19 19:48:30 2009 New Revision: 786640 URL: http://svn.apache.org/viewvc?rev=786640&view=rev Log: Merged revisions 786638 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r786638 | dkulp | 2009-06-19 15:47:08 -0400 (Fri, 19 Jun 2009) | 1 line [CXF-2295] Add better error message ........ Modified: cxf/branches/2.2.x-fixes/ (props changed) cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLRuntimeException.java cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jun 19 19:48:30 2009 @@ -1 +1 @@ -/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786514,786582-786583 +/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786514,786582-786583,786638 Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Jun 19 19:48:30 2009 @@ -1 +1 @@ -/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785866,785932,786142,786271-786272,786395,786514,786582-786583 +/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785866,785932,786142,786271-786272,786395,786514,786582-786583,786638 Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java?rev=786640&r1=786639&r2=786640&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java (original) +++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/i18n/UncheckedException.java Fri Jun 19 19:48:30 2009 @@ -19,6 +19,9 @@ package org.apache.cxf.common.i18n; +import java.util.ResourceBundle; +import java.util.logging.Logger; + public class UncheckedException extends java.lang.RuntimeException { @@ -41,7 +44,29 @@ message = null; } - + public UncheckedException(Logger log, String msg, Object ... params) { + message = new org.apache.cxf.common.i18n.Message(msg, + log, + params); + } + public UncheckedException(ResourceBundle bundle, String msg, Object ... params) { + message = new org.apache.cxf.common.i18n.Message(msg, + bundle, + params); + } + public UncheckedException(Logger log, String msg, Throwable t, Object ... params) { + super(t); + message = new org.apache.cxf.common.i18n.Message(msg, + log, + params); + } + public UncheckedException(ResourceBundle bundle, String msg, Throwable t, Object ... params) { + super(t); + message = new org.apache.cxf.common.i18n.Message(msg, + bundle, + params); + } + public String getCode() { if (null != message) { return message.getCode(); Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties?rev=786640&r1=786639&r2=786640&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties (original) +++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties Fri Jun 19 19:48:30 2009 @@ -30,3 +30,4 @@ MISSING_DESTINATION_FACTORY = Cannot find the destination factory, check the port //wsdl:port[@name=''{0}''] MISSING_SERVICE= No definition of service {0} in the WSDL. WSDL4J_BAD_ELEMENT_PART= Part {0} defined as element {1} which is not in the schema. +NO_MESSAGE=No {0} message was found for operation {1} and input named {2}. Check the wsdl for errors. Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLRuntimeException.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLRuntimeException.java?rev=786640&r1=786639&r2=786640&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLRuntimeException.java (original) +++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLRuntimeException.java Fri Jun 19 19:48:30 2009 @@ -19,6 +19,8 @@ package org.apache.cxf.wsdl11; +import java.util.logging.Logger; + import org.apache.cxf.common.i18n.Message; import org.apache.cxf.common.i18n.UncheckedException; @@ -39,4 +41,9 @@ public WSDLRuntimeException(Throwable cause) { super(cause); } + + public WSDLRuntimeException(Logger log, String msg, Object ... params) { + super(log, msg, params); + } + } Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=786640&r1=786639&r2=786640&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original) +++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Fri Jun 19 19:48:30 2009 @@ -570,6 +570,9 @@ this.copyExtensionAttributes(opInfo, op); Input input = op.getInput(); if (input != null) { + if (input.getMessage() == null) { + throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "input", op.getName(), input.getName()); + } MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(), MessageInfo.Type.INPUT); opInfo.setInput(input.getName(), minfo); buildMessage(minfo, input.getMessage()); @@ -578,6 +581,9 @@ } Output output = op.getOutput(); if (output != null) { + if (output.getMessage() == null) { + throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "output", op.getName(), output.getName()); + } MessageInfo minfo = opInfo.createMessage(output.getMessage().getQName(), MessageInfo.Type.OUTPUT); opInfo.setOutput(output.getName(), minfo); buildMessage(minfo, output.getMessage());