cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r528592 - in /incubator/cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Date Fri, 13 Apr 2007 19:03:34 GMT
Author: dandiep
Date: Fri Apr 13 12:03:33 2007
New Revision: 528592

URL: http://svn.apache.org/viewvc?view=rev&rev=528592
Log:
Get the SOAPAction from the Wrapped operation always. Also, add some helpful debugging info
to DynamicClientFactory.

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java?view=diff&rev=528592&r1=528591&r2=528592
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInterceptor.java
Fri Apr 13 12:03:33 2007
@@ -52,6 +52,12 @@
         List<String> value = new ArrayList<String>();
         
         BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
+        
+        // The soap action is set on the wrapped operation.
+        if (boi != null && boi.isUnwrapped()) {
+            boi = boi.getWrappedOperation();
+        }
+        
         if (boi == null) {
             value.add("\"\"");
         } else {

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?view=diff&rev=528592&r1=528591&r2=528592
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Fri Apr 13 12:03:33 2007
@@ -43,6 +43,7 @@
 import org.xml.sax.SAXParseException;
 
 import com.sun.codemodel.JCodeModel;
+import com.sun.codemodel.JDefinedClass;
 import com.sun.codemodel.JPackage;
 import com.sun.codemodel.writer.FileCodeWriter;
 import com.sun.tools.xjc.Options;
@@ -145,6 +146,7 @@
 
     public Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName
port) {
         URL u = composeUrl(wsdlUrl);
+        LOG.log(Level.FINE, "Creating client from URL " + u.toString());
         ClientImpl client = new ClientImpl(bus, u, service, port);
 
         Service svc = client.getEndpoint().getService();
@@ -175,7 +177,8 @@
             }
             sb.append(packadge.name());
         }
-
+        outputDebug(codeModel);
+        
         String packageList = sb.toString();
 
         // our hashcode + timestamp ought to be enough.
@@ -239,6 +242,30 @@
         // delete the classes files
         FileUtils.removeDir(classes);
         return client;
+    }
+
+    private void outputDebug(JCodeModel codeModel) {
+        if (!LOG.isLoggable(Level.INFO)) {
+            return;
+        }
+        
+        StringBuffer sb = new StringBuffer();
+        boolean first = true;
+        for (Iterator<JPackage> itr = codeModel.packages(); itr.hasNext();) {
+            JPackage package1 = itr.next();
+            
+            for (Iterator<JDefinedClass> citr = package1.classes(); citr.hasNext();)
{
+                if (!first) {
+                    sb.append(", ");
+                } else {
+                    first = false;
+                }
+                sb.append(citr.next().fullName());
+            }
+        }
+        
+        LOG.log(Level.INFO, "Created classes: " + sb.toString());
+        
     }
 
     private void addSchemas(String wsdlUrl, Collection<SchemaInfo> schemas, SchemaCompiler
compiler) {



Mime
View raw message