You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/15 21:07:03 UTC
svn commit: r289289 [110/134] - in /webservices/axis2/trunk/java: ./ etc/
modules/addressing/ modules/addressing/src/META-INF/
modules/addressing/src/org/apache/axis2/handlers/addressing/
modules/addressing/test-resources/ modules/addressing/test/org/a...
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/DatabindingSupportClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/DatabindingSupportClassWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/DatabindingSupportClassWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/DatabindingSupportClassWriter.java Thu Sep 15 11:52:11 2005
@@ -1,87 +1,87 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-import java.util.Map;
-import java.util.Iterator;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-*
-*/
-
-public class DatabindingSupportClassWriter extends ClassWriter {
-
- private int databindingFramework = 0;
-
- public DatabindingSupportClassWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public DatabindingSupportClassWriter(File outputFileLocation,
- String language,
- int databindingFramework) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- this.databindingFramework = databindingFramework;
- }
-
- public void setDatabindingFramework(int databindingFramework) {
- this.databindingFramework = databindingFramework;
- }
-
- //overridden to get the correct behavior
- protected String findTemplate(Map languageSpecificPropertyMap) {
- String ownClazzName = this.getClass().getName();
- String key;
- String propertyValue;
- String templateName = null;
- Iterator keys = languageSpecificPropertyMap.keySet().iterator();
- String databindString;
-
- //set the correct databinding type string
- switch(this.databindingFramework) {
- case XSLTConstants.DataBindingTypes.XML_BEANS:
- databindString = "xmlbeans";
- break;
- case XSLTConstants.DataBindingTypes.JAXB:
- databindString = "jaxb";
- break;
- default:
- databindString = "default";
- }
-
- while (keys.hasNext()) {
- //check for template entries
- key = keys.next().toString();
- if (key.endsWith(TEMPLATE_SUFFIX)){
- // check if the class name is there
- propertyValue = languageSpecificPropertyMap.get(key).toString();
- if (propertyValue.startsWith(ownClazzName)){
- if (key.indexOf(databindString)!=-1){
- templateName = propertyValue.substring(propertyValue.indexOf(SEPERATOR_STRING)+1) ;
- break;
- }
- }
- }
-
- }
-
- return templateName;
-
- }
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+import java.util.Map;
+import java.util.Iterator;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+*
+*/
+
+public class DatabindingSupportClassWriter extends ClassWriter {
+
+ private int databindingFramework = 0;
+
+ public DatabindingSupportClassWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public DatabindingSupportClassWriter(File outputFileLocation,
+ String language,
+ int databindingFramework) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ this.databindingFramework = databindingFramework;
+ }
+
+ public void setDatabindingFramework(int databindingFramework) {
+ this.databindingFramework = databindingFramework;
+ }
+
+ //overridden to get the correct behavior
+ protected String findTemplate(Map languageSpecificPropertyMap) {
+ String ownClazzName = this.getClass().getName();
+ String key;
+ String propertyValue;
+ String templateName = null;
+ Iterator keys = languageSpecificPropertyMap.keySet().iterator();
+ String databindString;
+
+ //set the correct databinding type string
+ switch(this.databindingFramework) {
+ case XSLTConstants.DataBindingTypes.XML_BEANS:
+ databindString = "xmlbeans";
+ break;
+ case XSLTConstants.DataBindingTypes.JAXB:
+ databindString = "jaxb";
+ break;
+ default:
+ databindString = "default";
+ }
+
+ while (keys.hasNext()) {
+ //check for template entries
+ key = keys.next().toString();
+ if (key.endsWith(TEMPLATE_SUFFIX)){
+ // check if the class name is there
+ propertyValue = languageSpecificPropertyMap.get(key).toString();
+ if (propertyValue.startsWith(ownClazzName)){
+ if (key.indexOf(databindString)!=-1){
+ templateName = propertyValue.substring(propertyValue.indexOf(SEPERATOR_STRING)+1) ;
+ break;
+ }
+ }
+ }
+
+ }
+
+ return templateName;
+
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/DatabindingSupportClassWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceImplementationWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceImplementationWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceImplementationWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceImplementationWriter.java Thu Sep 15 11:52:11 2005
@@ -1,39 +1,39 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- *
- */
-
-public class InterfaceImplementationWriter extends ClassWriter {
- public InterfaceImplementationWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public InterfaceImplementationWriter(File outputFileLocation,
- String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-
-
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ *
+ */
+
+public class InterfaceImplementationWriter extends ClassWriter {
+ public InterfaceImplementationWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public InterfaceImplementationWriter(File outputFileLocation,
+ String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceImplementationWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceWriter.java Thu Sep 15 11:52:11 2005
@@ -1,38 +1,38 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-*
-*/
-
-public class InterfaceWriter extends ClassWriter {
-
-
- public InterfaceWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public InterfaceWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+*
+*/
+
+public class InterfaceWriter extends ClassWriter {
+
+
+ public InterfaceWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public InterfaceWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/InterfaceWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/LocalTestClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/LocalTestClassWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/LocalTestClassWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/LocalTestClassWriter.java Thu Sep 15 11:52:11 2005
@@ -1,37 +1,37 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- *
- */
-
-public class LocalTestClassWriter extends ClassWriter {
-
- public LocalTestClassWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public LocalTestClassWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ *
+ */
+
+public class LocalTestClassWriter extends ClassWriter {
+
+ public LocalTestClassWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public LocalTestClassWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/LocalTestClassWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/MessageReceiverWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/MessageReceiverWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/MessageReceiverWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/MessageReceiverWriter.java Thu Sep 15 11:52:11 2005
@@ -1,38 +1,38 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/**
- * @author chathura@opensource.lk
- */
-public class MessageReceiverWriter extends ClassWriter {
-
- public MessageReceiverWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public MessageReceiverWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class MessageReceiverWriter extends ClassWriter {
+
+ public MessageReceiverWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public MessageReceiverWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/MessageReceiverWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/ServiceXMLWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/ServiceXMLWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/ServiceXMLWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/ServiceXMLWriter.java Thu Sep 15 11:52:11 2005
@@ -1,49 +1,49 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-import org.apache.axis2.wsdl.util.FileWriter;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-*
-*/
-
-public class ServiceXMLWriter extends ClassWriter {
-
-
- public ServiceXMLWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public ServiceXMLWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-
- public void createOutFile(String packageName, String fileName) throws Exception {
- File outputFile = FileWriter.createClassFile(outputFileLocation,
- packageName,
- "services",
- ".xml");
- this.stream = new FileOutputStream(outputFile);
- }
-}
-
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+import org.apache.axis2.wsdl.util.FileWriter;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+*
+*/
+
+public class ServiceXMLWriter extends ClassWriter {
+
+
+ public ServiceXMLWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public ServiceXMLWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+
+ public void createOutFile(String packageName, String fileName) throws Exception {
+ File outputFile = FileWriter.createClassFile(outputFileLocation,
+ packageName,
+ "services",
+ ".xml");
+ this.stream = new FileOutputStream(outputFile);
+ }
+}
+
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/ServiceXMLWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/SkeletonWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/SkeletonWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/SkeletonWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/SkeletonWriter.java Thu Sep 15 11:52:11 2005
@@ -1,39 +1,39 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- *
- */
-
-public class SkeletonWriter extends ClassWriter {
-
-
- public SkeletonWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public SkeletonWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ *
+ */
+
+public class SkeletonWriter extends ClassWriter {
+
+
+ public SkeletonWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public SkeletonWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/SkeletonWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestClassWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestClassWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestClassWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestClassWriter.java Thu Sep 15 11:52:11 2005
@@ -1,37 +1,37 @@
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- *
- */
-
-public class TestClassWriter extends ClassWriter {
-
- public TestClassWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public TestClassWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-}
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ *
+ */
+
+public class TestClassWriter extends ClassWriter {
+
+ public TestClassWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public TestClassWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestClassWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestServiceXMLWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestServiceXMLWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestServiceXMLWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestServiceXMLWriter.java Thu Sep 15 11:52:11 2005
@@ -1,44 +1,44 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.util.FileWriter;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-/**
- * @author chathura@opensource.lk
- */
-public class TestServiceXMLWriter extends ServiceXMLWriter {
-
- public TestServiceXMLWriter(String outputFileLocation) {
- super(outputFileLocation);
- }
-
- public TestServiceXMLWriter(File outputFileLocation, String language) {
- super(outputFileLocation, language);
- }
-
- public void createOutFile(String packageName, String fileName) throws Exception {
- File outputFile = FileWriter.createClassFile(outputFileLocation,
- packageName,
- "testservice",
- ".xml");
- this.stream = new FileOutputStream(outputFile);
- }
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.util.FileWriter;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class TestServiceXMLWriter extends ServiceXMLWriter {
+
+ public TestServiceXMLWriter(String outputFileLocation) {
+ super(outputFileLocation);
+ }
+
+ public TestServiceXMLWriter(File outputFileLocation, String language) {
+ super(outputFileLocation, language);
+ }
+
+ public void createOutFile(String packageName, String fileName) throws Exception {
+ File outputFile = FileWriter.createClassFile(outputFileLocation,
+ packageName,
+ "testservice",
+ ".xml");
+ this.stream = new FileOutputStream(outputFile);
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestServiceXMLWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestSkeletonImplWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestSkeletonImplWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestSkeletonImplWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestSkeletonImplWriter.java Thu Sep 15 11:52:11 2005
@@ -1,39 +1,39 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.axis2.wsdl.codegen.writer;
-
-import org.apache.axis2.wsdl.codegen.XSLTConstants;
-
-import java.io.File;
-
-/**
- * @author chathura@opensource.lk
- */
-public class TestSkeletonImplWriter extends ClassWriter {
-
- public TestSkeletonImplWriter(String outputFileLocation) {
- this.outputFileLocation = new File(outputFileLocation);
- }
-
- public TestSkeletonImplWriter(File outputFileLocation, String language) {
- this.outputFileLocation = outputFileLocation;
- this.language = language;
- }
-
-
-
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.axis2.wsdl.codegen.writer;
+
+import org.apache.axis2.wsdl.codegen.XSLTConstants;
+
+import java.io.File;
+
+/**
+ * @author chathura@opensource.lk
+ */
+public class TestSkeletonImplWriter extends ClassWriter {
+
+ public TestSkeletonImplWriter(String outputFileLocation) {
+ this.outputFileLocation = new File(outputFileLocation);
+ }
+
+ public TestSkeletonImplWriter(File outputFileLocation, String language) {
+ this.outputFileLocation = outputFileLocation;
+ this.language = language;
+ }
+
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/writer/TestSkeletonImplWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/CSharpTypeMapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/CSharpTypeMapper.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/CSharpTypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/CSharpTypeMapper.java Thu Sep 15 11:52:11 2005
@@ -1,32 +1,32 @@
-package org.apache.axis2.wsdl.databinding;
-
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- * the C# type mapper
- */
-
-public class CSharpTypeMapper extends TypeMappingAdapter {
-
- /**
- * Creats a basic Csharp type mapper
- */
- public CSharpTypeMapper() {
- //Todo create the type mapping hastable here
- }
-
-
-}
+package org.apache.axis2.wsdl.databinding;
+
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ * the C# type mapper
+ */
+
+public class CSharpTypeMapper extends TypeMappingAdapter {
+
+ /**
+ * Creats a basic Csharp type mapper
+ */
+ public CSharpTypeMapper() {
+ //Todo create the type mapping hastable here
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/CSharpTypeMapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java Thu Sep 15 11:52:11 2005
@@ -1,47 +1,47 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.axis2.wsdl.databinding;
-
-import javax.xml.namespace.QName;
-
-/**
- * Copyright 2004,2005 The Apache Software Foundation.
- * <p/>
- * Licensed 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
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * 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.
- * <p/>
- * Default type mapper. Just a mock!
- */
-public class DefaultTypeMapper extends TypeMappingAdapter {
-
- public DefaultTypeMapper() {
- }
-
- public String getParameterName(QName qname) {
- return "omElement";
- }
-
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.axis2.wsdl.databinding;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * <p/>
+ * Licensed 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ * Default type mapper. Just a mock!
+ */
+public class DefaultTypeMapper extends TypeMappingAdapter {
+
+ public DefaultTypeMapper() {
+ }
+
+ public String getParameterName(QName qname) {
+ return "omElement";
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/DefaultTypeMapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/JavaTypeMapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/JavaTypeMapper.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/JavaTypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/JavaTypeMapper.java Thu Sep 15 11:52:11 2005
@@ -1,62 +1,62 @@
-package org.apache.axis2.wsdl.databinding;
-
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- * Java type mapper implementation. It adds the following default mappings
- * String xsd:string
- * Boolean xsd:boolean
- * boolean xsd:boolean
- * Double xsd:double
- * double xsd:double
- * Long xsd:long
- * long xsd:long
- * Float xsd:float
- * float xsd:float
- * Integer xsd:int
- * int xsd:int
- * Short xsd:short
- * short xsd:short
- * Byte xsd:byte
- * byte xsd:byte
- * BigDecimal xsd:decimal
- * GregorianCalendar xsd:timeInstant!
- * Date xsd:date
- * QName xsd:QName
-
- */
-
-public class JavaTypeMapper extends TypeMappingAdapter {
-
- public JavaTypeMapper() {
- //add the basic types to the table
-// this.map.put(new QName(XSD_SCHEMA_URL,"string"),String.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"boolean"),Boolean.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"double"),Double.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"long"),Long.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"float"),Float.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"int"),Integer.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"short"),Short.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"byte"),Byte.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"decimal"),BigDecimal.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"date"),Date.class.getName());
-// this.map.put(new QName(XSD_SCHEMA_URL,"QName"),QName.class.getName());
- }
-
- public String toString() {
- return this.map.toString();
- }
-}
+package org.apache.axis2.wsdl.databinding;
+
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ * Java type mapper implementation. It adds the following default mappings
+ * String xsd:string
+ * Boolean xsd:boolean
+ * boolean xsd:boolean
+ * Double xsd:double
+ * double xsd:double
+ * Long xsd:long
+ * long xsd:long
+ * Float xsd:float
+ * float xsd:float
+ * Integer xsd:int
+ * int xsd:int
+ * Short xsd:short
+ * short xsd:short
+ * Byte xsd:byte
+ * byte xsd:byte
+ * BigDecimal xsd:decimal
+ * GregorianCalendar xsd:timeInstant!
+ * Date xsd:date
+ * QName xsd:QName
+
+ */
+
+public class JavaTypeMapper extends TypeMappingAdapter {
+
+ public JavaTypeMapper() {
+ //add the basic types to the table
+// this.map.put(new QName(XSD_SCHEMA_URL,"string"),String.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"boolean"),Boolean.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"double"),Double.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"long"),Long.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"float"),Float.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"int"),Integer.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"short"),Short.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"byte"),Byte.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"decimal"),BigDecimal.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"date"),Date.class.getName());
+// this.map.put(new QName(XSD_SCHEMA_URL,"QName"),QName.class.getName());
+ }
+
+ public String toString() {
+ return this.map.toString();
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/JavaTypeMapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMapper.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMapper.java Thu Sep 15 11:52:11 2005
@@ -1,64 +1,64 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.axis2.wsdl.databinding;
-
-import javax.xml.namespace.QName;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-* Interface for the type mapping
-*/
-
-public interface TypeMapper {
- /**
- * Get the type mapping class
- *
- * @param qname name of the XML element to be mapped
- * @return a class that represents the particualr type
- */
- public String getTypeMapping(QName qname);
-
- /**
- * Get the parameter name
- *
- * @param qname name of the XML element to get a parameter
- * @return a unique parameter name
- */
- public String getParameterName(QName qname);
-
- /**
- * Adds a type mapping to the type mapper
- *
- * @param qname
- * @param value
- */
- public void addTypeMapping(QName qname, Object value);
-
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+package org.apache.axis2.wsdl.databinding;
+
+import javax.xml.namespace.QName;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+* Interface for the type mapping
+*/
+
+public interface TypeMapper {
+ /**
+ * Get the type mapping class
+ *
+ * @param qname name of the XML element to be mapped
+ * @return a class that represents the particualr type
+ */
+ public String getTypeMapping(QName qname);
+
+ /**
+ * Get the parameter name
+ *
+ * @param qname name of the XML element to get a parameter
+ * @return a unique parameter name
+ */
+ public String getParameterName(QName qname);
+
+ /**
+ * Adds a type mapping to the type mapper
+ *
+ * @param qname
+ * @param value
+ */
+ public void addTypeMapping(QName qname, Object value);
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java Thu Sep 15 11:52:11 2005
@@ -1,65 +1,65 @@
-package org.apache.axis2.wsdl.databinding;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-* Default abstract implementation of the type mapper
-*/
-
-public abstract class TypeMappingAdapter implements TypeMapper {
- protected static final String XSD_SCHEMA_URL = "http://www.w3.org/2001/XMLSchema";
- //hashmap that contains the type mappings
- protected HashMap map = new HashMap();
- //counter variable to generate unique parameter ID's
- protected int counter = 0;
- //Upper limit for the paramete count
- protected static final int UPPER_PARAM_LIMIT = 1000;
-
- /**
- * @see TypeMapper#getTypeMapping(javax.xml.namespace.QName)
- */
- public String getTypeMapping(QName qname) {
- if ((qname != null)) {
- Object o = map.get(qname);
- if (o != null) {
- return (String) o;
- } else {
- return "org.apache.axis2.om.OMElement";
- }
- }
-
- return null;
- }
-
- /**
- * @see TypeMapper#getParameterName(javax.xml.namespace.QName)
- */
- public String getParameterName(QName qname) {
- if (counter == UPPER_PARAM_LIMIT) {
- counter = 0;
- }
- return "param" + counter++;
- }
-
- /**
- * @see TypeMapper#addTypeMapping(javax.xml.namespace.QName, Object)
- */
- public void addTypeMapping(QName qname, Object value) {
- map.put(qname, value);
- }
-}
+package org.apache.axis2.wsdl.databinding;
+
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+* Default abstract implementation of the type mapper
+*/
+
+public abstract class TypeMappingAdapter implements TypeMapper {
+ protected static final String XSD_SCHEMA_URL = "http://www.w3.org/2001/XMLSchema";
+ //hashmap that contains the type mappings
+ protected HashMap map = new HashMap();
+ //counter variable to generate unique parameter ID's
+ protected int counter = 0;
+ //Upper limit for the paramete count
+ protected static final int UPPER_PARAM_LIMIT = 1000;
+
+ /**
+ * @see TypeMapper#getTypeMapping(javax.xml.namespace.QName)
+ */
+ public String getTypeMapping(QName qname) {
+ if ((qname != null)) {
+ Object o = map.get(qname);
+ if (o != null) {
+ return (String) o;
+ } else {
+ return "org.apache.axis2.om.OMElement";
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * @see TypeMapper#getParameterName(javax.xml.namespace.QName)
+ */
+ public String getParameterName(QName qname) {
+ if (counter == UPPER_PARAM_LIMIT) {
+ counter = 0;
+ }
+ return "param" + counter++;
+ }
+
+ /**
+ * @see TypeMapper#addTypeMapping(javax.xml.namespace.QName, Object)
+ */
+ public void addTypeMapping(QName qname, Object value) {
+ map.put(qname, value);
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/databinding/TypeMappingAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java Thu Sep 15 11:52:11 2005
@@ -1,130 +1,130 @@
-package org.apache.axis2.wsdl.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Enumeration;
-
-/**
- * Tries to load the properties from the config properties
- */
-public class ConfigPropertyFileLoader {
-
- private static String[] extensionClassNames;
- private static String[] thirdPartySchemaNames;
- private static String[] languageTypes;
- private static Map languageEmitterMap;
- private static String defaultLanguage;
- private static Map languageSpecificPropertiesMap;
-
-
- private static final String CODE_GEN_KEY = "codegen.extension";
- private static final String THIRD_PARTY_SCHEMA_KEY = "codegen.thirdparty.schema";
- private static final String LANGUAGE_TYPE_KEY = "codegen.languages";
- private static final String DEFAULT_LANGUAGE_TYPE_KEY = "codegen.languages.default";
- private static final String EMITTER_CLASS_KEY = "codegen.emitters";
-
- /* Note - Should be a non regular expression character. If not it should be properly escaped */
- private static final String SEPERATOR_CHAR = ",";
-
- static{
- try {
- InputStream stream = Object.class.getResourceAsStream("/org/apache/axis2/wsdl/codegen/codegen-config.properties");
- Properties props = new Properties();
- props.load(stream);
-
- //create a new map for the lang specific properties
- languageSpecificPropertiesMap = new HashMap();
-
- String tempString = props.getProperty(CODE_GEN_KEY);
- if (tempString!=null){
- extensionClassNames = tempString.split(SEPERATOR_CHAR);
-
- }
-
- tempString = props.getProperty(THIRD_PARTY_SCHEMA_KEY);
- if (tempString!=null){
- thirdPartySchemaNames = tempString.split(SEPERATOR_CHAR);
-
- }
-
- tempString = props.getProperty(LANGUAGE_TYPE_KEY);
- if (tempString!=null){
- languageTypes = tempString.split(SEPERATOR_CHAR);
-
- //load the language emitter map
- tempString = props.getProperty(EMITTER_CLASS_KEY);
- if (tempString==null){
- throw new Exception("No emitters found");
- }else{
- String[] tempClassNames = tempString.split(SEPERATOR_CHAR);
- //populate the map
- languageEmitterMap = new HashMap();
- for (int i = 0; i < tempClassNames.length; i++) {
- languageEmitterMap.put(languageTypes[i],tempClassNames[i]);
- }
-
- }
- }
-
- tempString = props.getProperty(DEFAULT_LANGUAGE_TYPE_KEY);
- if (null==tempString || !languageEmitterMap.containsKey(tempString) ){
- throw new Exception("Unknown Language specified for default!");
- }
- defaultLanguage = tempString;
-
- // run through the language specific properties and populate the
- // language specific property map
- //
- String languageType;
- String tempkey;
- HashMap langSpecificMap ;
- for (int i = 0; i < languageTypes.length; i++) {
- languageType = languageTypes[i];
- langSpecificMap = new HashMap();
- Enumeration keyEnum = props.keys();
- while (keyEnum.hasMoreElements()) {
- tempkey = keyEnum.nextElement().toString();
- if (tempkey.startsWith(languageType+".")){
- langSpecificMap.put(tempkey,props.get(tempkey));
- }
- }
- //now add this to the lang specific properties map
- languageSpecificPropertiesMap.put(languageType,langSpecificMap);
- }
-
-
- } catch (IOException e) {
- throw new RuntimeException(e);
- }catch (Exception e){
- throw new RuntimeException("Unknown Exception in loading the property file",e);
- }
-
- }
-
- public static String[] getExtensionClassNames() {
- return extensionClassNames;
- }
-
- public static String[] getThirdPartySchemaNames() {
- return thirdPartySchemaNames;
- }
-
- public static String[] getLanguageTypes() {
- return languageTypes;
- }
-
- public static Map getLanguageEmitterMap() {
- return languageEmitterMap;
- }
-
- public static String getDefaultLanguage() {
- return defaultLanguage;
- }
-
- public static Map getLanguageSpecificPropertiesMap() {
- return languageSpecificPropertiesMap;
- }
-}
+package org.apache.axis2.wsdl.util;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Enumeration;
+
+/**
+ * Tries to load the properties from the config properties
+ */
+public class ConfigPropertyFileLoader {
+
+ private static String[] extensionClassNames;
+ private static String[] thirdPartySchemaNames;
+ private static String[] languageTypes;
+ private static Map languageEmitterMap;
+ private static String defaultLanguage;
+ private static Map languageSpecificPropertiesMap;
+
+
+ private static final String CODE_GEN_KEY = "codegen.extension";
+ private static final String THIRD_PARTY_SCHEMA_KEY = "codegen.thirdparty.schema";
+ private static final String LANGUAGE_TYPE_KEY = "codegen.languages";
+ private static final String DEFAULT_LANGUAGE_TYPE_KEY = "codegen.languages.default";
+ private static final String EMITTER_CLASS_KEY = "codegen.emitters";
+
+ /* Note - Should be a non regular expression character. If not it should be properly escaped */
+ private static final String SEPERATOR_CHAR = ",";
+
+ static{
+ try {
+ InputStream stream = Object.class.getResourceAsStream("/org/apache/axis2/wsdl/codegen/codegen-config.properties");
+ Properties props = new Properties();
+ props.load(stream);
+
+ //create a new map for the lang specific properties
+ languageSpecificPropertiesMap = new HashMap();
+
+ String tempString = props.getProperty(CODE_GEN_KEY);
+ if (tempString!=null){
+ extensionClassNames = tempString.split(SEPERATOR_CHAR);
+
+ }
+
+ tempString = props.getProperty(THIRD_PARTY_SCHEMA_KEY);
+ if (tempString!=null){
+ thirdPartySchemaNames = tempString.split(SEPERATOR_CHAR);
+
+ }
+
+ tempString = props.getProperty(LANGUAGE_TYPE_KEY);
+ if (tempString!=null){
+ languageTypes = tempString.split(SEPERATOR_CHAR);
+
+ //load the language emitter map
+ tempString = props.getProperty(EMITTER_CLASS_KEY);
+ if (tempString==null){
+ throw new Exception("No emitters found");
+ }else{
+ String[] tempClassNames = tempString.split(SEPERATOR_CHAR);
+ //populate the map
+ languageEmitterMap = new HashMap();
+ for (int i = 0; i < tempClassNames.length; i++) {
+ languageEmitterMap.put(languageTypes[i],tempClassNames[i]);
+ }
+
+ }
+ }
+
+ tempString = props.getProperty(DEFAULT_LANGUAGE_TYPE_KEY);
+ if (null==tempString || !languageEmitterMap.containsKey(tempString) ){
+ throw new Exception("Unknown Language specified for default!");
+ }
+ defaultLanguage = tempString;
+
+ // run through the language specific properties and populate the
+ // language specific property map
+ //
+ String languageType;
+ String tempkey;
+ HashMap langSpecificMap ;
+ for (int i = 0; i < languageTypes.length; i++) {
+ languageType = languageTypes[i];
+ langSpecificMap = new HashMap();
+ Enumeration keyEnum = props.keys();
+ while (keyEnum.hasMoreElements()) {
+ tempkey = keyEnum.nextElement().toString();
+ if (tempkey.startsWith(languageType+".")){
+ langSpecificMap.put(tempkey,props.get(tempkey));
+ }
+ }
+ //now add this to the lang specific properties map
+ languageSpecificPropertiesMap.put(languageType,langSpecificMap);
+ }
+
+
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }catch (Exception e){
+ throw new RuntimeException("Unknown Exception in loading the property file",e);
+ }
+
+ }
+
+ public static String[] getExtensionClassNames() {
+ return extensionClassNames;
+ }
+
+ public static String[] getThirdPartySchemaNames() {
+ return thirdPartySchemaNames;
+ }
+
+ public static String[] getLanguageTypes() {
+ return languageTypes;
+ }
+
+ public static Map getLanguageEmitterMap() {
+ return languageEmitterMap;
+ }
+
+ public static String getDefaultLanguage() {
+ return defaultLanguage;
+ }
+
+ public static Map getLanguageSpecificPropertiesMap() {
+ return languageSpecificPropertiesMap;
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/ConfigPropertyFileLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/DefaultEntityResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/DefaultEntityResolver.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/DefaultEntityResolver.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/DefaultEntityResolver.java Thu Sep 15 11:52:11 2005
@@ -1,27 +1,27 @@
-/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-package org.apache.axis2.wsdl.util;
-
-import org.xml.sax.InputSource;
-
-public class DefaultEntityResolver implements org.xml.sax.EntityResolver {
- public DefaultEntityResolver() {
- }
-
- public InputSource resolveEntity(String publicId, String systemId) {
- return XMLUtils.getEmptyInputSource();
- }
-}
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.axis2.wsdl.util;
+
+import org.xml.sax.InputSource;
+
+public class DefaultEntityResolver implements org.xml.sax.EntityResolver {
+ public DefaultEntityResolver() {
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) {
+ return XMLUtils.getEmptyInputSource();
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/DefaultEntityResolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/FileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/FileWriter.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/FileWriter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/FileWriter.java Thu Sep 15 11:52:11 2005
@@ -1,72 +1,72 @@
-package org.apache.axis2.wsdl.util;
-
-
-import java.io.File;
-import java.io.IOException;
-
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed 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.
-*
-* File writer utility for writing out class files
-*/
-
-public class FileWriter {
-
- /**
- * Creates/ returns a file object
- *
- * @param rootLocation - Location to be written
- * @param packageName - package, can be '.' seperated
- * @param fileName name of the file
- * @param extension type of the file, java, csharp, cpp etc
- * @return the File that was created
- * @throws IOException
- * @throws Exception
- */
- public static File createClassFile(File rootLocation,
- String packageName,
- String fileName,
- String extension) throws IOException,
- Exception {
- File returnFile = null;
- File root = rootLocation;
-
- if (packageName != null) {
- String directoryNames[] = packageName.split("\\.");
- File tempFile = null;
- int length = directoryNames.length;
- for (int i = 0; i < length; i++) {
- tempFile = new File(root, directoryNames[i]);
- root = tempFile;
- if (!tempFile.exists()) {
- tempFile.mkdir();
- }
- }
- }
-
- if (!fileName.endsWith(extension)) {
- fileName = fileName + extension;
- }
-
- returnFile = new File(root, fileName);
-
- if (!returnFile.exists()) {
- returnFile.createNewFile();
- }
- return returnFile;
- }
-
-
-}
+package org.apache.axis2.wsdl.util;
+
+
+import java.io.File;
+import java.io.IOException;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+* File writer utility for writing out class files
+*/
+
+public class FileWriter {
+
+ /**
+ * Creates/ returns a file object
+ *
+ * @param rootLocation - Location to be written
+ * @param packageName - package, can be '.' seperated
+ * @param fileName name of the file
+ * @param extension type of the file, java, csharp, cpp etc
+ * @return the File that was created
+ * @throws IOException
+ * @throws Exception
+ */
+ public static File createClassFile(File rootLocation,
+ String packageName,
+ String fileName,
+ String extension) throws IOException,
+ Exception {
+ File returnFile = null;
+ File root = rootLocation;
+
+ if (packageName != null) {
+ String directoryNames[] = packageName.split("\\.");
+ File tempFile = null;
+ int length = directoryNames.length;
+ for (int i = 0; i < length; i++) {
+ tempFile = new File(root, directoryNames[i]);
+ root = tempFile;
+ if (!tempFile.exists()) {
+ tempFile.mkdir();
+ }
+ }
+ }
+
+ if (!fileName.endsWith(extension)) {
+ fileName = fileName + extension;
+ }
+
+ returnFile = new File(root, fileName);
+
+ if (!returnFile.exists()) {
+ returnFile.createNewFile();
+ }
+ return returnFile;
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/FileWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/URLProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/URLProcessor.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/URLProcessor.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/URLProcessor.java Thu Sep 15 11:52:11 2005
@@ -1,57 +1,57 @@
-package org.apache.axis2.wsdl.util;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- *
- */
-
-public class URLProcessor {
- public static final String DEFAULT_PACKAGE = "axis2";
-
- /**
- * Breaks a given url to a package
- * e.g. http://www.google.com/test will become
- * com.google.www
- *
- * @param url
- * @return
- */
- public static String getNameSpaceFromURL(String url) {
- String returnPackageName = "";
- String regularExpression = "//[\\w\\.]*";
- Pattern urlBreaker = Pattern.compile(regularExpression);
- Matcher matcher = urlBreaker.matcher(url);
- if (matcher.find()) {
- String s = matcher.group();
- s = s.replaceAll("//", "");
- String[] arrayOfItems = s.split("\\.");
- int length = arrayOfItems.length;
- for (int i = length; i > 0; i--) {
- returnPackageName =
- returnPackageName.concat(
- (i == length ? "" : ".") + arrayOfItems[i - 1]);
- }
- } else {
- returnPackageName = DEFAULT_PACKAGE;
- }
-
- return returnPackageName;
- }
-
-}
+package org.apache.axis2.wsdl.util;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ *
+ *
+ */
+
+public class URLProcessor {
+ public static final String DEFAULT_PACKAGE = "axis2";
+
+ /**
+ * Breaks a given url to a package
+ * e.g. http://www.google.com/test will become
+ * com.google.www
+ *
+ * @param url
+ * @return
+ */
+ public static String getNameSpaceFromURL(String url) {
+ String returnPackageName = "";
+ String regularExpression = "//[\\w\\.]*";
+ Pattern urlBreaker = Pattern.compile(regularExpression);
+ Matcher matcher = urlBreaker.matcher(url);
+ if (matcher.find()) {
+ String s = matcher.group();
+ s = s.replaceAll("//", "");
+ String[] arrayOfItems = s.split("\\.");
+ int length = arrayOfItems.length;
+ for (int i = length; i > 0; i--) {
+ returnPackageName =
+ returnPackageName.concat(
+ (i == length ? "" : ".") + arrayOfItems[i - 1]);
+ }
+ } else {
+ returnPackageName = DEFAULT_PACKAGE;
+ }
+
+ return returnPackageName;
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/URLProcessor.java
------------------------------------------------------------------------------
svn:eol-style = native