cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r439965 - in /incubator/cxf/trunk: api/src/test/java/org/apache/cxf/wsdl/ api/src/test/resources/wsdl/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/core/src/main/resources/META-INF/
Date Mon, 04 Sep 2006 07:29:06 GMT
Author: tli
Date: Mon Sep  4 00:29:06 2006
New Revision: 439965

URL: http://svn.apache.org/viewvc?view=rev&rev=439965
Log:
remove objectweb.org namespace, fix mapping bug in wsdl extension

Modified:
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
    incubator/cxf/trunk/api/src/test/resources/wsdl/hello_world_xml_bare.wsdl
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/resources/META-INF/extensions.xml

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java?view=diff&rev=439965&r1=439964&r2=439965
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
(original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
Mon Sep  4 00:29:06 2006
@@ -77,7 +77,7 @@
 
         wsdlDefinition = wsdlReader.readWSDL(file);
 
-        Binding b = wsdlDefinition.getBinding(new QName("http://objectweb.org/hello_world_xml_http/bare",
+        Binding b = wsdlDefinition.getBinding(new QName("http://apache.org/hello_world_xml_http/bare",
                         "Greeter_XMLBinding"));
         BindingOperation bo = b.getBindingOperation("sayHi", null, null);
         BindingInput bi = bo.getBindingInput();

Modified: incubator/cxf/trunk/api/src/test/resources/wsdl/hello_world_xml_bare.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/resources/wsdl/hello_world_xml_bare.wsdl?view=diff&rev=439965&r1=439964&r2=439965
==============================================================================
--- incubator/cxf/trunk/api/src/test/resources/wsdl/hello_world_xml_bare.wsdl (original)
+++ incubator/cxf/trunk/api/src/test/resources/wsdl/hello_world_xml_bare.wsdl Mon Sep  4 00:29:06
2006
@@ -1,15 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="HelloWorld" targetNamespace="http://objectweb.org/hello_world_xml_http/bare"

+<!--
+  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.
+-->
+
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_xml_http/bare"

 		  xmlns="http://schemas.xmlsoap.org/wsdl/"
 		  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
 		  xmlns:xformat="http://cxf.apache.org/bindings/xformat" 
-		  xmlns:tns="http://objectweb.org/hello_world_xml_http/bare"
-		  xmlns:x1="http://objectweb.org/hello_world_xml_http/bare/types"
+		  xmlns:tns="http://apache.org/hello_world_xml_http/bare"
+		  xmlns:x1="http://apache.org/hello_world_xml_http/bare/types"
 		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 		  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   
   <wsdl:types>
-    <schema targetNamespace="http://objectweb.org/hello_world_xml_http/bare/types" 
+    <schema targetNamespace="http://apache.org/hello_world_xml_http/bare/types" 
 	    xmlns="http://www.w3.org/2001/XMLSchema" 
 	    elementFormDefault="qualified">
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?view=diff&rev=439965&r1=439964&r2=439965
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Mon
Sep  4 00:29:06 2006
@@ -19,12 +19,12 @@
 
 package org.apache.cxf.wsdl11;
 
-
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Iterator;
 import java.util.Properties;
+import java.util.StringTokenizer;
 import java.util.WeakHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -52,8 +52,8 @@
  */
 public class WSDLManagerImpl implements WSDLManager {
 
-    private static final Logger LOG = LogUtils
-            .getL7dLogger(WSDLManagerImpl.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(WSDLManagerImpl.class);
+
     private static final String EXTENSIONS_RESOURCE = "META-INF/extensions.xml";
 
     final ExtensionRegistry registry;
@@ -61,7 +61,7 @@
     final WSDLFactory factory;
 
     final WeakHashMap<Object, Definition> definitionsMap;
-    
+
     public WSDLManagerImpl() throws BusException {
         try {
             factory = WSDLFactory.newInstance();
@@ -70,7 +70,7 @@
             throw new BusException(e);
         }
         definitionsMap = new WeakHashMap<Object, Definition>();
-        
+
         registerInitialExtensions();
     }
 
@@ -82,7 +82,7 @@
      * (non-Javadoc)
      * 
      * XXX - getExtensionRegistry()
-     *
+     * 
      * @see org.apache.cxf.wsdl.WSDLManager#getExtenstionRegistry()
      */
     public ExtensionRegistry getExtenstionRegistry() {
@@ -138,11 +138,11 @@
     }
 
     public Definition getDefinition(Class<?> sei) throws WSDLException {
-        
+
         if (null == sei.getAnnotation(WebService.class)) {
             return null;
         }
-        
+
         synchronized (definitionsMap) {
             if (definitionsMap.containsKey(sei)) {
                 return definitionsMap.get(sei);
@@ -151,22 +151,22 @@
         Definition def = null;
         try {
             def = createDefinition(sei);
-        } catch (Exception ex) {            
+        } catch (Exception ex) {
             throw new WSDLException(WSDLException.PARSER_ERROR, ex.getMessage());
         }
-        
+
         synchronized (definitionsMap) {
             definitionsMap.put(sei, def);
         }
         return def;
     }
-    
+
     public void addDefinition(Object key, Definition wsdl) {
         synchronized (definitionsMap) {
             definitionsMap.put(key, wsdl);
         }
     }
-    
+
     private Definition loadDefinition(String url) throws WSDLException {
         WSDLReader reader = factory.newWSDLReader();
         reader.setFeature("javax.wsdl.verbose", false);
@@ -203,7 +203,7 @@
         try {
             int result = 0;
             org.apache.cxf.tools.java2wsdl.JavaToWSDL.runTool(new String[] {"-o",
-                    tmp.getPath() + "/tmp.wsdl", sei.getName() });            
+                            tmp.getPath() + "/tmp.wsdl", sei.getName() });
             if (0 != result) {
                 LOG.log(Level.SEVERE, "WSDL_GENERATION_BAD_RESULT_MSG", result);
                 return null;
@@ -230,8 +230,7 @@
                 LOG.severe("WSDL_SCHEMA_GENERATION_FAILURE_MSG");
                 return null;
             } else if (LOG.isLoggable(Level.INFO)) {
-                LOG.info("Generated " + wsdl.getPath() + " and "
-                        + schema.getPath());
+                LOG.info("Generated " + wsdl.getPath() + " and " + schema.getPath());
             }
 
             /*
@@ -244,8 +243,8 @@
              * LOG.log(Level.SEVERE, "WSDL_UNREADABLE_MSG", ex); }
              */
 
-            // definition = org.apache.cxf.tools.java2wsdl.JavaToWSDL.getDefinition();
-
+            // definition =
+            // org.apache.cxf.tools.java2wsdl.JavaToWSDL.getDefinition();
         } finally {
             class Directory {
                 private final File dir;
@@ -272,26 +271,23 @@
 
         return definition;
     }
-    
+
     private void registerInitialExtensions() throws BusException {
         Properties initialExtensions = null;
         try {
-            initialExtensions = PropertiesLoaderUtils
-                .loadAllProperties(EXTENSIONS_RESOURCE, Thread.currentThread()
-                    .getContextClassLoader());
+            initialExtensions = PropertiesLoaderUtils.loadAllProperties(EXTENSIONS_RESOURCE,
Thread
+                            .currentThread().getContextClassLoader());
         } catch (IOException ex) {
             throw new BusException(ex);
         }
-        
+
         for (Iterator it = initialExtensions.keySet().iterator(); it.hasNext();) {
-            String parentType = (String)it.next();
-            String elementType = initialExtensions.getProperty(parentType);
-            
+            StringTokenizer st = new StringTokenizer(initialExtensions.getProperty((String)
it.next()), "=");
+            String parentType = st.nextToken();
+            String elementType = st.nextToken();
             try {
-                JAXBExtensionHelper.addExtensions(registry, 
-                                                  parentType, 
-                                                  elementType, 
-                                                  getClass().getClassLoader());
+                JAXBExtensionHelper.addExtensions(registry, parentType, elementType, getClass()
+                                .getClassLoader());
             } catch (ClassNotFoundException ex) {
                 LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
             } catch (JAXBException ex) {

Modified: incubator/cxf/trunk/rt/core/src/main/resources/META-INF/extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/resources/META-INF/extensions.xml?view=diff&rev=439965&r1=439964&r2=439965
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/resources/META-INF/extensions.xml (original)
+++ incubator/cxf/trunk/rt/core/src/main/resources/META-INF/extensions.xml Mon Sep  4 00:29:06
2006
@@ -19,9 +19,9 @@
 -->
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 <properties>
-    <entry key="javax.wsdl.BindingInput">org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
-    <entry key="javax.wsdl.BindingOutput">org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
-    <entry key="javax.wsdl.Port">org.apache.cxf.transports.jms.JMSAddressPolicyType</entry>
-	<entry key="javax.wsdl.Port">org.apache.cxf.transports.jms.JMSClientBehaviorPolicyType</entry>
-	<entry key="javax.wsdl.Port">org.apache.cxf.transports.jms.JMSServerBehaviorPolicyType</entry>
+    <entry key="1">javax.wsdl.BindingInput=org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
+    <entry key="2">javax.wsdl.BindingOutput=org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
+    <entry key="3">javax.wsdl.Port=org.apache.cxf.transports.jms.JMSAddressPolicyType</entry>
+	<entry key="4">javax.wsdl.Port=org.apache.cxf.transports.jms.JMSClientBehaviorPolicyType</entry>
+	<entry key="5">javax.wsdl.Port=org.apache.cxf.transports.jms.JMSServerBehaviorPolicyType</entry>
 </properties>



Mime
View raw message