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 2004/10/28 16:04:35 UTC
cvs commit: ws-axis/java/src/org/apache/axis/enum Scope.java Style.java Use.java
dims 2004/10/28 07:04:35
Modified: java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
java/src/org/apache/axis/enum Scope.java Style.java Use.java
Added: java/src/org/apache/axis/constants Scope.java Style.java
Use.java
Log:
Fix for AXIS-1602 - Stub file from wsdl2java makes something wrong in J2SE5.0
Notes:
- The new package org.apache.axis.constants is used instead of org.apache.axis.enum in the generated code.
- All classes in org.apache.axis.constants are just simple wrappers ("extends") around the ones in org.apache.axis.enum
Revision Changes Path
1.138 +6 -6 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
Index: JavaStubWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- JavaStubWriter.java 12 Oct 2004 23:15:30 -0000 1.137
+++ JavaStubWriter.java 28 Oct 2004 14:04:35 -0000 1.138
@@ -92,12 +92,12 @@
static Map uses = new HashMap();
static {
- styles.put(Style.DOCUMENT, "org.apache.axis.enum.Style.DOCUMENT");
- styles.put(Style.RPC, "org.apache.axis.enum.Style.RPC");
- styles.put(Style.MESSAGE, "org.apache.axis.enum.Style.MESSAGE");
- styles.put(Style.WRAPPED, "org.apache.axis.enum.Style.WRAPPED");
- uses.put(Use.ENCODED, "org.apache.axis.enum.Use.ENCODED");
- uses.put(Use.LITERAL, "org.apache.axis.enum.Use.LITERAL");
+ styles.put(Style.DOCUMENT, "org.apache.axis.constants.Style.DOCUMENT");
+ styles.put(Style.RPC, "org.apache.axis.constants.Style.RPC");
+ styles.put(Style.MESSAGE, "org.apache.axis.constants.Style.MESSAGE");
+ styles.put(Style.WRAPPED, "org.apache.axis.constants.Style.WRAPPED");
+ uses.put(Use.ENCODED, "org.apache.axis.constants.Use.ENCODED");
+ uses.put(Use.LITERAL, "org.apache.axis.constants.Use.LITERAL");
}
/** Field OPERDESC_PER_BLOCK */
1.1 ws-axis/java/src/org/apache/axis/constants/Scope.java
Index: Scope.java
===================================================================
/*
* 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.axis.constants;
/**
* Simple wrapper around org.apache.axis.enum.Scope
* @author dims@yahoo.com
*/
public class Scope extends org.apache.axis.enum.Scope {
}
1.1 ws-axis/java/src/org/apache/axis/constants/Style.java
Index: Style.java
===================================================================
/*
* 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.axis.constants;
import org.apache.axis.deployment.wsdd.WSDDConstants;
import javax.xml.namespace.QName;
/**
* Simple wrapper around org.apache.axis.enum.Style
* @author dims@yahoo.com
*/
public class Style extends org.apache.axis.enum.Style {
}
1.1 ws-axis/java/src/org/apache/axis/constants/Use.java
Index: Use.java
===================================================================
/*
* 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.axis.constants;
/**
* Simple wrapper around org.apache.axis.enum.Use
* @author dims@yahoo.com
*/
public class Use extends org.apache.axis.enum.Use {
};
1.11 +5 -1 ws-axis/java/src/org/apache/axis/enum/Scope.java
Index: Scope.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Scope.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Scope.java 18 Apr 2004 18:07:36 -0000 1.10
+++ Scope.java 28 Oct 2004 14:04:35 -0000 1.11
@@ -96,4 +96,8 @@
private Scope(int value, String name) {
super(type, value, name);
}
-};
+
+ protected Scope() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ }
+}
1.11 +6 -1 ws-axis/java/src/org/apache/axis/enum/Style.java
Index: Style.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Style.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Style.java 25 Feb 2004 14:02:39 -0000 1.10
+++ Style.java 28 Oct 2004 14:04:35 -0000 1.11
@@ -159,4 +159,9 @@
super(type, value, name);
this.provider = provider;
}
-};
+
+ protected Style() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ this.provider = DEFAULT.getProvider();
+ }
+}
1.8 +6 -1 ws-axis/java/src/org/apache/axis/enum/Use.java
Index: Use.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Use.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Use.java 25 Feb 2004 14:02:39 -0000 1.7
+++ Use.java 28 Oct 2004 14:04:35 -0000 1.8
@@ -99,4 +99,9 @@
super(type, value, name);
this.encoding = encoding;
}
-};
+
+ protected Use() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ this.encoding = DEFAULT.getEncoding();
+ }
+}
Axis with J2SE 1.5 (Re: cvs commit: ws-axis/java/src/org/apache/axis/enum Scope.java Style.java Use.java)
Posted by Davanum Srinivas <da...@gmail.com>.
Any objections to this change? This serves 2 purposes. the generated
code can be compile in J2SE w/o any problems AND will prevent power
users like Beehive's WSM to come up with ugly workaround (see
EnumWrapper in http://svn.apache.org/viewcvs.cgi/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/badtiger/)
-- dims
On 28 Oct 2004 14:04:35 -0000, dims@apache.org <di...@apache.org> wrote:
> dims 2004/10/28 07:04:35
>
> Modified: java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
> java/src/org/apache/axis/enum Scope.java Style.java Use.java
> Added: java/src/org/apache/axis/constants Scope.java Style.java
> Use.java
> Log:
> Fix for AXIS-1602 - Stub file from wsdl2java makes something wrong in J2SE5.0
>
> Notes:
> - The new package org.apache.axis.constants is used instead of org.apache.axis.enum in the generated code.
> - All classes in org.apache.axis.constants are just simple wrappers ("extends") around the ones in org.apache.axis.enum
>
> Revision Changes Path
> 1.138 +6 -6 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
>
> Index: JavaStubWriter.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
> retrieving revision 1.137
> retrieving revision 1.138
> diff -u -r1.137 -r1.138
> --- JavaStubWriter.java 12 Oct 2004 23:15:30 -0000 1.137
> +++ JavaStubWriter.java 28 Oct 2004 14:04:35 -0000 1.138
> @@ -92,12 +92,12 @@
> static Map uses = new HashMap();
>
> static {
> - styles.put(Style.DOCUMENT, "org.apache.axis.enum.Style.DOCUMENT");
> - styles.put(Style.RPC, "org.apache.axis.enum.Style.RPC");
> - styles.put(Style.MESSAGE, "org.apache.axis.enum.Style.MESSAGE");
> - styles.put(Style.WRAPPED, "org.apache.axis.enum.Style.WRAPPED");
> - uses.put(Use.ENCODED, "org.apache.axis.enum.Use.ENCODED");
> - uses.put(Use.LITERAL, "org.apache.axis.enum.Use.LITERAL");
> + styles.put(Style.DOCUMENT, "org.apache.axis.constants.Style.DOCUMENT");
> + styles.put(Style.RPC, "org.apache.axis.constants.Style.RPC");
> + styles.put(Style.MESSAGE, "org.apache.axis.constants.Style.MESSAGE");
> + styles.put(Style.WRAPPED, "org.apache.axis.constants.Style.WRAPPED");
> + uses.put(Use.ENCODED, "org.apache.axis.constants.Use.ENCODED");
> + uses.put(Use.LITERAL, "org.apache.axis.constants.Use.LITERAL");
> }
>
> /** Field OPERDESC_PER_BLOCK */
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Scope.java
>
> Index: Scope.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Scope
> * @author dims@yahoo.com
> */
> public class Scope extends org.apache.axis.enum.Scope {
> }
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Style.java
>
> Index: Style.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> import org.apache.axis.deployment.wsdd.WSDDConstants;
>
> import javax.xml.namespace.QName;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Style
> * @author dims@yahoo.com
> */
> public class Style extends org.apache.axis.enum.Style {
> }
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Use.java
>
> Index: Use.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Use
> * @author dims@yahoo.com
> */
> public class Use extends org.apache.axis.enum.Use {
> };
>
> 1.11 +5 -1 ws-axis/java/src/org/apache/axis/enum/Scope.java
>
> Index: Scope.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Scope.java,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -r1.10 -r1.11
> --- Scope.java 18 Apr 2004 18:07:36 -0000 1.10
> +++ Scope.java 28 Oct 2004 14:04:35 -0000 1.11
> @@ -96,4 +96,8 @@
> private Scope(int value, String name) {
> super(type, value, name);
> }
> -};
> +
> + protected Scope() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + }
> +}
>
> 1.11 +6 -1 ws-axis/java/src/org/apache/axis/enum/Style.java
>
> Index: Style.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Style.java,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -r1.10 -r1.11
> --- Style.java 25 Feb 2004 14:02:39 -0000 1.10
> +++ Style.java 28 Oct 2004 14:04:35 -0000 1.11
> @@ -159,4 +159,9 @@
> super(type, value, name);
> this.provider = provider;
> }
> -};
> +
> + protected Style() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + this.provider = DEFAULT.getProvider();
> + }
> +}
>
> 1.8 +6 -1 ws-axis/java/src/org/apache/axis/enum/Use.java
>
> Index: Use.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Use.java,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -r1.7 -r1.8
> --- Use.java 25 Feb 2004 14:02:39 -0000 1.7
> +++ Use.java 28 Oct 2004 14:04:35 -0000 1.8
> @@ -99,4 +99,9 @@
> super(type, value, name);
> this.encoding = encoding;
> }
> -};
> +
> + protected Use() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + this.encoding = DEFAULT.getEncoding();
> + }
> +}
>
>
--
Davanum Srinivas - http://webservices.apache.org/~dims/
Axis with J2SE 1.5 (Re: cvs commit: ws-axis/java/src/org/apache/axis/enum Scope.java Style.java Use.java)
Posted by Davanum Srinivas <da...@gmail.com>.
Any objections to this change? This serves 2 purposes. the generated
code can be compile in J2SE w/o any problems AND will prevent power
users like Beehive's WSM to come up with ugly workaround (see
EnumWrapper in http://svn.apache.org/viewcvs.cgi/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/badtiger/)
-- dims
On 28 Oct 2004 14:04:35 -0000, dims@apache.org <di...@apache.org> wrote:
> dims 2004/10/28 07:04:35
>
> Modified: java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
> java/src/org/apache/axis/enum Scope.java Style.java Use.java
> Added: java/src/org/apache/axis/constants Scope.java Style.java
> Use.java
> Log:
> Fix for AXIS-1602 - Stub file from wsdl2java makes something wrong in J2SE5.0
>
> Notes:
> - The new package org.apache.axis.constants is used instead of org.apache.axis.enum in the generated code.
> - All classes in org.apache.axis.constants are just simple wrappers ("extends") around the ones in org.apache.axis.enum
>
> Revision Changes Path
> 1.138 +6 -6 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
>
> Index: JavaStubWriter.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
> retrieving revision 1.137
> retrieving revision 1.138
> diff -u -r1.137 -r1.138
> --- JavaStubWriter.java 12 Oct 2004 23:15:30 -0000 1.137
> +++ JavaStubWriter.java 28 Oct 2004 14:04:35 -0000 1.138
> @@ -92,12 +92,12 @@
> static Map uses = new HashMap();
>
> static {
> - styles.put(Style.DOCUMENT, "org.apache.axis.enum.Style.DOCUMENT");
> - styles.put(Style.RPC, "org.apache.axis.enum.Style.RPC");
> - styles.put(Style.MESSAGE, "org.apache.axis.enum.Style.MESSAGE");
> - styles.put(Style.WRAPPED, "org.apache.axis.enum.Style.WRAPPED");
> - uses.put(Use.ENCODED, "org.apache.axis.enum.Use.ENCODED");
> - uses.put(Use.LITERAL, "org.apache.axis.enum.Use.LITERAL");
> + styles.put(Style.DOCUMENT, "org.apache.axis.constants.Style.DOCUMENT");
> + styles.put(Style.RPC, "org.apache.axis.constants.Style.RPC");
> + styles.put(Style.MESSAGE, "org.apache.axis.constants.Style.MESSAGE");
> + styles.put(Style.WRAPPED, "org.apache.axis.constants.Style.WRAPPED");
> + uses.put(Use.ENCODED, "org.apache.axis.constants.Use.ENCODED");
> + uses.put(Use.LITERAL, "org.apache.axis.constants.Use.LITERAL");
> }
>
> /** Field OPERDESC_PER_BLOCK */
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Scope.java
>
> Index: Scope.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Scope
> * @author dims@yahoo.com
> */
> public class Scope extends org.apache.axis.enum.Scope {
> }
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Style.java
>
> Index: Style.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> import org.apache.axis.deployment.wsdd.WSDDConstants;
>
> import javax.xml.namespace.QName;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Style
> * @author dims@yahoo.com
> */
> public class Style extends org.apache.axis.enum.Style {
> }
>
> 1.1 ws-axis/java/src/org/apache/axis/constants/Use.java
>
> Index: Use.java
> ===================================================================
> /*
> * 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.axis.constants;
>
> /**
> * Simple wrapper around org.apache.axis.enum.Use
> * @author dims@yahoo.com
> */
> public class Use extends org.apache.axis.enum.Use {
> };
>
> 1.11 +5 -1 ws-axis/java/src/org/apache/axis/enum/Scope.java
>
> Index: Scope.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Scope.java,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -r1.10 -r1.11
> --- Scope.java 18 Apr 2004 18:07:36 -0000 1.10
> +++ Scope.java 28 Oct 2004 14:04:35 -0000 1.11
> @@ -96,4 +96,8 @@
> private Scope(int value, String name) {
> super(type, value, name);
> }
> -};
> +
> + protected Scope() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + }
> +}
>
> 1.11 +6 -1 ws-axis/java/src/org/apache/axis/enum/Style.java
>
> Index: Style.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Style.java,v
> retrieving revision 1.10
> retrieving revision 1.11
> diff -u -r1.10 -r1.11
> --- Style.java 25 Feb 2004 14:02:39 -0000 1.10
> +++ Style.java 28 Oct 2004 14:04:35 -0000 1.11
> @@ -159,4 +159,9 @@
> super(type, value, name);
> this.provider = provider;
> }
> -};
> +
> + protected Style() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + this.provider = DEFAULT.getProvider();
> + }
> +}
>
> 1.8 +6 -1 ws-axis/java/src/org/apache/axis/enum/Use.java
>
> Index: Use.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Use.java,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -r1.7 -r1.8
> --- Use.java 25 Feb 2004 14:02:39 -0000 1.7
> +++ Use.java 28 Oct 2004 14:04:35 -0000 1.8
> @@ -99,4 +99,9 @@
> super(type, value, name);
> this.encoding = encoding;
> }
> -};
> +
> + protected Use() {
> + super(type, DEFAULT.getValue(), DEFAULT.getName());
> + this.encoding = DEFAULT.getEncoding();
> + }
> +}
>
>
--
Davanum Srinivas - http://webservices.apache.org/~dims/