Author: dkulp
Date: Tue May 22 12:19:51 2007
New Revision: 540707
URL: http://svn.apache.org/viewvc?view=rev&rev=540707
Log:
Fix to put parts="" on soap:body if all the parts are headers
Modified:
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Modified:
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java?view=diff&rev=540707&r1=540706&r2=540707
==============================================================================
---
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
(original)
+++
incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Tue May 22 12:19:51 2007
@@ -38,7 +38,6 @@
import org.apache.cxf.binding.soap.model.SoapBindingInfo;
import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
import org.apache.cxf.binding.soap.model.SoapOperationInfo;
-import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.service.Service;
import org.apache.cxf.service.model.BindingFaultInfo;
import org.apache.cxf.service.model.BindingInfo;
@@ -133,9 +132,10 @@
b.addExtensor(soapOperation);
if (b.getInput() != null) {
- List<String> bodyParts = new ArrayList<String>();
+ List<String> bodyParts = null;
SoapHeaderInfo headerInfo =
b.getInput().getExtensor(SoapHeaderInfo.class);
if (headerInfo != null) {
+ bodyParts = new ArrayList<String>();
for (MessagePartInfo part :
b.getInput().getMessageParts()) {
bodyParts.add(part.getName().getLocalPart());
}
@@ -158,7 +158,7 @@
body.setNamespaceURI(b.getName().getNamespaceURI());
}
- if (!StringUtils.isEmpty(bodyParts)) {
+ if (bodyParts != null) {
body.setParts(bodyParts);
}
@@ -166,9 +166,10 @@
}
if (b.getOutput() != null) {
- List<String> bodyParts = new ArrayList<String>();
+ List<String> bodyParts = null;
SoapHeaderInfo headerInfo =
b.getOutput().getExtensor(SoapHeaderInfo.class);
if (headerInfo != null) {
+ bodyParts = new ArrayList<String>();
for (MessagePartInfo part :
b.getOutput().getMessageParts()) {
bodyParts.add(part.getName().getLocalPart());
}
@@ -190,7 +191,7 @@
body.setNamespaceURI(b.getName().getNamespaceURI());
}
- if (!StringUtils.isEmpty(bodyParts)) {
+ if (bodyParts != null) {
body.setParts(bodyParts);
}