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/07/15 15:18:45 UTC
svn commit: r676908 - in
/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap:
impl/Wsdl1SoapBindingImpl.java
interceptors/SoapActionOutOperationInterceptor.java
Author: gnodet
Date: Tue Jul 15 06:18:44 2008
New Revision: 676908
URL: http://svn.apache.org/viewvc?rev=676908&view=rev
Log:
SM-1460: The new http endpoints do not handle SOAPAction header correctly
Added:
servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java
Modified:
servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/impl/Wsdl1SoapBindingImpl.java
Modified: servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/impl/Wsdl1SoapBindingImpl.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/impl/Wsdl1SoapBindingImpl.java?rev=676908&r1=676907&r2=676908&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/impl/Wsdl1SoapBindingImpl.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/impl/Wsdl1SoapBindingImpl.java Tue Jul 15 06:18:44 2008
@@ -26,6 +26,8 @@
import org.apache.servicemix.soap.bindings.soap.interceptors.SoapFaultOutInterceptor;
import org.apache.servicemix.soap.bindings.soap.interceptors.SoapInInterceptor;
import org.apache.servicemix.soap.bindings.soap.interceptors.SoapOutInterceptor;
+import org.apache.servicemix.soap.bindings.soap.interceptors.SoapActionInOperationInterceptor;
+import org.apache.servicemix.soap.bindings.soap.interceptors.SoapActionOutOperationInterceptor;
import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapBinding;
import org.apache.servicemix.soap.bindings.soap.model.wsdl1.Wsdl1SoapOperation;
import org.apache.servicemix.soap.core.model.AbstractBinding;
@@ -63,6 +65,7 @@
phase.add(new AttachmentsInInterceptor());
phase.add(new StaxInInterceptor());
phase.add(new SoapInInterceptor(soapVersion));
+ phase.add(new SoapActionInOperationInterceptor());
phase.add(new WsdlOperationInInterceptor());
phase.add(new MustUnderstandInterceptor());
phase.add(new JbiInWsdl1Interceptor(true));
@@ -88,6 +91,7 @@
phase = getInterceptors(Phase.ClientOut);
phase.add(new JbiOutInterceptor(false));
phase.add(new JbiOutWsdl1Interceptor(false));
+ phase.add(new SoapActionOutOperationInterceptor());
phase.add(new AttachmentsOutInterceptor());
phase.add(new StaxOutInterceptor());
phase.add(new SoapOutInterceptor(soapVersion));
Added: 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=676908&view=auto
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java (added)
+++ servicemix/components/shared-libraries/trunk/servicemix-soap2/src/main/java/org/apache/servicemix/soap/bindings/soap/interceptors/SoapActionOutOperationInterceptor.java Tue Jul 15 06:18:44 2008
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicemix.soap.bindings.soap.interceptors;
+
+import org.apache.servicemix.soap.core.AbstractInterceptor;
+import org.apache.servicemix.soap.api.Message;
+import org.apache.servicemix.soap.api.model.Operation;
+import org.apache.servicemix.soap.bindings.soap.model.SoapOperation;
+import org.apache.servicemix.soap.bindings.soap.SoapConstants;
+
+public class SoapActionOutOperationInterceptor extends AbstractInterceptor {
+
+ public void handleMessage(Message message) {
+ Operation operation = message.get(Operation.class);
+ if (!(operation instanceof SoapOperation)) {
+ return;
+ }
+ SoapOperation soapOp = (SoapOperation) operation;
+ if (soapOp.getSoapAction() != null) {
+ message.getTransportHeaders().put(SoapConstants.SOAP_ACTION_HEADER, soapOp.getSoapAction());
+ }
+ }
+
+}