geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r488107 - in /geronimo/server/trunk/modules: geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
Date Mon, 18 Dec 2006 03:21:33 GMT
Author: dims
Date: Sun Dec 17 19:21:32 2006
New Revision: 488107

URL: http://svn.apache.org/viewvc?view=rev&rev=488107
Log:
drilldown into JAXBElement to extract the WebservicesType object, set default transport id
(causes NPE if absent)

Modified:
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java?view=diff&rev=488107&r1=488106&r2=488107
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Sun Dec 17 19:21:32 2006
@@ -99,7 +99,11 @@
             }
 
             Unmarshaller unmarshaller = ctx.createUnmarshaller();
-            Object obj = unmarshaller.unmarshal(in);
+            Object obj = unmarshaller.unmarshal(new javax.xml.transform.stream.StreamSource(in),
WebservicesType.class);
+
+            if (obj instanceof JAXBElement) {
+                obj = ((JAXBElement)obj).getValue();
+            }
 
             if (!(obj instanceof WebservicesType)) {
                 return map;

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java?view=diff&rev=488107&r1=488106&r2=488107
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/CXFWebServiceContainer.java
Sun Dec 17 19:21:32 2006
@@ -23,6 +23,9 @@
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.geronimo.webservices.WebServiceContainer;
 
+import java.util.List;
+import java.util.ArrayList;
+
 //TODO consider putting most of this in the CXFWebServiceContaInerFactoryGBean
 public class CXFWebServiceContainer implements WebServiceContainer {
 
@@ -33,8 +36,13 @@
     public CXFWebServiceContainer(PortInfo portInfo, Object target, Bus bus) {
         //TODO actually use portInfo
         this.bus = bus;
+
+        List ids = new ArrayList();
+        ids.add("http://schemas.xmlsoap.org/wsdl/soap/http");
+
         DestinationFactoryManager destinationFactoryManager = bus.getExtension(DestinationFactoryManager.class);
-        DestinationFactory factory = new GeronimoDestinationFactory(bus);
+        GeronimoDestinationFactory factory = new GeronimoDestinationFactory(bus);
+        factory.setTransportIds(ids);
         destinationFactoryManager.registerDestinationFactory("http://cxf.apache.org/transports/http/configuration",
factory);
         destinationFactoryManager.registerDestinationFactory("http://www.w3.org/2003/05/soap/bindings/HTTP/",
factory);
         destinationFactoryManager.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http",
factory);



Mime
View raw message