servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r550405 - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc: ./ src/main/java/org/apache/servicemix/cxfbc/ src/main/java/org/apache/servicemix/cxfbc/interceptors/
Date Mon, 25 Jun 2007 07:57:36 GMT
Author: gnodet
Date: Mon Jun 25 00:57:35 2007
New Revision: 550405

URL: http://svn.apache.org/viewvc?view=rev&rev=550405
Log:
Update wrt to the latest changes in CXF Api, thx to Freeman Fang.

Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/pom.xml
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInInterceptor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/pom.xml?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/pom.xml (original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/pom.xml Mon
Jun 25 00:57:35 2007
@@ -30,13 +30,18 @@
   <groupId>org.apache.servicemix</groupId>
   <artifactId>servicemix-cxf-bc</artifactId>
   <packaging>jbi-component</packaging>
-  <name>ServiceMix :: File</name>
-  <description>A File component</description>
+  <name>ServiceMix :: CXF</name>
+  <description>A CXF component</description>
 
   <dependencies>
     <dependency>
       <groupId>org.apache.servicemix</groupId>
       <artifactId>servicemix-shared</artifactId>
+      <version>${servicemix-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.servicemix</groupId>
+      <artifactId>servicemix-services</artifactId>
       <version>${servicemix-version}</version>
     </dependency>
     <dependency>

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Mon Jun 25 00:57:35 2007
@@ -175,7 +175,7 @@
     protected class JbiInvokerInterceptor extends AbstractPhaseInterceptor<Message>
{
 
         public JbiInvokerInterceptor() {
-            setPhase(Phase.INVOKE);
+            super(Phase.INVOKE);
         }
 
         public void handleMessage(final Message message) throws Fault {
@@ -200,7 +200,7 @@
     
     protected static class JbiPostInvokerInterceptor extends AbstractPhaseInterceptor<Message>
{
         public JbiPostInvokerInterceptor() {
-            setPhase(Phase.POST_INVOKE);
+            super(Phase.POST_INVOKE);
             addBefore(OutgoingChainInterceptor.class.getName());
         }
 

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Mon Jun 25 00:57:35 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.servicemix.cxfbc;
 
+import javax.jbi.messaging.MessageExchange;
+
 import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 
 /**
@@ -25,4 +27,7 @@
  */
 public class CxfBcProvider extends ProviderEndpoint implements CxfBcEndpointType {
 
+    public void processExchange(MessageExchange exchange) {
+        
+    }
 }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInInterceptor.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInInterceptor.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInInterceptor.java
Mon Jun 25 00:57:35 2007
@@ -45,7 +45,7 @@
     public static final String OPERATION_MEP = "MEP";
     
     public JbiInInterceptor() {
-        setPhase(Phase.PRE_INVOKE);
+        super(Phase.PRE_INVOKE);
     }
     
     public void handleMessage(Message message) {

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Mon Jun 25 00:57:35 2007
@@ -37,6 +37,7 @@
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
 import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -56,7 +57,7 @@
 public class JbiInWsdl1Interceptor extends AbstractSoapInterceptor {
 
     public JbiInWsdl1Interceptor() {
-        setPhase(Phase.UNMARSHAL);
+        super(Phase.UNMARSHAL);
         addAfter(JbiOperationInterceptor.class.getName());
     }
     
@@ -104,7 +105,7 @@
         }
         Element body = getBodyElement(message);
         List<SoapHeaderInfo> headers = wsdlMessage.getExtensors(SoapHeaderInfo.class);
-        Element headerElement = message.getHeaders(Element.class);
+        List<Header> headerElement = message.getHeaders();
         List<Object> parts = new ArrayList<Object>();
         for (MessagePartInfo part : wsdlMessage.getMessageParts()) {
             if ("document".equals(style)) {
@@ -129,10 +130,10 @@
         if (headers != null) {
             for (SoapHeaderInfo header : headers) {
                 MessagePartInfo part = header.getPart();
-                Element param = findHeader(headerElement, part);
+                Header param = findHeader(headerElement, part);
                 int idx = part.getIndex();
                 QName element = part.getElementQName();
-                Element hdr = getHeaderElement(message, element);
+                Header hdr = getHeaderElement(message, element);
                 if (hdr == null) {
                     throw new Fault(new Exception("Missing required header element: "
                                 + QNameUtil.toString(element)));
@@ -190,7 +191,7 @@
         }
     }
     
-    protected Element getHeaderElement(SoapMessage message, QName name) {
+    protected Header getHeaderElement(SoapMessage message, QName name) {
         Exchange exchange = message.getExchange();
         BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
         if (bop.isUnwrapped()) {
@@ -206,11 +207,11 @@
         if (headers == null || headers.size() == 0) {
             return null;
         }
-        Element headerElement = message.getHeaders(Element.class);
+        List<Header> headerElement = message.getHeaders();
         for (SoapHeaderInfo header : headers) {
             if (header.getPart().getElementQName().equals(name)) {
                 MessagePartInfo mpi = header.getPart();
-                Element param = findHeader(headerElement, mpi);
+                Header param = findHeader(headerElement, mpi);
                 return param;
             }
         }
@@ -236,18 +237,16 @@
         }
     }
 
-    private static Element findHeader(Element headerElement, MessagePartInfo mpi) {
-        NodeList nodeList = headerElement.getChildNodes();
-        Element param = null;
-        if (nodeList != null) {
+    private static Header findHeader(List<Header> headerElement, MessagePartInfo mpi)
{
+        Header param = null;
+        if (headerElement != null) {
             QName name = mpi.getConcreteName();
-            for (int i = 0; i < nodeList.getLength(); i++) {
-                Node n = nodeList.item(i);
-                if (n.getNamespaceURI() != null 
-                        && n.getNamespaceURI().equals(name.getNamespaceURI())
-                        && n.getLocalName() != null
-                        && n.getLocalName().equals(name.getLocalPart())) {
-                    param = (Element) n;
+            for (Header header : headerElement) {
+                if (header.getName().getNamespaceURI() != null 
+                        && header.getName().getNamespaceURI().equals(name.getNamespaceURI())
+                        && header.getName().getLocalPart() != null
+                        && header.getName().getLocalPart().equals(name.getLocalPart()))
{
+                    param = header;
                 }
             }
         }

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
Mon Jun 25 00:57:35 2007
@@ -37,8 +37,7 @@
 public class JbiOperationInterceptor extends AbstractPhaseInterceptor<Message> {
 
     public JbiOperationInterceptor() {
-        super();
-        setPhase(Phase.UNMARSHAL);
+        super(Phase.UNMARSHAL);
         addAfter(URIMappingInterceptor.class.getName());
     }
 

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java?view=diff&rev=550405&r1=550404&r2=550405
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Mon Jun 25 00:57:35 2007
@@ -51,7 +51,7 @@
 public class JbiOutWsdl1Interceptor extends AbstractSoapInterceptor {
 
     public JbiOutWsdl1Interceptor() {
-        setPhase(Phase.MARSHAL);
+        super(Phase.MARSHAL);
     }
     
     public void handleMessage(SoapMessage message) {
@@ -89,7 +89,7 @@
             List<SoapHeaderInfo> headers = msg.getExtensors(SoapHeaderInfo.class);
             for (SoapHeaderInfo header : headers) {
                 NodeList nl = partsContent.get(header.getPart().getIndex());
-                Element headerElement = message.getHeaders(Element.class);
+                Element headerElement = message.get(Element.class);
                 for (int i = 0; i < nl.getLength(); i++) {
                     headerElement.appendChild(nl.item(i));
                 }



Mime
View raw message