You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/08/29 14:48:29 UTC
svn commit: r690218 - in
/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap:
bindings/soap/interceptors/ interceptors/jbi/
Author: gnodet
Date: Fri Aug 29 05:48:29 2008
New Revision: 690218
URL: http://svn.apache.org/viewvc?rev=690218&view=rev
Log:
SM-1529: make sure the SOAPAction header is correctly sent
Modified:
servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionInOperationInterceptor.java
servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java
servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/interceptors/jbi/JbiOutInterceptor.java
Modified: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionInOperationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionInOperationInterceptor.java?rev=690218&r1=690217&r2=690218&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionInOperationInterceptor.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionInOperationInterceptor.java Fri Aug 29 05:48:29 2008
@@ -39,15 +39,17 @@
if (soapAction.startsWith("\"") && soapAction.endsWith("\"")) {
soapAction = soapAction.substring(1, soapAction.length() - 1);
}
- SoapBinding<?> binding = (SoapBinding<?>) message.get(Binding.class);
- List<SoapOperation<?>> matching = new ArrayList<SoapOperation<?>>();
- for (SoapOperation<?> operation : binding.getOperations()) {
- if (soapAction.equals(operation.getSoapAction())) {
- matching.add(operation);
+ if (soapAction.length() > 0) {
+ SoapBinding<?> binding = (SoapBinding<?>) message.get(Binding.class);
+ List<SoapOperation<?>> matching = new ArrayList<SoapOperation<?>>();
+ for (SoapOperation<?> operation : binding.getOperations()) {
+ if (soapAction.equals(operation.getSoapAction())) {
+ matching.add(operation);
+ }
+ }
+ if (matching.size() == 1) {
+ message.put(Operation.class, matching.get(0));
}
- }
- if (matching.size() == 1) {
- message.put(Operation.class, matching.get(0));
}
}
}
Modified: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java?rev=690218&r1=690217&r2=690218&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java Fri Aug 29 05:48:29 2008
@@ -30,9 +30,15 @@
return;
}
SoapOperation soapOp = (SoapOperation) operation;
- if (soapOp.getSoapAction() != null) {
- message.getTransportHeaders().put(SoapConstants.SOAP_ACTION_HEADER, soapOp.getSoapAction());
+ String soapAction = ((SoapOperation<?>) operation).getSoapAction();
+ if (soapAction != null) {
+ if (!soapAction.startsWith("\"") || !soapAction.endsWith("\"")) {
+ soapAction = "\"" + soapAction + "\"";
+ }
+ } else {
+ soapAction = "\"\"";
}
+ message.getTransportHeaders().put(SoapConstants.SOAP_ACTION_HEADER, soapAction);
}
}
Modified: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/interceptors/jbi/JbiOutInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/interceptors/jbi/JbiOutInterceptor.java?rev=690218&r1=690217&r2=690218&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/interceptors/jbi/JbiOutInterceptor.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/interceptors/jbi/JbiOutInterceptor.java Fri Aug 29 05:48:29 2008
@@ -65,10 +65,6 @@
+ operation.getName());
}
message.put(Operation.class, operation);
- if (operation instanceof SoapOperation<?>) {
- String soapAction = ((SoapOperation<?>) operation).getSoapAction();
- message.getTransportHeaders().put(SoapConstants.SOAP_ACTION_HEADER, soapAction);
- }
}
}
}