cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r517600 - in /incubator/cxf/trunk/tools2: common/ common/src/main/resources/schemas/ common/src/main/resources/schemas/wsdl/ wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ wsdlto/frontend/jaxws/ wsdlto/f...
Date Tue, 13 Mar 2007 09:08:58 GMT
Author: ema
Date: Tue Mar 13 02:08:57 2007
New Revision: 517600

URL: http://svn.apache.org/viewvc?view=rev&rev=517600
Log:
* Move xml/jms schemas and wsdl extensions to tools/common 
* Remove tools/frontend/jaxws dependencies to rt/xml, rt/jms
* Fixed the Jaxb issue with generating enum class
* Fixed localization Messages.properties

Added:
    incubator/cxf/trunk/tools2/common/src/main/resources/schemas/
    incubator/cxf/trunk/tools2/common/src/main/resources/schemas/wsdl/
Modified:
    incubator/cxf/trunk/tools2/common/pom.xml
    incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/pom.xml
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/Messages.properties
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties

Modified: incubator/cxf/trunk/tools2/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/common/pom.xml?view=diff&rev=517600&r1=517599&r2=517600
==============================================================================
--- incubator/cxf/trunk/tools2/common/pom.xml (original)
+++ incubator/cxf/trunk/tools2/common/pom.xml Tue Mar 13 02:08:57 2007
@@ -101,5 +101,45 @@
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/tools2/common</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/tools2/common</developerConnection>
     </scm>
+    
+    <build>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.cxf</groupId>
+                    <artifactId>cxf-common-xsd</artifactId>
+                    <version>${project.version}</version>
+                    <executions>
+                        <execution>
+                            <id>generate-sources</id>
+                            <phase>generate-sources</phase>
+                            <configuration>
+                                <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                                <xsdOptions>
+                                    <xsdOption>
+                                        <xsd>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xsd</xsd>
+                                        <bindingFile>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xjb</bindingFile>
+                                        <deleteDirs>
+                                            <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                        </deleteDirs>
+                                    </xsdOption>
+                                    
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</xsd>
+                                    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+                                    <deleteDirs>
+                                        <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+                                    </deleteDirs>
+                                </xsdOption>
+                                    
+                                </xsdOptions>
+                            </configuration>
+                            <goals>
+                                <goal>xsdtojava</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+     </build>    
 
 </project>

Modified: incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?view=diff&rev=517600&r1=517599&r2=517600
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Tue Mar 13 02:08:57 2007
@@ -59,7 +59,6 @@
 import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 
-
 public class JAXBDataBinding implements DataBindingProfile {
     private static final Logger LOG = LogUtils.getL7dLogger(JAXBDataBinding.class);
     private static S2JJAXBModel rawJaxbModelGenCode;
@@ -74,31 +73,30 @@
         def = (Definition)env.get(Definition.class);
 
         SchemaCompilerImpl schemaCompiler = (SchemaCompilerImpl)XJC.createSchemaCompiler();
-        
-        
+
         ClassCollector classCollector = env.get(ClassCollector.class);
         ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classCollector);
         allocator.setInterface(serviceInfo.getInterface(), env.mapPackageName(def.getTargetNamespace()));
         schemaCompiler.setClassNameAllocator(allocator);
 
         JAXBBindErrorListener listener = new JAXBBindErrorListener(env);
-        schemaCompiler.setErrorListener(listener);        
-        //Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
+        schemaCompiler.setErrorListener(listener);
+        // Collection<SchemaInfo> schemas = serviceInfo.getSchemas();
         List<InputSource> jaxbBindings = env.getJaxbBindingFile();
-        Map<String, Element> schemaLists = 
-            (Map<String, Element>)serviceInfo.getProperty(WSDLServiceBuilder.WSDL_SCHEMA_ELEMENT_LIST);

-        Set<String> keys = schemaLists.keySet();  
-        for (String key : keys) {           
+        Map<String, Element> schemaLists = (Map<String, Element>)serviceInfo
+            .getProperty(WSDLServiceBuilder.WSDL_SCHEMA_ELEMENT_LIST);
+        Set<String> keys = schemaLists.keySet();
+        for (String key : keys) {
             Element ele = schemaLists.get(key);
             this.removeImportElement(ele);
-            String tns = ele.getAttribute("targetNamespace");              
-            
+            String tns = ele.getAttribute("targetNamespace");
+
             if (StringUtils.isEmpty(tns)) {
                 continue;
             }
-            
+
             String excludePkg = null;
-            
+
             if (env.hasExcludeNamespace(tns)) {
                 excludePkg = env.getExcludePackageName(tns);
                 if (excludePkg != null) {
@@ -107,98 +105,67 @@
                     env.getExcludePkgList().add(URIParserUtil.getPackageName(tns));
                 }
             }
-            
+
             String pkgName = null;
             if (env.hasNamespace(tns) || env.get(ToolConstants.CFG_PACKAGENAME) != null)
{
                 pkgName = env.mapPackageName(tns);
             }
-            
+
             pkgName = pkgName != null ? pkgName : excludePkg;
-                      
+
             if (pkgName != null) {
                 Node pkgNode = JAXBUtils.innerJaxbPackageBinding(ele, pkgName);
                 if (pkgNode != null) {
                     ele.appendChild(pkgNode);
                 }
             }
-           
+
             schemaCompiler.parseSchema(key, ele);
-            
+
         }
-        //After XmlSchema can be fixed , these codes will be used to 
-        //get schema elements
+        // After XmlSchema can be fixed , these codes will be used to
+        // get schema elements
         /*
-            for (SchemaInfo schema : schemas) {
-            Document[] docs = schema.getSchema().getAllSchemas();
-            for (int i = 0; i < docs.length; i++) {
-                Element ele = docs[i].getDocumentElement();
-                this.removeImportElement(ele);
-      
-                String systemId = schema.getElement().getBaseURI();
-                if (systemId == null) {
-                    systemId = def.getDocumentBaseURI();
-                }
-                String tns = ele.getAttribute("targetNamespace");              
-                
-                if (StringUtils.isEmpty(tns)) {
-                    continue;
-                }
-                 
-                if (sysIdSchemeMap.containsKey(schema.getElement().getBaseURI())) {
-                    systemId = schema.getElement().getBaseURI() + "#" + tns;
-                    int index = 0;
-                    while (sysIdSchemeMap.containsKey(systemId)) {
-                        systemId = systemId + index++;
-                    }
-                    
-                }
-                
-                sysIdSchemeMap.put(systemId, ele);
-                
-                String excludePkg = null;
-                
-                if (env.hasExcludeNamespace(tns)) {
-                    excludePkg = env.getExcludePackageName(tns);
-                    if (excludePkg != null) {
-                        env.getExcludePkgList().add(excludePkg);
-                    } else {
-                        env.getExcludePkgList().add(URIParserUtil.getPackageName(tns));
-                    }
-                }
-                
-                String pkgName = null;
-                if (env.hasNamespace(tns) || env.get(ToolConstants.CFG_PACKAGENAME) != null)
{
-                    pkgName = env.mapPackageName(tns);
-                }
-                
-                pkgName = pkgName != null ? pkgName : excludePkg;
-                          
-                if (pkgName != null) {
-                    Node pkgNode = JAXBUtils.innerJaxbPackageBinding(ele, pkgName);
-                    ele.appendChild(pkgNode);
-                }
-
-                schemaCompiler.parseSchema(systemId, ele);
-            }
-            
-        }*/
+         * for (SchemaInfo schema : schemas) { Document[] docs =
+         * schema.getSchema().getAllSchemas(); for (int i = 0; i < docs.length;
+         * i++) { Element ele = docs[i].getDocumentElement();
+         * this.removeImportElement(ele); String systemId =
+         * schema.getElement().getBaseURI(); if (systemId == null) { systemId =
+         * def.getDocumentBaseURI(); } String tns =
+         * ele.getAttribute("targetNamespace"); if (StringUtils.isEmpty(tns)) {
+         * continue; } if
+         * (sysIdSchemeMap.containsKey(schema.getElement().getBaseURI())) {
+         * systemId = schema.getElement().getBaseURI() + "#" + tns; int index =
+         * 0; while (sysIdSchemeMap.containsKey(systemId)) { systemId = systemId +
+         * index++; } } sysIdSchemeMap.put(systemId, ele); String excludePkg =
+         * null; if (env.hasExcludeNamespace(tns)) { excludePkg =
+         * env.getExcludePackageName(tns); if (excludePkg != null) {
+         * env.getExcludePkgList().add(excludePkg); } else {
+         * env.getExcludePkgList().add(URIParserUtil.getPackageName(tns)); } }
+         * String pkgName = null; if (env.hasNamespace(tns) ||
+         * env.get(ToolConstants.CFG_PACKAGENAME) != null) { pkgName =
+         * env.mapPackageName(tns); } pkgName = pkgName != null ? pkgName :
+         * excludePkg; if (pkgName != null) { Node pkgNode =
+         * JAXBUtils.innerJaxbPackageBinding(ele, pkgName);
+         * ele.appendChild(pkgNode); } schemaCompiler.parseSchema(systemId,
+         * ele); } }
+         */
 
         for (InputSource binding : jaxbBindings) {
             schemaCompiler.parseSchema(binding);
         }
 
         rawJaxbModelGenCode = schemaCompiler.bind();
-        //This bug is fixed in latest JAXB_RI
-        //addedEnumClassToCollector(schemas, allocator);
+
+        addedEnumClassToCollector(schemaLists, allocator);
     }
 
     // JAXB bug. JAXB ClassNameCollector may not be invoked when generated
     // class is an enum. We need to use this method to add the missed file
     // to classCollector.
-   /* private void addedEnumClassToCollector(Collection<SchemaInfo> schemaList, 
-                                           ClassNameAllocatorImpl allocator) {
-        for (SchemaInfo schema : schemaList) {
-            Element schemaElement = schema.getElement();
+    private void addedEnumClassToCollector(Map<String, Element> schemaList,
+        ClassNameAllocatorImpl allocator) {
+        for (Element schemaElement : schemaList.values()) {
             String targetNamespace = schemaElement.getAttribute("targetNamespace");
             if (StringUtils.isEmpty(targetNamespace)) {
                 continue;
@@ -208,8 +175,8 @@
                 allocator.assignClassName(packageName, "*");
             }
         }
-    }*/
-/*
+    }
+
     private boolean addedToClassCollector(String packageName) {
         ClassCollector classCollector = env.get(ClassCollector.class);
         List<String> files = (List<String>)classCollector.getGeneratedFileInfo();
@@ -222,7 +189,7 @@
         }
         return false;
     }
-*/
+
     public void generate(ToolContext context) throws ToolException {
         initialize(context);
         if (rawJaxbModelGenCode == null) {
@@ -282,9 +249,8 @@
             }
         }
         return null;
-    }   
-    
-    
+    }
+
     private void removeImportElement(Element element) {
         NodeList nodeList = element.getElementsByTagNameNS(ToolConstants.SCHEMA_URI, "import");
         List<Node> ns = new ArrayList<Node>();
@@ -297,15 +263,15 @@
             Node schemaNode = item.getParentNode();
             schemaNode.removeChild(item);
         }
-      
+
     }
-    
-    public  Node cloneNode(Document document, Node node, boolean deep) throws DOMException
{
+
+    public Node cloneNode(Document document, Node node, boolean deep) throws DOMException
{
         if (document == null || node == null) {
             return null;
         }
         int type = node.getNodeType();
-        
+
         if (node.getOwnerDocument() == document) {
             return node.cloneNode(deep);
         }
@@ -328,7 +294,7 @@
                     .getNodeValue());
             }
             break;
-       
+
         case Node.TEXT_NODE:
             clone = document.createTextNode(node.getNodeValue());
             break;

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/pom.xml?view=diff&rev=517600&r1=517599&r2=517600
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/pom.xml (original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/pom.xml Tue Mar 13 02:08:57 2007
@@ -59,18 +59,6 @@
 
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-bindings-xml</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-jms</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
             <artifactId>cxf-tools2-wsdlto-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -80,6 +68,8 @@
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws</developerConnection>
-    </scm>
+    </scm>   
+
+    
 
 </project>

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/Messages.properties?view=diff&rev=517600&r1=517599&r2=517600
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/Messages.properties
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/Messages.properties
Tue Mar 13 02:08:57 2007
@@ -18,23 +18,37 @@
 #    under the License.
 #
 #
-FAIL_TO_CREATE_WSDL_DEFINITION = Fail to create wsdl definition
-CREATE_JAXBRICONTEXT_EXCEPTION = Fail to create jaxbRIContext
-PART_ALREADY_EXIST = Follwoing part already exist : {0} 
-ENCODED_USE_NOT_SUPPORTED = Encoded use is not supported in java2wsdl tool
-CANNOT_CREATE_SCHEMA_FILE = Can not create schema file
-SOAPUSESTYLE_PARAMETERSTYLE_ERROR = {0} : soapbinding use style and parameter style should
be doc-wrapped/rpc-bare/doc-bare
-SEI_CLASS_NO_WEBSERVICE_ANNOTATED = SEI class should must annotated with @Webservice
-SEI_INTERFACE_NO_WEBSERVICE_ANNOTATED = SEI interface must be annotated with @Webservice
-SEI_CLASS_HASNO_PACKAGE = SEI class must be in a package
-DOC_BARE_METHOD_CRITERIA1 = Method  {0} : must have at most one in or in/out non_header in
Doc_bare method
-DOC_BARE_METHOD_CRITERIA2 = Method  {0} : has a return type of void it must have at most
one in/out or out-header parameter in Doc_bare method
-DOC_BARE_METHOD_CRITERIA3 = Method  {0} : if it has a return type of void it must have at
most one in/out or out-header parameter in Doc_bare method
-LOAD_CLASS_ERROR = Can Not Load class {0}
-FAIL_TO_BUILD_WSDLMODEL = Fail to build wsdl model
-GENERATE_TYPES_ERROR = Generate types error
-FAIL_TO_GET_JAXBINDINGNODE_FROM_JAXWSBINDING = Fail to get jaxb binding information from
jaxws binding file
-NO_INPUT_MESSAGE=Problem outputting method for {0} as no input message was found 
+PARAMETER_ALREADY_EXIST = Parameter : {0} already exist in the wsdl model
+EXCEPTION_ALREADY_EXIST = Exception : {0} already exist in the wsdl model
+MIMEPART_CANNOT_MAP = MIME part: {0} could not be mapped to available parts in portType!"
+WRAPPER_STYLE_TWO_RETURN_TYPES = Wrapper style can not have two return types
+CANNOT_FIND_WSDL = Can not find the wsdl from : {0}
+BINDING_SPECIFY_ONE_PROTOCOL = Binding : {0} must specify one protocol
+FAIL_TO_CREATE_DATABINDING_MODEL = Fail to create databinding model : {0}
 INVALID_MEP = Invalid WSDL,wsdl:operation: "{0}" is not request-response or one-way
+
+FAIL_TO_COMPILE_GENERATE_CODES = Fail to compile generated code
+FAIL_TO_COPY_GENERATED_RESOURCE_FILE = Fail to copy generated resource file
+FAIL_TO_WRITE_FILE = Fail to write file {0}
+FAIL_TO_CREATE_WSDL_DEFINITION = Fail to create wsdl definition {0}
+FAIL_TO_INITIALIZE_VELOCITY_ENGINE = Fail to initialize velocity engine
+SERVICE_PORT_EXIST = Input service and port already exist in imported contract
+BINDING_NOT_EXIST = Input binding does not exist in imported contract
+FAIL_TO_WRITE_WSDL = Fail to write wsdl file
+FAIL_TO_CLOSE_WSDL_FILE = Fail to close wsdl file
+BINDING_ALREADY_EXIST = Input binding already exist in imported contract
+PORTTYPE_NOT_EXIST = Input port type does not exist in imported contract
+SOAPBINDING_STYLE_NOT_PROVIEDED = For rpc style binding, soap binding namespace (-n) must
be provided
+FAIL_TO_CREATE_SOAPBINDING = Fail to create soapbinding
+FAIL_TO_CREATE_XMLBINDING = Fail to create xml binding
+FAIl_TO_CREATE_SOAPADDRESS = Fail to create soap address
+FAIl_TO_CREATE_PLUGINPROFILE = Fail to create PluginProfile
+
+SKIP_OVERLOADED_OPERATION=Skipping overloaded operation: {0}
+NO_INPUT_MESSAGE=Problem outputting method for {0} as no input message was found for input
named {1}
+FAIL_TO_GET_WSDL = Can not get WSDL location from {0} 
+BINDING_STYLE_NOT_DEFINED = Operation binding style must be defined 
+
+RPC_PART_ILLEGAL = Message Part {0} does not use type reference not confirm to RPC style
  
 
 

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties?view=diff&rev=517600&r1=517599&r2=517600
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
Tue Mar 13 02:08:57 2007
@@ -23,5 +23,7 @@
 FILE_NOT_EXIST = File does not exist : {0}
 NOT_A_FILE = {0} is not a file
 PARAMETER_MISSING = Required parameter is missing
+UNSUPPORTED_RPC_ENCODED = Rpc/encoded wsdls are not supported in JAXWS 2.0
+FAIL_TO_CREATE_WSDL_DEFINITION = Fail to create wsdl definition {0}
 
 



Mime
View raw message