Author: ffang
Date: Thu May 21 02:58:39 2009
New Revision: 776936
URL: http://svn.apache.org/viewvc?rev=776936&view=rev
Log:
[SMXCOMP-547]CXF-BC Component unable to use web services with parameter named
Body when useJBIWrapper=false and messsage has no SOAP envlope
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=776936&r1=776935&r2=776936&view=diff
==============================================================================
---
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Thu May 21 02:58:39 2009
@@ -454,7 +454,7 @@
cxfService.getInInterceptors().add(new OutgoingChainInterceptor());
cxfService.getOutInterceptors().add(
- new JbiOutWsdl1Interceptor(isUseJBIWrapper()));
+ new JbiOutWsdl1Interceptor(isUseJBIWrapper(),
isUseSOAPEnvelope()));
cxfService.getOutInterceptors().add(new
SoapActionOutInterceptor());
cxfService.getOutInterceptors().add(new
AttachmentOutInterceptor());
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=776936&r1=776935&r2=776936&view=diff
==============================================================================
---
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
(original)
+++
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Thu May 21 02:58:39 2009
@@ -298,7 +298,7 @@
}
outList.add(new JbiOutInterceptor());
- outList.add(new JbiOutWsdl1Interceptor(isUseJBIWrapper()));
+ outList.add(new JbiOutWsdl1Interceptor(isUseJBIWrapper(),
isUseSOAPEnvelope()));
outList.add(new SoapPreProtocolOutInterceptor());
outList.add(new SoapOutInterceptor(getBus()));
outList.add(new SoapActionOutInterceptor());
Modified:
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java?rev=776936&r1=776935&r2=776936&view=diff
==============================================================================
---
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
(original)
+++
servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Thu May 21 02:58:39 2009
@@ -59,10 +59,12 @@
public class JbiOutWsdl1Interceptor extends AbstractSoapInterceptor {
private boolean useJBIWrapper = true;
+ private boolean useSOAPWrapper = true;
- public JbiOutWsdl1Interceptor(boolean useJBIWrapper) {
+ public JbiOutWsdl1Interceptor(boolean useJBIWrapper, boolean
useSOAPWrapper) {
super(Phase.MARSHAL);
this.useJBIWrapper = useJBIWrapper;
+ this.useSOAPWrapper = useSOAPWrapper;
}
public void handleMessage(SoapMessage message) {
@@ -80,9 +82,12 @@
SoapVersion soapVersion = message.getVersion();
if (element != null) {
// if this message is coming from the CxfBCConsumer
- Element bodyElement = (Element)
element.getElementsByTagNameNS(
+ Element bodyElement = null;
+ if (useSOAPWrapper) {
+ bodyElement = (Element) element.getElementsByTagNameNS(
element.getNamespaceURI(),
soapVersion.getBody().getLocalPart()).item(0);
+ }
if (bodyElement != null) {
StaxUtils.writeElement((Element)bodyElement.getFirstChild(), xmlWriter, false);
} else {