# HG changeset patch # User andrew # Date 1316656633 -3600 # Node ID 78c175236707be2611c28f99a7435a1b7e9c199f # Parent c608b38af726e62f2e0b84fe5e3066f6eca2249d Update to jdk7-jaxws-2009_09_28.zip diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotatable.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotatable.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotatable.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.lang.annotation.Annotation; diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationUse.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationUse.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationUse.java Thu Sep 22 02:57:13 2011 +0100 @@ -199,8 +199,7 @@ * */ public JAnnotationUse param(String name, Class value){ - addValue(name, new JAnnotationStringValue(JExpr.lit(value.getName()))); - return this; + return param(name,clazz.owner().ref(value)); } /** diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationWriter.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationWriter.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JAnnotationWriter.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.lang.annotation.Annotation; diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JBlock.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JBlock.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JBlock.java Thu Sep 22 02:57:13 2011 +0100 @@ -111,6 +111,14 @@ return r; } + /** + * Returns true if this block is empty and does not contain + * any statement. + */ + public boolean isEmpty() { + return content.isEmpty(); + } + /** * Adds a local variable declaration to this block diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JCommentPart.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JCommentPart.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JCommentPart.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.util.ArrayList; @@ -77,7 +78,8 @@ */ protected void format( JFormatter f, String indent ) { if(!f.isPrinting()) { - // quickly pass the types to JFormatter + // quickly pass the types to JFormatter, as that's all we care. + // we don't need to worry about the exact formatting of text. for( Object o : this ) if(o instanceof JClass) f.g((JClass)o); @@ -97,12 +99,12 @@ while( (idx=s.indexOf('\n'))!=-1 ) { String line = s.substring(0,idx); if(line.length()>0) - f.p(line); + f.p(escape(line)); s = s.substring(idx+1); f.nl().p(indent); } if(s.length()!=0) - f.p(s); + f.p(escape(s)); } else if(o instanceof JClass) { // TODO: this doesn't print the parameterized type properly @@ -117,4 +119,16 @@ if(!isEmpty()) f.nl(); } + + /** + * Escapes the appearance of the comment terminator. + */ + private String escape(String s) { + while(true) { + int idx = s.indexOf("*/"); + if(idx <0) return s; + + s = s.substring(0,idx+1)+""+s.substring(idx+1); + } + } } diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JDirectClass.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JDirectClass.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JDirectClass.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.util.Iterator; diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JExpr.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JExpr.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JExpr.java Thu Sep 22 02:57:13 2011 +0100 @@ -198,8 +198,12 @@ char c = s.charAt(i); int j = charEscape.indexOf(c); if(j>=0) { - sb.append('\\'); - sb.append(charMacro.charAt(j)); + if((quote=='"' && c=='\'') || (quote=='\'' && c=='"')) { + sb.append(c); + } else { + sb.append('\\'); + sb.append(charMacro.charAt(j)); + } } else { // technically Unicode escape shouldn't be done here, // for it's a lexical level handling. diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JJavaName.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JJavaName.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JJavaName.java Thu Sep 22 02:57:13 2011 +0100 @@ -231,6 +231,7 @@ "(.*)basis","$1bases", "(.*)axis","$1axes", "(.+)is","$1ises", + "(.+)ss","$1sses", "(.+)us","$1uses", "(.+)s","$1s", "(.*)foot","$1feet", diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JMethod.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JMethod.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JMethod.java Thu Sep 22 02:57:13 2011 +0100 @@ -388,10 +388,11 @@ f.g(a).nl(); } - // declare the generics parameters + f.g(mods); + + // declare the generics parameters super.declare(f); - f.g(mods); if (!isConstructor()) f.g(type); f.id(name).p('(').i(); diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JPackage.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JPackage.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JPackage.java Thu Sep 22 02:57:13 2011 +0100 @@ -98,32 +98,7 @@ JPackage(String name, JCodeModel cw) { this.owner = cw; if (name.equals(".")) { - String msg = "JPackage name . is not allowed"; - throw new IllegalArgumentException(msg); - } - - int dots = 1; - for (int i = 0; i < name.length(); i++) { - char c = name.charAt(i); - if (c == '.') { - dots++; - continue; - } - if (dots > 1) { - String msg = "JPackage name " + name + " missing identifier"; - throw new IllegalArgumentException(msg); - } else if (dots == 1 && !Character.isJavaIdentifierStart(c)) { - String msg = - "JPackage name " + name + " contains illegal " + "character for beginning of identifier: " + c; - throw new IllegalArgumentException(msg); - } else if (!Character.isJavaIdentifierPart(c)) { - String msg = "JPackage name " + name + "contains illegal " + "character: " + c; - throw new IllegalArgumentException(msg); - } - dots = 0; - } - if (!name.trim().equals("") && dots != 0) { - String msg = "JPackage name not allowed to end with ."; + String msg = "Package name . is not allowed"; throw new IllegalArgumentException(msg); } diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/JTypeWildcard.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/JTypeWildcard.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/JTypeWildcard.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.util.Iterator; diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/TypedAnnotationWriter.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/TypedAnnotationWriter.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/TypedAnnotationWriter.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + package com.sun.codemodel.internal; import java.lang.reflect.InvocationHandler; diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/codemodel/internal/package-info.java --- a/sources/jaxws_src/src/com/sun/codemodel/internal/package-info.java Thu Sep 22 02:44:43 2011 +0100 +++ b/sources/jaxws_src/src/com/sun/codemodel/internal/package-info.java Thu Sep 22 02:57:13 2011 +0100 @@ -22,6 +22,7 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ + /** *
* Don't rely on the fact that this class extends from {@link ConcurrentLinkedQueue}.
*/
- public abstract class Impl
+ * Use of "new" is to create an unique instance.
+ */
+ public static final String NOT_LOCALIZABLE = new String("\u0000");
+}
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/istack/internal/localization/LocalizableMessage.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxws_src/src/com/sun/istack/internal/localization/LocalizableMessage.java Thu Sep 22 02:57:13 2011 +0100
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.istack.internal.localization;
+
+/**
+ * @author WS Development Team
+ */
+public final class LocalizableMessage implements Localizable {
+
+ private final String _bundlename;
+ private final String _key;
+ private final Object[] _args;
+
+ public LocalizableMessage(String bundlename, String key, Object... args) {
+ _bundlename = bundlename;
+ _key = key;
+ if(args==null)
+ args = new Object[0];
+ _args = args;
+ }
+
+ public String getKey() {
+ return _key;
+ }
+
+ public Object[] getArguments() {
+ return _args;
+ }
+
+ public String getResourceBundleName() {
+ return _bundlename;
+ }
+}
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/istack/internal/localization/LocalizableMessageFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxws_src/src/com/sun/istack/internal/localization/LocalizableMessageFactory.java Thu Sep 22 02:57:13 2011 +0100
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.istack.internal.localization;
+
+/**
+ * @author WS Development Team
+ */
+public class LocalizableMessageFactory {
+
+ private final String _bundlename;
+
+ public LocalizableMessageFactory(String bundlename) {
+ _bundlename = bundlename;
+ }
+
+ public Localizable getMessage(String key, Object... args) {
+ return new LocalizableMessage(_bundlename, key, args);
+ }
+
+}
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/istack/internal/localization/Localizer.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxws_src/src/com/sun/istack/internal/localization/Localizer.java Thu Sep 22 02:57:13 2011 +0100
@@ -0,0 +1,149 @@
+/*
+ * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package com.sun.istack.internal.localization;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localizes the {@link Localizable} into a message
+ * by using a configured {@link Locale}.
+ *
+ * @author WS Development Team
+ */
+public class Localizer {
+
+ private final Locale _locale;
+ private final HashMap _resourceBundles;
+
+ public Localizer() {
+ this(Locale.getDefault());
+ }
+
+ public Localizer(Locale l) {
+ _locale = l;
+ _resourceBundles = new HashMap();
+ }
+
+ public Locale getLocale() {
+ return _locale;
+ }
+
+ public String localize(Localizable l) {
+ String key = l.getKey();
+ if (key == Localizable.NOT_LOCALIZABLE) {
+ // this message is not localizable
+ return (String) l.getArguments()[0];
+ }
+ String bundlename = l.getResourceBundleName();
+
+ try {
+ ResourceBundle bundle =
+ (ResourceBundle) _resourceBundles.get(bundlename);
+
+ if (bundle == null) {
+ try {
+ bundle = ResourceBundle.getBundle(bundlename, _locale);
+ } catch (MissingResourceException e) {
+ // work around a bug in the com.sun.enterprise.deployment.WebBundleArchivist:
+ // all files with an extension different from .class (hence all the .properties files)
+ // get copied to the top level directory instead of being in the package where they
+ // are defined
+ // so, since we can't find the bundle under its proper name, we look for it under
+ // the top-level package
+
+ int i = bundlename.lastIndexOf('.');
+ if (i != -1) {
+ String alternateBundleName =
+ bundlename.substring(i + 1);
+ try {
+ bundle =
+ ResourceBundle.getBundle(
+ alternateBundleName,
+ _locale);
+ } catch (MissingResourceException e2) {
+ // give up
+ return getDefaultMessage(l);
+ }
+ }
+ }
+
+ _resourceBundles.put(bundlename, bundle);
+ }
+
+ if (bundle == null) {
+ return getDefaultMessage(l);
+ }
+
+ if (key == null)
+ key = "undefined";
+
+ String msg;
+ try {
+ msg = bundle.getString(key);
+ } catch (MissingResourceException e) {
+ // notice that this may throw a MissingResourceException of its own (caught below)
+ msg = bundle.getString("undefined");
+ }
+
+ // localize all arguments to the given localizable object
+ Object[] args = l.getArguments();
+ for (int i = 0; i < args.length; ++i) {
+ if (args[i] instanceof Localizable)
+ args[i] = localize((Localizable) args[i]);
+ }
+
+ String message = MessageFormat.format(msg, args);
+ return message;
+
+ } catch (MissingResourceException e) {
+ return getDefaultMessage(l);
+ }
+
+ }
+
+ private String getDefaultMessage(Localizable l) {
+ String key = l.getKey();
+ Object[] args = l.getArguments();
+ StringBuilder sb = new StringBuilder();
+ sb.append("[failed to localize] ");
+ sb.append(key);
+ if (args != null) {
+ sb.append('(');
+ for (int i = 0; i < args.length; ++i) {
+ if (i != 0)
+ sb.append(", ");
+ sb.append(String.valueOf(args[i]));
+ }
+ sb.append(')');
+ }
+ return sb.toString();
+ }
+
+}
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/istack/internal/ws/AnnotationProcessorFactoryImpl.java
--- a/sources/jaxws_src/src/com/sun/istack/internal/ws/AnnotationProcessorFactoryImpl.java Thu Sep 22 02:44:43 2011 +0100
+++ b/sources/jaxws_src/src/com/sun/istack/internal/ws/AnnotationProcessorFactoryImpl.java Thu Sep 22 02:57:13 2011 +0100
@@ -66,10 +66,7 @@
types.add("javax.jws.soap.SOAPBinding");
types.add("javax.jws.soap.SOAPMessageHandler");
types.add("javax.jws.soap.SOAPMessageHandlers");
- types.add("javax.xml.ws.BeginService");
- types.add("javax.xml.ws.EndService");
types.add("javax.xml.ws.BindingType");
- types.add("javax.xml.ws.ParameterIndex");
types.add("javax.xml.ws.RequestWrapper");
types.add("javax.xml.ws.ResponseWrapper");
types.add("javax.xml.ws.ServiceMode");
@@ -78,8 +75,6 @@
types.add("javax.xml.ws.WebServiceClient");
types.add("javax.xml.ws.WebServiceProvider");
types.add("javax.xml.ws.WebServiceRef");
-
- types.add("javax.xml.ws.security.MessageSecurity");
supportedAnnotations = Collections.unmodifiableCollection(types);
}
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/tools/internal/jxc/ConfigReader.java
--- a/sources/jaxws_src/src/com/sun/tools/internal/jxc/ConfigReader.java Thu Sep 22 02:44:43 2011 +0100
+++ b/sources/jaxws_src/src/com/sun/tools/internal/jxc/ConfigReader.java Thu Sep 22 02:57:13 2011 +0100
@@ -22,6 +22,7 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
+
package com.sun.tools.internal.jxc;
import java.io.File;
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/tools/internal/jxc/MessageBundle.properties
--- a/sources/jaxws_src/src/com/sun/tools/internal/jxc/MessageBundle.properties Thu Sep 22 02:44:43 2011 +0100
+++ b/sources/jaxws_src/src/com/sun/tools/internal/jxc/MessageBundle.properties Thu Sep 22 02:57:13 2011 +0100
@@ -30,8 +30,8 @@
Non-existent directory: {0}
VERSION = \
- schemagen version "JAXB 2.1.3" \n\
- JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.3 in JDK)
+ schemagen version "JAXB 2.1.10 in JDK 6" \n\
+ JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10 in JDK 6)
USAGE = \
Usage: schemagen [-options ...] JAX-WS 2.0.1 Tools
+ * JAX-WS 2.1 Tools
* This document describes the tools included with JAX-WS 2.0.1.
*
* {@DotDiagram
@@ -42,22 +42,24 @@
// libraries
node [style=filled,color=lightblue];
- CompileTool; "WSAP"; WebServiceAP; Processor; Modeler; ProcessorActions;
+ WsimportTool; WsgenTool;"WSAP"; WebServiceAP; WSDLModeler;WSDLParser;SeiGenerator;ServiceGenerator;ExceptionGenerator;"JAXB XJC APIs";CodeModel;
// aps
# node [style=filled,color=lightpink];
# "JAX-WS"; tools; runtime; SPI; "Annotation Processor";
"Apt ANT Task" -> APT;
- "WsGen ANT Task" -> wsgen -> CompileTool;
- "WsImport ANT Task" -> wsimport -> CompileTool;
+ "WsGen ANT Task" -> wsgen -> WsgenTool;
+ "WsImport ANT Task" -> wsimport -> WsimportTool;
- CompileTool -> APT -> WSAP -> WebServiceAP;
- CompileTool -> Processor -> Modeler;
- Processor -> ProcessorActions;
- CompileTool -> WebServiceAP;
-
- Modeler -> WSDLModeler;
+ WsgenTool -> APT -> WSAP -> WebServiceAP;
+ WsimportTool -> WSDLModeler;
+ WSDLModeler->WSDLParser;
+ WSDLModeler->"JAXB XJC APIs"
+ WsimportTool->SeiGenerator->CodeModel;
+ WsimportTool->ServiceGenerator->CodeModel;
+ WsimportTool->ExceptionGenerator->CodeModel;
+ WebServiceAP->CodeModel
}
* }
* features
parameter will have their default values.");
- ret.add("returns "+retType.name());
+ ret.add("returns " + retType.name());
m.varParam(WebServiceFeature.class, "features");
JBlock body = m.body();
- StringBuffer statement = new StringBuffer("return (");
- statement.append(retType.name());
- statement.append(")super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
+ StringBuffer statement = new StringBuffer("return ");
+ statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
statement.append(retType.name());
statement.append(".class, features);");
body.directStatement(statement.toString());
writeWebEndpoint(port, m);
}
- private void writeDefaultGetPort(Port port, JDefinedClass cls) {
- JType retType = getClass(port.getJavaInterface().getName(), ClassType.INTERFACE);
+ private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
String portGetter = port.getPortGetter();
JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
JDocComment methodDoc = m.javadoc();
- if(port.getJavaDoc() != null)
+ if (port.getJavaDoc() != null)
methodDoc.add(port.getJavaDoc());
JCommentPart ret = methodDoc.addReturn();
- ret.add("returns "+retType.name());
+ ret.add("returns " + retType.name());
JBlock body = m.body();
- StringBuffer statement = new StringBuffer("return (");
- statement.append(retType.name());
- statement.append(")super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
+ StringBuffer statement = new StringBuffer("return ");
+ statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
statement.append(retType.name());
statement.append(".class);");
body.directStatement(statement.toString());
writeWebEndpoint(port, m);
}
-
- protected JDefinedClass getClass(String className, ClassType type) {
- JDefinedClass cls;
- try {
- cls = cm._class(className, type);
- } catch (JClassAlreadyExistsException e){
- cls = cm._getClass(className);
- }
- return cls;
- }
-
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
String serviceName = service.getName().getLocalPart();
- String serviceNS= service.getName().getNamespaceURI();
+ String serviceNS = service.getName().getNamespaceURI();
wsa.param("name", serviceName);
wsa.param("targetNamespace", serviceNS);
wsa.param("wsdlLocation", wsdlLocation);
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java
--- a/sources/jaxws_src/src/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java Thu Sep 22 02:44:43 2011 +0100
+++ b/sources/jaxws_src/src/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java Thu Sep 22 02:57:13 2011 +0100
@@ -22,9 +22,6 @@
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
-/*
- * $Id: W3CAddressingJavaGeneratorExtension.java,v 1.1.2.4 2006/10/31 19:57:28 vivekp Exp $
- */
package com.sun.tools.internal.ws.processor.generator;
diff -r c608b38af726 -r 78c175236707 sources/jaxws_src/src/com/sun/tools/internal/ws/processor/model/Port.java
--- a/sources/jaxws_src/src/com/sun/tools/internal/ws/processor/model/Port.java Thu Sep 22 02:44:43 2011 +0100
+++ b/sources/jaxws_src/src/com/sun/tools/internal/ws/processor/model/Port.java Thu Sep 22 02:57:13 2011 +0100
@@ -26,6 +26,7 @@
package com.sun.tools.internal.ws.processor.model;
import com.sun.tools.internal.ws.processor.model.java.JavaInterface;
+import com.sun.tools.internal.ws.wsdl.document.PortType;
import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle;
import com.sun.tools.internal.ws.wsdl.framework.Entity;
@@ -174,4 +175,5 @@
private String _address;
private String _serviceImplName;
private Map