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 2008/01/08 00:55:54 UTC
svn commit: r609812 - in /incubator/cxf/trunk/rt:
core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Author: dkulp
Date: Mon Jan 7 15:55:51 2008
New Revision: 609812
URL: http://svn.apache.org/viewvc?rev=609812&view=rev
Log:
[CXF-1223, CXF-1276] More fixes for conent encoding issues in conduit, fix issue of partially allowing some bare stuff as wrapped when it shouldn't be.
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=609812&r1=609811&r2=609812&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Mon Jan 7 15:55:51 2008
@@ -73,6 +73,7 @@
import org.apache.cxf.service.model.UnwrappedOperationInfo;
import org.apache.cxf.transport.DestinationFactory;
import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.ws.commons.schema.XmlSchemaComplexContentExtension;
import org.apache.ws.commons.schema.XmlSchemaComplexType;
import org.apache.ws.commons.schema.XmlSchemaElement;
import org.apache.ws.commons.schema.XmlSchemaObject;
@@ -554,8 +555,10 @@
XmlSchemaComplexType xsct = null;
if (inputEl.getSchemaType() instanceof XmlSchemaComplexType) {
+
xsct = (XmlSchemaComplexType)inputEl.getSchemaType();
if (hasAttributes(xsct)
+ || (inputEl.isNillable() && !relaxed)
|| !isWrappableSequence(xsct, inputEl.getQName().getNamespaceURI(),
unwrappedInput, relaxed)) {
passedRule = false;
@@ -577,6 +580,7 @@
passedRule = false;
}
if (hasAttributes(xsct)
+ || (outputEl.isNillable() && !relaxed)
|| !isWrappableSequence(xsct, outputEl.getQName().getNamespaceURI(), unwrappedOutput,
relaxed)) {
passedRule = false;
@@ -648,6 +652,12 @@
return ret;
} else if (type.getParticle() == null) {
+ if (type.getContentModel() == null) {
+ return true;
+ }
+ if (type.getContentModel().getContent() instanceof XmlSchemaComplexContentExtension) {
+ return false;
+ }
return true;
}
return false;
Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=609812&r1=609811&r2=609812&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Mon Jan 7 15:55:51 2008
@@ -1926,15 +1926,10 @@
charset = charset.substring(0, charset.indexOf(";"));
}
}
- String enc = connection.getContentEncoding();
- if (charset == null) {
- charset = enc;
- }
-
String normalizedEncoding = HttpHeaderHelper.mapCharset(charset);
if (normalizedEncoding == null) {
String m = new org.apache.cxf.common.i18n.Message("INVALID_ENCODING_MSG",
- LOG, enc).toString();
+ LOG, charset).toString();
LOG.log(Level.WARNING, m);
throw new IOException(m);
}