You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/05/21 04:06:15 UTC
svn commit: r776920 - in
/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc:
CxfBcConsumer.java CxfBcProvider.java
interceptors/JbiOutWsdl1Interceptor.java
Author: ffang
Date: Thu May 21 02:06:14 2009
New Revision: 776920
URL: http://svn.apache.org/viewvc?rev=776920&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/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=776920&r1=776919&r2=776920&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java Thu May 21 02:06:14 2009
@@ -463,7 +463,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/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=776920&r1=776919&r2=776920&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java Thu May 21 02:06:14 2009
@@ -212,7 +212,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/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java?rev=776920&r1=776919&r2=776920&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java Thu May 21 02:06:14 2009
@@ -56,10 +56,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) {
@@ -77,9 +79,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 {