Author: dkulp
Date: Thu Sep 1 16:35:18 2011
New Revision: 1164144
URL: http://svn.apache.org/viewvc?rev=1164144&view=rev
Log:
Merged revisions 1164140 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1164140 | dkulp | 2011-09-01 12:33:08 -0400 (Thu, 01 Sep 2011) | 2 lines
[CXF-2053] -verbose logging of more information when not unwrapping an
operation
........
Modified:
cxf/branches/2.4.x-fixes/ (props changed)
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
cxf/branches/2.4.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties?rev=1164144&r1=1164143&r2=1164144&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
(original)
+++
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/Messages.properties
Thu Sep 1 16:35:18 2011
@@ -33,4 +33,9 @@ MISSING_SERVICE= No definition of servic
WSDL4J_BAD_ELEMENT_PART= Part {0} defined as element {1} which is not in the
schema.
PART_NO_NAME_NO_TYPE= Part {0} defined with no element and no type.
NO_MESSAGE=No {0} message was found for operation {1} and input named {2}.
Check the wsdl for errors.
-BINDING_MISSING_TYPE=Could not find portType for binding {0}. Check wsdl for
errors.
\ No newline at end of file
+BINDING_MISSING_TYPE=Could not find portType for binding {0}. Check wsdl for
errors.
+WRAPPED_RULE_1 = Operation {0} cannot be unwrapped, input and output messages
(if present) must contain only a single part
+WRAPPED_RULE_2 = Operation {0} cannot be unwrapped, input message must
reference global element declaration with same localname as operation
+WRAPPED_RULE_3 = Operation {0} cannot be unwrapped, output message must
reference global element declaration
+WRAPPED_RULE_4 = Operation {0} cannot be unwrapped, its wsdl:part/@element
reference must match xs:complexType/xs:sequence
+WRAPPED_RULE_5 = Operation {0} cannot be unwrapped, its wsdl:part/@element may
only contain xs:sequences of xs:element[@name and not(@nillable)]
\ No newline at end of file
Modified:
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=1164144&r1=1164143&r2=1164144&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
(original)
+++
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
Thu Sep 1 16:35:18 2011
@@ -30,6 +30,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.logging.Level;
import java.util.logging.Logger;
import javax.wsdl.Binding;
@@ -109,6 +110,7 @@ public class WSDLServiceBuilder {
private boolean recordOriginal = true;
private boolean allowRefs;
private boolean ignoreUnknownBindings;
+ private Level unwrapLogLevel = Level.FINE;
public WSDLServiceBuilder(Bus bus) {
this.bus = bus;
@@ -118,6 +120,9 @@ public class WSDLServiceBuilder {
recordOriginal = record;
}
+ public void setUnwrapLogLevel(Level l) {
+ unwrapLogLevel = l;
+ }
public void setIgnoreUnknownBindings(boolean b) {
ignoreUnknownBindings = b;
}
@@ -495,7 +500,7 @@ public class WSDLServiceBuilder {
copyExtensionAttributes(bi, binding);
for (BindingOperation bop : cast(binding.getBindingOperations(),
BindingOperation.class)) {
- LOG.fine("binding operation name is " + bop.getName());
+ LOG.finer("binding operation name is " + bop.getName());
String inName = null;
String outName = null;
if (bop.getBindingInput() != null) {
@@ -618,13 +623,18 @@ public class WSDLServiceBuilder {
copyExtensors(finfo, entry.getValue().getExtensibilityElements());
copyExtensionAttributes(finfo, entry.getValue());
}
- checkForWrapped(opInfo, allowRefs, false);
+ checkForWrapped(opInfo, allowRefs, false, unwrapLogLevel);
}
public static void checkForWrapped(OperationInfo opInfo, boolean relaxed) {
checkForWrapped(opInfo, relaxed, relaxed);
}
public static void checkForWrapped(OperationInfo opInfo, boolean
allowRefs, boolean relaxed) {
+ checkForWrapped(opInfo, allowRefs, relaxed, Level.FINE);
+ }
+
+ public static void checkForWrapped(OperationInfo opInfo, boolean allowRefs,
+ boolean relaxed, Level logLevel) {
MessageInfo inputMessage = opInfo.getInput();
MessageInfo outputMessage = opInfo.getOutput();
boolean passedRule = true;
@@ -641,6 +651,9 @@ public class WSDLServiceBuilder {
}
if (!passedRule) {
+ org.apache.cxf.common.i18n.Message message
+ = new org.apache.cxf.common.i18n.Message("WRAPPED_RULE_1",
LOG, opInfo.getName());
+ LOG.log(logLevel, message.toString());
return;
}
SchemaCollection schemas =
opInfo.getInterface().getService().getXmlSchemaCollection();
@@ -664,6 +677,9 @@ public class WSDLServiceBuilder {
}
if (!passedRule) {
+ org.apache.cxf.common.i18n.Message message
+ = new org.apache.cxf.common.i18n.Message("WRAPPED_RULE_2",
LOG, opInfo.getName());
+ LOG.log(logLevel, message.toString());
return;
}
// RULE No.3:
@@ -682,6 +698,9 @@ public class WSDLServiceBuilder {
}
if (!passedRule) {
+ org.apache.cxf.common.i18n.Message message
+ = new org.apache.cxf.common.i18n.Message("WRAPPED_RULE_3",
LOG, opInfo.getName());
+ LOG.log(logLevel, message.toString());
return;
}
// RULE No.4 and No5:
@@ -709,6 +728,9 @@ public class WSDLServiceBuilder {
}
if (!passedRule) {
+ org.apache.cxf.common.i18n.Message message
+ = new org.apache.cxf.common.i18n.Message("WRAPPED_RULE_4",
LOG, opInfo.getName());
+ LOG.log(logLevel, message.toString());
return;
}
@@ -732,6 +754,9 @@ public class WSDLServiceBuilder {
}
if (!passedRule) {
+ org.apache.cxf.common.i18n.Message message
+ = new org.apache.cxf.common.i18n.Message("WRAPPED_RULE_5",
LOG, opInfo.getName());
+ LOG.log(logLevel, message.toString());
return;
}
// we are wrappable!!
Modified:
cxf/branches/2.4.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=1164144&r1=1164143&r2=1164144&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++
cxf/branches/2.4.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Thu Sep 1 16:35:18 2011
@@ -177,6 +177,9 @@ public class WSDLToJavaContainer extends
builder.validate(definition);
WSDLServiceBuilder serviceBuilder = new
WSDLServiceBuilder(getBus());
+ if (context.isVerbose()) {
+ serviceBuilder.setUnwrapLogLevel(Level.INFO);
+ }
serviceBuilder.setIgnoreUnknownBindings(true);
String allowRefs =
(String)context.get(ToolConstants.CFG_ALLOW_ELEMENT_REFS);
if (!StringUtils.isEmpty(allowRefs)