You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/06/19 21:48:31 UTC
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/
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());