JBossWS SVN: r16742 - spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 03:58:33 -0400 (Thu, 20 Sep 2012)
New Revision: 16742
Removed:
spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java
spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java
spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
Log:
[JBWS-3550] removin useless classes
Deleted: spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java
===================================================================
--- spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java 2012-09-20 07:44:24 UTC (rev 16741)
+++ spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java 2012-09-20 07:58:33 UTC (rev 16742)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import java.security.Principal;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.spi.deployment.AbstractExtensible;
-import org.w3c.dom.Element;
-
-/**
- * A WebServiceContext makes it possible for a web service endpoint implementation
- * class to access message context and security information relative to a request
- * being served. Typically a WebServiceContext is injected into an endpoint implementation
- * class using the Resource annotation.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @author alessio.soldano(a)jboss.com
- * @since 03-May-2006
- */
-public abstract class ExtensibleWebServiceContext extends AbstractExtensible implements WebServiceContext
-{
- private MessageContext messageContext;
-
- public ExtensibleWebServiceContext(MessageContext messageContext)
- {
- this.messageContext = messageContext;
- }
-
- public MessageContext getMessageContext()
- {
- return messageContext;
- }
-
- public abstract Principal getUserPrincipal();
-
- public abstract boolean isUserInRole(String role);
-
- public abstract EndpointReference getEndpointReference(Element... arg0);
-
- public abstract <T extends EndpointReference> T getEndpointReference(Class<T> arg0, Element... arg1);
-}
Deleted: spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
===================================================================
--- spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-20 07:44:24 UTC (rev 16741)
+++ spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-20 07:58:33 UTC (rev 16742)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import javax.xml.ws.WebServiceContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public abstract class ResourceInjector
-{
- public abstract void inject(Object instance, WebServiceContext context);
-}
Deleted: spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
===================================================================
--- spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2012-09-20 07:44:24 UTC (rev 16741)
+++ spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2012-09-20 07:58:33 UTC (rev 16742)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public abstract class ResourceInjectorFactory implements SPIView
-{
- public abstract ResourceInjector newResourceInjector();
-}
Deleted: spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java
===================================================================
--- spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java 2012-09-20 07:44:24 UTC (rev 16741)
+++ spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java 2012-09-20 07:58:33 UTC (rev 16742)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import java.security.Principal;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-
-import org.w3c.dom.Element;
-
-/**
- * A ExtensibleWebServiceContext implementation that delegates
- * to a given WebServiceContext instance.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 28-Nov-2008
- */
-public class WebServiceContextDelegate extends ExtensibleWebServiceContext
-{
- private WebServiceContext ctx;
-
- public WebServiceContextDelegate(WebServiceContext ctx)
- {
- super(ctx.getMessageContext());
- this.ctx = ctx;
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- return ctx.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(String s)
- {
- return ctx.isUserInRole(s);
- }
-
- @Override
- public javax.xml.ws.handler.MessageContext getMessageContext()
- {
- return ctx.getMessageContext();
- }
-
- @Override
- public EndpointReference getEndpointReference(Element... arg0)
- {
- return ctx.getEndpointReference(arg0);
- }
-
- @Override
- public <T extends EndpointReference> T getEndpointReference(Class<T> arg0, Element... arg1)
- {
- return ctx.getEndpointReference(arg0, arg1);
- }
-}
Deleted: spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
===================================================================
--- spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2012-09-20 07:44:24 UTC (rev 16741)
+++ spi/branches/ropalka_JBWS-3550/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2012-09-20 07:58:33 UTC (rev 16742)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.invocation;
-
-import org.jboss.wsf.spi.SPIView;
-
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 25, 2007
- */
-public abstract class WebServiceContextFactory implements SPIView
-{
- public abstract ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext);
-}
12 years, 3 months
JBossWS SVN: r16741 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-20 03:44:24 -0400 (Thu, 20 Sep 2012)
New Revision: 16741
Added:
spi/branches/ropalka_JBWS-3550/
Log:
creating user branch
12 years, 3 months
JBossWS SVN: r16740 - in spi/trunk: src/main/java/org/jboss/wsf/spi and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-19 13:43:14 -0400 (Wed, 19 Sep 2012)
New Revision: 16740
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/Loggers.java
spi/trunk/src/main/java/org/jboss/wsf/spi/Messages.java
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/Message.properties
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/Message.properties
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/Message.properties
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/Message.properties
spi/trunk/src/main/java/org/jboss/wsf/spi/util/Message.properties
Modified:
spi/trunk/pom.xml
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/AbstractHandlerChainsMetaDataParser.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/ConfigMetaDataParser.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaDataParser.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/util/StAXUtils.java
spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java
Log:
[JBWS-3509] Converting JBossWS-SPI to latest JBoss Logging...
Modified: spi/trunk/pom.xml
===================================================================
--- spi/trunk/pom.xml 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/pom.xml 2012-09-19 17:43:14 UTC (rev 16740)
@@ -27,7 +27,8 @@
<properties>
<jbossws.api.version>1.0.1-SNAPSHOT</jbossws.api.version>
<jms.api.version>1.0.0.Final</jms.api.version>
- <jboss-logging-spi.version>2.0.5.GA</jboss-logging-spi.version>
+ <jboss-logging.version>3.1.2.GA</jboss-logging.version>
+ <jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
<servlet.api.version>1.0.0.Final</servlet.api.version>
<junit.version>3.8.2</junit.version>
</properties>
@@ -56,10 +57,16 @@
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>${jboss-logging-spi.version}</version>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss-logging.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <version>${jboss-logging-processor.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- test dependencies -->
<dependency>
@@ -82,6 +89,29 @@
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!-- Optional if you wan to generate skeleton translation properties files -->
+ <compilerArgument>
+ -AgeneratedTranslationFilesPath=${project.basedir}/target/generated-translation-files
+ </compilerArgument>
+ </configuration>
+ </plugin>
</plugins>
</build>
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/Loggers.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/Loggers.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/Loggers.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi;
+
+import static org.jboss.logging.Logger.Level.WARN;
+import static org.jboss.logging.Logger.Level.ERROR;
+
+import java.net.URL;
+import java.util.Collection;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.BasicLogger;
+import org.jboss.logging.Cause;
+import org.jboss.logging.LogMessage;
+import org.jboss.logging.Logger.Level;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageLogger;
+
+/**
+ * JBossWS API log messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageLogger(projectCode = "JBWS")
+public interface Loggers extends BasicLogger
+{
+ Loggers ROOT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.spi");
+ Loggers METADATA_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.spi.metadata");
+
+ @LogMessage(level = WARN)
+ @Message(id = 21003, value = "%s element not supported")
+ void elementNotSupported(String feature);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 21005, value = "Cannot get port component name {%s}, we have: %s")
+ void cannotGetPortComponentName(String name, Collection<String> pcNames);
+
+ @LogMessage(level = WARN)
+ @Message(id = 21006, value = "Element in webservices.xml not namespace qualified: %s")
+ void webservicesXmlElementNotNamespaceQualified(QName name);
+
+ @LogMessage(level = WARN)
+ @Message(id = 21010, value = "Multiple matching port-component-ref: sei={%s} port={%s}")
+ void multipleMatchingPortComponentRef(String seiName, QName portName);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 21017, value = "Cannot get children for resource %s")
+ void cannotGetChildrenForResource(@Cause Throwable cause, URL url);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 21018, value = "Cannot get name for resource %s")
+ void cannotGetNameForResource(@Cause Throwable cause, URL url);
+
+}
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/Messages.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/Messages.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/Messages.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.logging.Cause;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageBundle;
+
+/**
+ * JBossWS API exception messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageBundle(projectCode = "JBWS")
+public interface Messages {
+
+ Messages MESSAGES = org.jboss.logging.Messages.getBundle(Messages.class);
+
+ @Message(id = 21000, value = "Unexpected end tag parsing %s: %s")
+ IllegalStateException unexpectedEndTag(String descriptor, String tag);
+
+ @Message(id = 21001, value = "Unexpected element parsing %s: %s")
+ IllegalStateException unexpectedElement(String descriptor, String elem);
+
+ @Message(id = 21002, value = "Unexpectedly reached end of XML document: %s")
+ IllegalStateException reachedEndOfXMLDocUnexpectedly(String descriptor);
+
+ @Message(id = 21004, value = "Failed to unmarshall %s")
+ WebServiceException failedToUnmarshall(@Cause Throwable cause, URL url);
+
+ @Message(id = 21007, value = "Unsupported port-component addressing response type '%s'. Only ALL, ANONYMOUS or NON_ANONYMOUS strings are allowed.")
+ IllegalArgumentException unsupportedAddressingResponseType(String responseType);
+
+ @Message(id = 21008, value = "Could not get a property name parsing: %s")
+ IllegalStateException couldNotGetPropertyName(String descriptor);
+
+ @Message(id = 21009, value = "Cannot find file %s")
+ WebServiceException cannotFindFile(@Cause Throwable cause, String file);
+
+ @Message(id = 21011, value = "Cannot match port-component-ref against null service endpoint interface and port QName")
+ IllegalArgumentException cannotMatchAgainstNull();
+
+ @Message(id = 21012, value = "Invalid handler type %s")
+ IllegalArgumentException invalidHandlerType(String type);
+
+ @Message(id = 21013, value = "Could not get a feature name parsing: %s")
+ IllegalStateException couldNotGetFeatureName(String descriptor);
+
+ @Message(id = 21014, value = "Reading external entities is disabled")
+ XMLStreamException readingExternalEntitiesDisabled();
+
+ @Message(id = 21015, value = "Could not parse stream")
+ RuntimeException couldNotParseStream(@Cause Throwable cause);
+
+ @Message(id = 21016, value = "Cannot get URL for %s")
+ IOException cannotGetURLFor(String path);
+
+}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -21,8 +21,6 @@
*/
package org.jboss.wsf.spi.invocation;
-import org.jboss.wsf.spi.SPIView;
-
import javax.xml.ws.WebServiceContext;
/**
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/AbstractHandlerChainsMetaDataParser.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/AbstractHandlerChainsMetaDataParser.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/AbstractHandlerChainsMetaDataParser.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.spi.metadata;
+import static org.jboss.wsf.spi.Messages.MESSAGES;
import static org.jboss.wsf.spi.metadata.ParserConstants.CHAIN_PORT_PATTERN;
import static org.jboss.wsf.spi.metadata.ParserConstants.CHAIN_PROTOCOL_BINDING;
import static org.jboss.wsf.spi.metadata.ParserConstants.CHAIN_SERVICE_PATTERN;
@@ -38,13 +39,10 @@
import static org.jboss.wsf.spi.util.StAXUtils.elementAsString;
import static org.jboss.wsf.spi.util.StAXUtils.match;
-import java.util.ResourceBundle;
-
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -58,7 +56,6 @@
*/
public abstract class AbstractHandlerChainsMetaDataParser
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractHandlerChainsMetaDataParser.class);
protected UnifiedHandlerChainsMetaData parseHandlerChains(XMLStreamReader reader, String nsUri) throws XMLStreamException
{
return this.parseHandlerChains(reader, nsUri, nsUri, HANDLER_CHAINS);
@@ -79,7 +76,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -88,12 +85,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private UnifiedHandlerChainMetaData parseHandlerChain(XMLStreamReader reader, String nsUri) throws XMLStreamException
@@ -110,7 +107,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -131,12 +128,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
protected UnifiedHandlerMetaData parseHandler(XMLStreamReader reader, String nsUri) throws XMLStreamException
@@ -158,7 +155,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -181,12 +178,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private UnifiedInitParamMetaData parseInitParam(XMLStreamReader reader, String nsUri) throws XMLStreamException
@@ -203,7 +200,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -217,11 +214,13 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
+
+ protected abstract String getDescriptorForLogs();
}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/Message.properties
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/Message.properties 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/Message.properties 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,3 +0,0 @@
-UNEXPECTED_END_TAG=Unexpected end tag: {0}
-UNEXPECTED_ELEMENT=Unexpected element: {0}
-REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY=Reached end of xml document unexpectedly
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -113,8 +113,10 @@
public static final String REQUIRED = "required";
- public static final String JBOSSWS_JAXWS_CONFIG_NS = "urn:jboss:jbossws-jaxws-config:4.0";
+ public static final String JBOSSWS_JAXWS_CONFIG_NS = "urn:jboss:jbossws-jaxws-config";
+ public static final String JBOSSWS_JAXWS_CONFIG_NS_4_0 = JBOSSWS_JAXWS_CONFIG_NS + ":4.0";
+
public static final String JAXWS_CONFIG = "jaxws-config";
public static final String ENDPOINT_CONFIG = "endpoint-config";
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -24,9 +24,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Messages;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -38,7 +37,6 @@
*/
public abstract class AbstractCommonConfig implements CommonConfig
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractCommonConfig.class);
private String configName;
private Map<String, Feature> features = new HashMap<String, Feature>(2);
private Map<String, String> properties = new HashMap<String, String>(4);
@@ -72,7 +70,7 @@
handlerChains = getPreHandlerChains();
else if (type == HandlerType.POST)
handlerChains = getPostHandlerChains();
- else throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_HANDLER_TYPE", type));
+ else throw Messages.MESSAGES.invalidHandlerType(type != null ? type.toString() : null);
return handlerChains;
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/ConfigMetaDataParser.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/ConfigMetaDataParser.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/ConfigMetaDataParser.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -31,7 +31,7 @@
import static org.jboss.wsf.spi.metadata.ParserConstants.FEATURE_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.JAVAEE_NS;
import static org.jboss.wsf.spi.metadata.ParserConstants.JAXWS_CONFIG;
-import static org.jboss.wsf.spi.metadata.ParserConstants.JBOSSWS_JAXWS_CONFIG_NS;
+import static org.jboss.wsf.spi.metadata.ParserConstants.JBOSSWS_JAXWS_CONFIG_NS_4_0;
import static org.jboss.wsf.spi.metadata.ParserConstants.POST_HANDLER_CHAINS;
import static org.jboss.wsf.spi.metadata.ParserConstants.PRE_HANDLER_CHAINS;
import static org.jboss.wsf.spi.metadata.ParserConstants.PROPERTY;
@@ -39,18 +39,18 @@
import static org.jboss.wsf.spi.metadata.ParserConstants.PROPERTY_VALUE;
import static org.jboss.wsf.spi.util.StAXUtils.elementAsString;
import static org.jboss.wsf.spi.util.StAXUtils.match;
+import static org.jboss.wsf.spi.Messages.MESSAGES;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ResourceBundle;
+import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Loggers;
import org.jboss.wsf.spi.metadata.AbstractHandlerChainsMetaDataParser;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.util.StAXUtils;
@@ -63,7 +63,6 @@
*/
public class ConfigMetaDataParser extends AbstractHandlerChainsMetaDataParser
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ConfigMetaDataParser.class);
private ConfigMetaDataParser()
{
super();
@@ -121,14 +120,14 @@
}
case START_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, JAXWS_CONFIG))
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, JAXWS_CONFIG))
{
ConfigMetaDataParser parser = new ConfigMetaDataParser();
configRoot = parser.parseConfigRoot(reader);
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(org.jboss.wsf.spi.metadata.ParserConstants.JBOSSWS_JAXWS_CONFIG_NS, reader.getLocalName());
}
}
}
@@ -143,34 +142,34 @@
switch (reader.nextTag())
{
case XMLStreamConstants.END_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, JAXWS_CONFIG))
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, JAXWS_CONFIG))
{
return configRoot;
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, ENDPOINT_CONFIG)) {
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, ENDPOINT_CONFIG)) {
EndpointConfig epConfig = new EndpointConfig();
parseConfig(reader, epConfig, ENDPOINT_CONFIG);
configRoot.addEndpointConfig(epConfig);
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, CLIENT_CONFIG)) {
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, CLIENT_CONFIG)) {
ClientConfig clConfig = new ClientConfig();
parseConfig(reader, clConfig, CLIENT_CONFIG);
configRoot.addClientConfig(clConfig);
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseConfig(XMLStreamReader reader, CommonConfig config, String configElement) throws XMLStreamException
@@ -180,41 +179,41 @@
switch (reader.nextTag())
{
case XMLStreamConstants.END_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, configElement))
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, configElement))
{
return;
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, CONFIG_NAME)) {
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, CONFIG_NAME)) {
config.setConfigName(elementAsString(reader));
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, PRE_HANDLER_CHAINS)) {
- UnifiedHandlerChainsMetaData uhcmd = parseHandlerChains(reader, JAVAEE_NS, JBOSSWS_JAXWS_CONFIG_NS, PRE_HANDLER_CHAINS);
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, PRE_HANDLER_CHAINS)) {
+ UnifiedHandlerChainsMetaData uhcmd = parseHandlerChains(reader, JAVAEE_NS, JBOSSWS_JAXWS_CONFIG_NS_4_0, PRE_HANDLER_CHAINS);
config.setPreHandlerChains(uhcmd.getHandlerChains());
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, POST_HANDLER_CHAINS)) {
- UnifiedHandlerChainsMetaData uhcmd = parseHandlerChains(reader, JAVAEE_NS, JBOSSWS_JAXWS_CONFIG_NS, POST_HANDLER_CHAINS);
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, POST_HANDLER_CHAINS)) {
+ UnifiedHandlerChainsMetaData uhcmd = parseHandlerChains(reader, JAVAEE_NS, JBOSSWS_JAXWS_CONFIG_NS_4_0, POST_HANDLER_CHAINS);
config.setPostHandlerChains(uhcmd.getHandlerChains());
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, FEATURE)) {
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE)) {
config.setFeature(parseFeature(reader), true);
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, PROPERTY)) {
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, PROPERTY)) {
parseProperty(reader, config);
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseProperty(XMLStreamReader reader, CommonConfig config) throws XMLStreamException
@@ -226,35 +225,35 @@
switch (reader.nextTag())
{
case XMLStreamConstants.END_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, PROPERTY))
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, PROPERTY))
{
if (name == null)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "COULD_NOT_GET_PROPERTY_NAME"));
+ throw MESSAGES.couldNotGetPropertyName(getDescriptorForLogs());
}
config.setProperty(name, value);
return;
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, PROPERTY_NAME)) {
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, PROPERTY_NAME)) {
name = elementAsString(reader);
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, PROPERTY_VALUE)) {
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, PROPERTY_VALUE)) {
value = elementAsString(reader);
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private Feature parseFeature(XMLStreamReader reader) throws XMLStreamException
@@ -265,29 +264,29 @@
switch (reader.nextTag())
{
case XMLStreamConstants.END_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, FEATURE))
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE))
{
if (feature == null)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "COULD_NOT_READ_FEATURE_NAME"));
+ throw MESSAGES.couldNotGetFeatureName(getDescriptorForLogs());
}
return feature;
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
- if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, FEATURE_NAME)) {
+ if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE_NAME)) {
feature = new Feature(elementAsString(reader));
}
- else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS, FEATURE_DATA)) {
+ else if (match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE_DATA)) {
//not implemented yet
- Logger.getLogger(this.getClass()).warn(BundleUtils.getMessage(bundle, "FEATURE_DATA_NOT_SUPPORTED_YET"));
+ Loggers.METADATA_LOGGER.elementNotSupported(new QName(JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE_DATA).toString());
while (reader.hasNext()) {
reader.next();
- if (reader.isEndElement() && match(reader, JBOSSWS_JAXWS_CONFIG_NS, FEATURE_DATA))
+ if (reader.isEndElement() && match(reader, JBOSSWS_JAXWS_CONFIG_NS_4_0, FEATURE_DATA))
{
break;
}
@@ -295,11 +294,17 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
+
+ @Override
+ protected String getDescriptorForLogs()
+ {
+ return org.jboss.wsf.spi.metadata.ParserConstants.JBOSSWS_JAXWS_CONFIG_NS;
+ }
}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/Message.properties
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/Message.properties 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/Message.properties 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,7 +0,0 @@
-INVALID_HANDLER_TYPE=Invalid handler type: {0}
-UNEXPECTED_ELEMENT=Unexpected element: {0}
-UNEXPECTED_END_TAG=Unexpected end tag: {0}
-REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY=Reached end of xml document unexpectedly
-COULD_NOT_GET_PROPERTY_NAME=Could not get property name!
-COULD_NOT_READ_FEATURE_NAME=Could not read feature name!
-FEATURE_DATA_NOT_SUPPORTED_YET=Feature data not supported yet!
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/Message.properties
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/Message.properties 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/Message.properties 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,7 +0,0 @@
-ONLY_ALL_ANONYMOUS_OR_NON_ANONYMOUS_ALLOWED=Only ALL, ANONYMOUS or NON_ANONYMOUS strings are allowed
-CANNOT_FIND_JAXRCP-MAPPING-FILE=Cannot find jaxrcp-mapping-file: {0}
-MULTIPLE_MATCHING_PORT_COMPONENT_REF=Multiple matching port component ref: sei={0} port={1}
-CANNOT_FIND_WSDL-OVERRIDE=Cannot find wsdl-override: {0}
-CANNOT_FIND_WSDL-FILE=Cannot find wsdl-file: {0}
-UNEXPECTED_ELEMENT=Unexpected element: {0}
-CANNOT_MATCH=Cannot match against seiName=null && portName=null.
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaDataParser.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaDataParser.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaDataParser.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -30,12 +30,11 @@
import java.io.IOException;
import java.io.InputStream;
-import java.util.ResourceBundle;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Messages;
import org.jboss.wsf.spi.metadata.AbstractHandlerChainsMetaDataParser;
import org.jboss.wsf.spi.util.StAXUtils;
@@ -47,7 +46,6 @@
*/
public class UnifiedHandlerChainsMetaDataParser extends AbstractHandlerChainsMetaDataParser
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(UnifiedHandlerChainsMetaDataParser.class);
private UnifiedHandlerChainsMetaDataParser()
{
super();
@@ -95,10 +93,16 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw Messages.MESSAGES.unexpectedElement("handlers", reader.getLocalName());
}
}
}
return handlerChains;
}
+
+ @Override
+ protected String getDescriptorForLogs()
+ {
+ return "handlers";
+ }
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
-import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -23,20 +23,19 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Messages;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-/** The metdata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
+/** The metadata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
*/
public class UnifiedPortComponentRefMetaData extends ServiceRefElement
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(UnifiedPortComponentRefMetaData.class);
private static final long serialVersionUID = 8622309745808960649L;
// The parent service-ref
@@ -108,7 +107,7 @@
public void setAddressingResponses(final String responsesTypes)
{
if (!"ANONYMOUS".equals(responsesTypes) && !"NON_ANONYMOUS".equals(responsesTypes) && !"ALL".equals(responsesTypes))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ONLY_ALL_ANONYMOUS_OR_NON_ANONYMOUS_ALLOWED"));
+ throw Messages.MESSAGES.unsupportedAddressingResponseType(responsesTypes);
this.addressingResponses = responsesTypes;
}
@@ -246,7 +245,7 @@
public boolean matches(String seiName, QName portName)
{
if (seiName == null && portName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_MATCH"));
+ throw Messages.MESSAGES.cannotMatchAgainstNull();
boolean match = false;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
+import static org.jboss.wsf.spi.Messages.MESSAGES;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -35,13 +37,10 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Loggers;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.WritableUnifiedVirtualFile;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
@@ -58,12 +57,8 @@
*/
public final class UnifiedServiceRefMetaData extends ServiceRefElement
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(UnifiedServiceRefMetaData.class);
private static final long serialVersionUID = -926464174132493955L;
- // provide logging
- private static Logger log = Logger.getLogger(UnifiedServiceRefMetaData.class);
-
private transient UnifiedVirtualFile vfsRoot;
// Standard properties
@@ -150,7 +145,7 @@
public void setAddressingResponses(final String responsesTypes)
{
if (!"ANONYMOUS".equals(responsesTypes) && !"NON_ANONYMOUS".equals(responsesTypes) && !"ALL".equals(responsesTypes))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ONLY_ALL,ONLY_ALL_ANONYMOUS_OR_NON_ANONYMOUS_ALLOWED"));
+ throw MESSAGES.unsupportedAddressingResponseType(responsesTypes);
this.addressingResponses = responsesTypes;
}
@@ -251,7 +246,7 @@
}
catch (Exception e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "CANNOT_FIND_JAXRCP-MAPPING-FILE", mappingFile), e);
+ throw MESSAGES.cannotFindFile(e, mappingFile);
}
}
return mappingURL;
@@ -270,7 +265,7 @@
if (ref.matches(seiName, portName))
{
if (matchingRef != null)
- log.warn(BundleUtils.getMessage(bundle, "MULTIPLE_MATCHING_PORT_COMPONENT_REF", new Object[]{ seiName , portName }));
+ Loggers.METADATA_LOGGER.multipleMatchingPortComponentRef(seiName, portName);
matchingRef = ref;
}
@@ -360,7 +355,7 @@
}
catch (Exception e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "CANNOT_FIND_WSDL-OVERRIDE", wsdlOverride), e);
+ throw MESSAGES.cannotFindFile(e, wsdlOverride);
}
}
}
@@ -379,7 +374,7 @@
}
catch (Exception e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "CANNOT_FIND_WSDL-FILE", wsdlFile), e);
+ throw MESSAGES.cannotFindFile(e, wsdlFile);
}
}
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -24,20 +24,21 @@
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.jboss.wsf.spi.Messages.MESSAGES;
import static org.jboss.wsf.spi.metadata.ParserConstants.AUTH_METHOD;
import static org.jboss.wsf.spi.metadata.ParserConstants.CONFIG_FILE;
import static org.jboss.wsf.spi.metadata.ParserConstants.CONFIG_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.CONTEXT_ROOT;
import static org.jboss.wsf.spi.metadata.ParserConstants.EJB_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.JBOSSEE_NS;
+import static org.jboss.wsf.spi.metadata.ParserConstants.NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.PORT_COMPONENT;
import static org.jboss.wsf.spi.metadata.ParserConstants.PORT_COMPONENT_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.PORT_COMPONENT_URI;
import static org.jboss.wsf.spi.metadata.ParserConstants.PROPERTY;
-import static org.jboss.wsf.spi.metadata.ParserConstants.NAME;
-import static org.jboss.wsf.spi.metadata.ParserConstants.VALUE;
import static org.jboss.wsf.spi.metadata.ParserConstants.SECURE_WSDL_ACCESS;
import static org.jboss.wsf.spi.metadata.ParserConstants.TRANSPORT_GUARANTEE;
+import static org.jboss.wsf.spi.metadata.ParserConstants.VALUE;
import static org.jboss.wsf.spi.metadata.ParserConstants.WEBSERVICES;
import static org.jboss.wsf.spi.metadata.ParserConstants.WEBSERVICE_DESCRIPTION;
import static org.jboss.wsf.spi.metadata.ParserConstants.WEBSERVICE_DESCRIPTION_NAME;
@@ -49,14 +50,12 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ResourceBundle;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.ws.WebServiceException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.util.StAXUtils;
@@ -66,8 +65,6 @@
*/
public class JBossWebservicesFactory {
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossWebservicesFactory.class);
-
// The URL to the jboss-webservices.xml descriptor
private URL descriptorURL;
@@ -120,7 +117,7 @@
XMLStreamReader xmlr = StAXUtils.createXMLStreamReader(is);
return parse(xmlr, wsddUrl);
} catch (Exception e) {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "FAILED_TO_UNMARSHALL", wsddUrl), e);
+ throw MESSAGES.failedToUnmarshall(e, wsddUrl);
} finally {
try {
if (is != null)
@@ -169,7 +166,7 @@
JBossWebservicesFactory factory = new JBossWebservicesFactory(descriptorURL);
metadata = factory.parseWebservices(reader, nsUri, descriptorURL);
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(descriptorURL != null ? descriptorURL.toString() : "jboss-webservices.xml", reader.getLocalName());
}
}
}
@@ -185,8 +182,7 @@
if (match(reader, nsUri, WEBSERVICES)) {
return metadata;
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT: {
@@ -203,13 +199,12 @@
} else if (match(reader, nsUri, WEBSERVICE_DESCRIPTION)) {
metadata.addWebserviceDescription(parseWebserviceDescription(reader, nsUri));
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private JBossPortComponentMetaData parsePortComponent(XMLStreamReader reader, String nsUri) throws XMLStreamException {
@@ -220,8 +215,7 @@
if (match(reader, nsUri, PORT_COMPONENT)) {
return pc;
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT: {
@@ -238,13 +232,12 @@
} else if (match(reader, nsUri, SECURE_WSDL_ACCESS)) {
pc.setSecureWSDLAccess(elementAsBoolean(reader));
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private JBossWebserviceDescriptionMetaData parseWebserviceDescription(XMLStreamReader reader, String nsUri)
@@ -256,8 +249,7 @@
if (match(reader, nsUri, WEBSERVICE_DESCRIPTION)) {
return description;
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT: {
@@ -266,13 +258,12 @@
} else if (match(reader, nsUri, WSDL_PUBLISH_LOCATION)) {
description.setWsdlPublishLocation(elementAsString(reader));
} else {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT",
- reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseProperty(XMLStreamReader reader, String nsUri, JBossWebservicesMetaData metadata) throws XMLStreamException
@@ -288,14 +279,14 @@
{
if (name == null)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "COULD_NOT_GET_PROPERTY_NAME"));
+ throw MESSAGES.couldNotGetPropertyName(getDescriptorForLogs());
}
metadata.setProperty(name, value);
return;
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -307,12 +298,16 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
+
+ private String getDescriptorForLogs() {
+ return descriptorURL != null ? descriptorURL.toString() : "jboss-webservices.xml";
+ }
}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/Message.properties
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/Message.properties 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/Message.properties 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,7 +0,0 @@
-CANNOT_GET_PORT_COMPONENT_NAME=Cannot get port component name {0}, we have: {1}
-FAILED_TO_UNMARSHALL=Failed to unmarshall:{0}
-UNEXPECTED_ELEMENT=Unexpected element: {0}
-UNEXPECTED_END_TAG=Unexpected end tag: {0}
-REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY=Reached end of xml document unexpectedly
-ELEMENT_IN_WEBSERVICES.XML_NOT_NAMESPACE_QUALIFIED=<wsdl-port> element in webservices.xml not namespace qualified: {0}
-ONLY_ALL_ANONYMOUS_OR_NON_ANONYMOUS_ALLOWED=Only ALL, ANONYMOUS or NON_ANONYMOUS strings are allowed
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -23,12 +23,11 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Loggers;
+import org.jboss.wsf.spi.Messages;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -45,15 +44,11 @@
*/
public class PortComponentMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(PortComponentMetaData.class);
/**
* The index of the webservice-description in webservices.xml
*/
public static final String PARAMETER_WEBSERVICE_ID = "webserviceID";
- // provide logging
- private static final Logger log = Logger.getLogger(PortComponentMetaData.class);
-
// The parent <webservice-description> element
private WebserviceDescriptionMetaData webserviceDescription;
@@ -123,7 +118,7 @@
public void setWsdlPort(QName wsdlPort)
{
if (wsdlPort.getNamespaceURI().length() == 0)
- log.warn(BundleUtils.getMessage(bundle, "ELEMENT_IN_WEBSERVICES.XML_NOT_NAMESPACE_QUALIFIED", wsdlPort));
+ Loggers.METADATA_LOGGER.webservicesXmlElementNotNamespaceQualified(wsdlPort);
this.wsdlPort = wsdlPort;
}
@@ -199,7 +194,7 @@
public void setAddressingResponses(final String responsesTypes)
{
if (!"ANONYMOUS".equals(responsesTypes) && !"NON_ANONYMOUS".equals(responsesTypes) && !"ALL".equals(responsesTypes))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ONLY_ALL_ANONYMOUS_OR_NON_ANONYMOUS_ALLOWED"));
+ throw Messages.MESSAGES.unsupportedAddressingResponseType(responsesTypes);
this.addressingResponses = responsesTypes;
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -22,15 +22,13 @@
package org.jboss.wsf.spi.metadata.webservices;
import java.util.ArrayList;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.Loggers;
/**
* XML Binding element for <code>webservices/webservice-description</code>
@@ -40,10 +38,6 @@
*/
public class WebserviceDescriptionMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WebserviceDescriptionMetaData.class);
- // provide logging
- private static final Logger log = Logger.getLogger(WebserviceDescriptionMetaData.class);
-
// The parent <webservices> element
private WebservicesMetaData webservices;
@@ -116,7 +110,7 @@
pcNames.add(wsdlPortName);
}
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_PORT_COMPONENT_NAME", new Object[]{ name , pcNames}));
+ Loggers.METADATA_LOGGER.cannotGetPortComponentName(name, pcNames);
return null;
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -23,6 +23,7 @@
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.jboss.wsf.spi.Messages.MESSAGES;
import static org.jboss.wsf.spi.metadata.ParserConstants.ADDRESSING;
import static org.jboss.wsf.spi.metadata.ParserConstants.ADDRESSING_RESPONSES;
import static org.jboss.wsf.spi.metadata.ParserConstants.EJB_LINK;
@@ -57,14 +58,12 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ResourceBundle;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.ws.WebServiceException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.AbstractHandlerChainsMetaDataParser;
import org.jboss.wsf.spi.util.StAXUtils;
@@ -73,11 +72,11 @@
* A JBossXB factory for {@link WebservicesMetaData}
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
* @since 16-Apr-2004
*/
public class WebservicesFactory extends AbstractHandlerChainsMetaDataParser
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WebservicesFactory.class);
// The URL to the webservices.xml descriptor
private URL descriptorURL;
@@ -140,7 +139,7 @@
}
catch (Exception e)
{
- throw new WebServiceException(BundleUtils.getMessage(bundle, "FAILED_TO_UNMARSHALL", wsddUrl), e);
+ throw MESSAGES.failedToUnmarshall(e, wsddUrl);
}
finally
{
@@ -204,7 +203,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(descriptorURL != null ? descriptorURL.toString() : "webservices.xml", reader.getLocalName());
}
}
}
@@ -225,7 +224,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -243,12 +242,12 @@
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
WebserviceDescriptionMetaData parseWebserviceDescription(XMLStreamReader reader, String nsUri, WebservicesMetaData wsMetaData) throws XMLStreamException
@@ -265,7 +264,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -283,12 +282,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private PortComponentMetaData parsePortComponent(XMLStreamReader reader, String nsUri, WebserviceDescriptionMetaData desc) throws XMLStreamException
@@ -305,7 +304,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -356,12 +355,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseAddressing(XMLStreamReader reader, String nsUri, PortComponentMetaData pc) throws XMLStreamException
@@ -377,7 +376,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -392,12 +391,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseRespectBinding(XMLStreamReader reader, String nsUri, PortComponentMetaData pc) throws XMLStreamException
@@ -413,7 +412,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -422,12 +421,12 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
private void parseServiceImplBean(XMLStreamReader reader, String nsUri, PortComponentMetaData pc) throws XMLStreamException
@@ -443,7 +442,7 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_END_TAG", reader.getLocalName()));
+ throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(), reader.getLocalName());
}
}
case XMLStreamConstants.START_ELEMENT : {
@@ -455,14 +454,19 @@
}
else
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "UNEXPECTED_ELEMENT", reader.getLocalName()));
+ throw MESSAGES.unexpectedElement(getDescriptorForLogs(), reader.getLocalName());
}
}
}
}
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "REACHED_END_OF_XML_DOCUMENT_UNEXPECTEDLY"));
+ throw MESSAGES.reachedEndOfXMLDocUnexpectedly(getDescriptorForLogs());
}
+ @Override
+ protected String getDescriptorForLogs() {
+ return descriptorURL != null ? descriptorURL.toString() : "webservices.xml";
+ }
+
public URL getDescriptorURL()
{
return descriptorURL;
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/util/Message.properties
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/Message.properties 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/Message.properties 2012-09-19 17:43:14 UTC (rev 16740)
@@ -1,5 +0,0 @@
-CANNOT_GET_URL_FOR=Cannot get URL for: {0}
-CANNOT_GET_CHILDREN_FOR_RESOURCE=Cannot get children for resource: {0}
-CANNOT_GET_NAME_FOR_RESOURCE=Cannot get name for resource: {0}
-READING_EXTERNAL_ENTITIES_IS_DISABLED=Reading external entities is disabled
-COULDN'T_PARSE_STREAM=Couldn't parse stream
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/util/StAXUtils.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/StAXUtils.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/StAXUtils.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -22,7 +22,6 @@
package org.jboss.wsf.spi.util;
import java.io.InputStream;
-import java.util.ResourceBundle;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@@ -32,7 +31,7 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Messages;
/**
* StAX utils
@@ -42,7 +41,6 @@
*/
public class StAXUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(StAXUtils.class);
private static final BlockingQueue<XMLInputFactory> INPUT_FACTORY_POOL;
static
@@ -81,7 +79,7 @@
public Object resolveEntity(String publicID, String systemID, String baseURI, String namespace)
throws XMLStreamException
{
- throw new XMLStreamException(BundleUtils.getMessage(bundle, "READING_EXTERNAL_ENTITIES_IS_DISABLED"));
+ throw Messages.MESSAGES.readingExternalEntitiesDisabled();
}
});
return factory;
@@ -111,7 +109,7 @@
}
catch (XMLStreamException e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "COULDN'T_PARSE_STREAM"), e);
+ throw Messages.MESSAGES.couldNotParseStream(e);
}
finally
{
@@ -188,7 +186,7 @@
}
catch (XMLStreamException e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "COULDN'T_PARSE_STREAM"), e);
+ throw Messages.MESSAGES.couldNotParseStream(e);
}
}
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java 2012-09-19 07:52:56 UTC (rev 16739)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/URLLoaderAdapter.java 2012-09-19 17:43:14 UTC (rev 16740)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi.util;
+import static org.jboss.wsf.spi.Loggers.ROOT_LOGGER;
+
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -31,12 +33,10 @@
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.wsf.spi.Messages;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
/**
@@ -50,13 +50,11 @@
*/
public class URLLoaderAdapter implements UnifiedVirtualFile
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(URLLoaderAdapter.class);
private static final long serialVersionUID = 8263115387770740414L;
private URL rootURL;
private URL resourceURL;
private transient URLClassLoader loader;
- private static Logger log = Logger.getLogger(URLLoaderAdapter.class);
private static final String jarFileSeparator = "/";
public URLLoaderAdapter(URL rootURL)
@@ -116,7 +114,7 @@
}
if (resourceURL == null)
- throw new IOException(BundleUtils.getMessage(bundle, "CANNOT_GET_URL_FOR", resourcePath));
+ throw Messages.MESSAGES.cannotGetURLFor(resourcePath);
return new URLLoaderAdapter(rootURL, loader, resourceURL);
}
@@ -203,8 +201,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", url));
+ ROOT_LOGGER.cannotGetChildrenForResource(e, url);
}
}
else //std file/dir
@@ -226,7 +223,7 @@
}
catch (Exception e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_CHILDREN_FOR_RESOURCE", url), e);
+ ROOT_LOGGER.cannotGetChildrenForResource(e, url);
}
}
return list;
@@ -245,7 +242,7 @@
}
catch (Exception e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GET_NAME_FOR_RESOURCE", toURL()), e);
+ ROOT_LOGGER.cannotGetNameForResource(e, toURL());
}
return name;
}
12 years, 3 months
JBossWS SVN: r16739 - common/trunk/src/main/java/org/jboss/ws/common/utils.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-09-19 03:52:56 -0400 (Wed, 19 Sep 2012)
New Revision: 16739
Modified:
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
Log:
[JBWS-3544]:xsd:import not working in WSDLs if EJB WebService deployed in EAR
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2012-09-19 07:52:10 UTC (rev 16738)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2012-09-19 07:52:56 UTC (rev 16739)
@@ -159,7 +159,7 @@
}
URL targetURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + locationURI);
- File targetFile = new File(targetURL.toURI()); //JBWS-3488
+ File targetFile = new File(targetURL.getFile()); //JBWS-3488
targetFile.getParentFile().mkdirs();
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
@@ -214,7 +214,7 @@
}
URL xsdURL = new URL(baseURI.substring(0, baseURI.lastIndexOf("/") + 1) + schemaLocation);
- File targetFile = new File(xsdURL.toURI()); //JBWS-3488
+ File targetFile = new File(xsdURL.getFile()); //JBWS-3488
targetFile.getParentFile().mkdirs();
String deploymentName = dep.getCanonicalName();
12 years, 3 months
JBossWS SVN: r16738 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-09-19 03:52:10 -0400 (Wed, 19 Sep 2012)
New Revision: 16738
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java
Log:
[JBWS-3544]:xsd:import not working in WSDLs if EJB WebService deployed in EAR
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java 2012-09-18 12:52:43 UTC (rev 16737)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java 2012-09-19 07:52:10 UTC (rev 16738)
@@ -132,7 +132,7 @@
{
enc = "utf-8";
}
- FileOutputStream fos = new FileOutputStream(file);
+ FileOutputStream fos = new FileOutputStream(new File(file.toURI()));
try
{
XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(fos, enc);
12 years, 3 months
JBossWS SVN: r16737 - in api/trunk: src/main/java/org/jboss/ws/api and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-18 08:52:43 -0400 (Tue, 18 Sep 2012)
New Revision: 16737
Added:
api/trunk/src/main/java/org/jboss/ws/api/Log.java
api/trunk/src/main/java/org/jboss/ws/api/Messages.java
Removed:
api/trunk/src/main/java/org/jboss/ws/api/annotation/Message.properties
api/trunk/src/main/java/org/jboss/ws/api/handler/Message.properties
api/trunk/src/main/java/org/jboss/ws/api/tools/Message.properties
api/trunk/src/main/java/org/jboss/ws/api/util/Message.properties
api/trunk/src/test/java/org/jboss/ws/api/util/BundleUtilsTest.java
api/trunk/src/test/java/org/jboss/ws/api/util/Message_fr.properties
Modified:
api/trunk/pom.xml
api/trunk/src/main/java/org/jboss/ws/api/addressing/MAPBuilderFactory.java
api/trunk/src/main/java/org/jboss/ws/api/annotation/AuthMethod.java
api/trunk/src/main/java/org/jboss/ws/api/annotation/TransportGuarantee.java
api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java
api/trunk/src/main/java/org/jboss/ws/api/monitoring/RecordGroupAssociation.java
api/trunk/src/main/java/org/jboss/ws/api/tools/SecurityActions.java
api/trunk/src/main/java/org/jboss/ws/api/util/DOMUtils.java
api/trunk/src/main/java/org/jboss/ws/api/util/ServiceLoader.java
Log:
[JBWS-3509] Converting JBossWS-API to latest JBoss Logging...
Modified: api/trunk/pom.xml
===================================================================
--- api/trunk/pom.xml 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/pom.xml 2012-09-18 12:52:43 UTC (rev 16737)
@@ -24,7 +24,8 @@
</scm>
<properties>
- <jboss-logging-spi.version>2.0.5.GA</jboss-logging-spi.version>
+ <jboss-logging.version>3.1.2.GA</jboss-logging.version>
+ <jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
<junit.version>3.8.2</junit.version>
</properties>
@@ -34,11 +35,18 @@
<!-- provided apis -->
<dependency>
<groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>${jboss-logging-spi.version}</version>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss-logging.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <version>${jboss-logging-processor.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
@@ -46,7 +54,6 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
-
</dependencies>
<!-- Plugins -->
@@ -90,6 +97,16 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <!-- Optional if you wan to generate skeleton translation properties files -->
+ <compilerArgument>
+ -AgeneratedTranslationFilesPath=${project.basedir}/target/generated-translation-files
+ </compilerArgument>
+ </configuration>
+ </plugin>
</plugins>
</build>
Added: api/trunk/src/main/java/org/jboss/ws/api/Log.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/Log.java (rev 0)
+++ api/trunk/src/main/java/org/jboss/ws/api/Log.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.api;
+
+import static org.jboss.logging.Logger.Level.ERROR;
+import static org.jboss.logging.Logger.Level.TRACE;
+import static org.jboss.logging.Logger.Level.WARN;
+
+import org.jboss.logging.BasicLogger;
+import org.jboss.logging.LogMessage;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageLogger;
+
+/**
+ * JBossWS API log messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageLogger(projectCode = "JBWS")
+public interface Log extends BasicLogger
+{
+ Log LOGGER = org.jboss.logging.Logger.getMessageLogger(Log.class, "org.jboss.ws.api");
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20003, value = "Ignore attribute: [uri=%s, qname=%s, value=%s]")
+ void ignoringAttribute(String uri, String qname, String value);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 20005, value = "Cannnot parse: %s")
+ void cannotParse(String s);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20006, value = "createElement {%s}%s")
+ void creatingElement(String uri, String prefix);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20007, value = "createElement {%s}%s:%s")
+ void creatingElement(String uri, String prefix, String localPart);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20008, value = "pushGroupID: %s (%s)")
+ void pushGroupID(String groupId, String threadName);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20009, value = "peekGroupID: %s (%s)")
+ void peekGroupID(String groupId, String threadName);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20010, value = "popGroupID: %s (%s)")
+ void popGroupID(String groupId, String threadName);
+
+ @LogMessage(level = WARN)
+ @Message(id = 20012, value = "Non-standard method: %s")
+ void nonStandardMethod(String s);
+
+ @LogMessage(level = TRACE)
+ @Message(id = 20015, value = "Could not get %s module classloader: %s")
+ void couldNotGetModuleClassLoader(String module, Exception e);
+
+}
Added: api/trunk/src/main/java/org/jboss/ws/api/Messages.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/Messages.java (rev 0)
+++ api/trunk/src/main/java/org/jboss/ws/api/Messages.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.api;
+
+import org.jboss.logging.Cause;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageBundle;
+
+/**
+ * JBossWS API exception messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@MessageBundle(projectCode = "JBWS")
+public interface Messages {
+
+ Messages MESSAGES = org.jboss.logging.Messages.getBundle(Messages.class);
+
+ @Message(id = 20000, value = "Failed to load %s")
+ IllegalStateException failedToLoad(@Cause Throwable cause, Object objs);
+
+ @Message(id = 20001, value = "Cannot load properties: %s")
+ SecurityException cannotLoadProperties(@Cause Throwable cause, String s);
+
+ @Message(id = 20002, value = "Cannot find namespace uri for %s")
+ IllegalArgumentException cannotFindNamespaceURI(String qualifiedName);
+
+ @Message(id = 20004, value = "Source type not implemented: %s")
+ RuntimeException sourceTypeNotImplemented(Class<?> clazz);
+
+ @Message(id = 20011, value = "Cannot obtain required property: %s")
+ IllegalStateException cannotObtainRequiredProperty(String prop);
+
+ @Message(id = 20013, value = "Illegal auth method: %s")
+ IllegalArgumentException illegalAuthMethod(String method);
+
+ @Message(id = 20014, value = "Illegal transport guarantee: %s")
+ IllegalArgumentException illegalTransportGuarantee(String method);
+
+}
Modified: api/trunk/src/main/java/org/jboss/ws/api/addressing/MAPBuilderFactory.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/addressing/MAPBuilderFactory.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/addressing/MAPBuilderFactory.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -24,7 +24,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import org.jboss.logging.Logger;
+import org.jboss.ws.api.Log;
import org.jboss.ws.api.util.ServiceLoader;
/**
@@ -115,10 +115,8 @@
moduleClassLoader = (ClassLoader)moduleClass.getMethod("getClassLoader").invoke(module);
} catch (Exception e) {
//ignore, JBoss Modules might not be available at all
- Logger log = Logger.getLogger(MAPBuilderFactory.class);
- if (log.isTraceEnabled())
- {
- log.trace("Could not get " + JBOSSWS_SPI_MODULE + " module classloader: ", e);
+ if (Log.LOGGER.isTraceEnabled()) {
+ Log.LOGGER.couldNotGetModuleClassLoader(JBOSSWS_SPI_MODULE, e);
}
}
return moduleClassLoader;
Modified: api/trunk/src/main/java/org/jboss/ws/api/annotation/AuthMethod.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/annotation/AuthMethod.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/annotation/AuthMethod.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,11 +21,9 @@
*/
package org.jboss.ws.api.annotation;
-import java.util.ResourceBundle;
+import org.jboss.ws.api.Log;
+import org.jboss.ws.api.Messages;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-
/**
* The authMethod is used to configure the authentication mechanism for the web service.
* As a prerequisite to gaining access to any web service which are protected by an
@@ -35,9 +33,6 @@
*/
public final class AuthMethod
{
- private static final Logger log = Logger.getLogger(AuthMethod.class);
- private static final ResourceBundle bundle = BundleUtils.getBundle(AuthMethod.class);
-
/**
* Basic authentication.
*/
@@ -59,7 +54,7 @@
* Returns string representing correct {@link org.jboss.ws.api.annotation.AuthMethod} value.
* @param s string to convert.
* @return correct auth method value
- * @throws IllegalArgumentException if <b>s</b> is <b>null</b> or contains unknown value.
+ * @throws IllegalArgumentException if <b>s</b> is <b>null</b>.
*/
public static String valueOf(final String s)
{
@@ -77,11 +72,11 @@
{
return AuthMethod.CLIENT_CERT;
}
- log.warn(BundleUtils.getMessage(bundle, "NON_STANDARD_METHOD", s));
+ Log.LOGGER.nonStandardMethod(s);
return s;
}
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_AUTH_METHOD", s));
+ throw Messages.MESSAGES.illegalAuthMethod(s);
}
}
Deleted: api/trunk/src/main/java/org/jboss/ws/api/annotation/Message.properties
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/annotation/Message.properties 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/annotation/Message.properties 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1,3 +0,0 @@
-ILLEGAL_TRANSPORT_GUARANTEE=Illegal transport guarantee value: {0}
-NON_STANDARD_METHOD=Non-standard auth method value : {0}
-ILLEGAL_AUTH_METHOD= Illegal auth method : {0}
Modified: api/trunk/src/main/java/org/jboss/ws/api/annotation/TransportGuarantee.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/annotation/TransportGuarantee.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/annotation/TransportGuarantee.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,10 +21,8 @@
*/
package org.jboss.ws.api.annotation;
-import java.util.ResourceBundle;
+import org.jboss.ws.api.Messages;
-import org.jboss.ws.api.util.BundleUtils;
-
/**
* The transportGuarantee specifies that the communication
* between client and server should be NONE, INTEGRAL, or
@@ -41,8 +39,6 @@
*/
public final class TransportGuarantee
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TransportGuarantee.class);
-
/**
* Application does not require any transport guarantees.
*/
@@ -94,7 +90,7 @@
}
}
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_TRANSPORT_GUARANTEE", s));
+ throw Messages.MESSAGES.illegalTransportGuarantee(s);
}
}
Modified: api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/handler/GenericHandler.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,12 +21,10 @@
*/
package org.jboss.ws.api.handler;
-import java.util.ResourceBundle;
-
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.api.Messages;
/**
* A generic JAX-WS handler
@@ -36,7 +34,6 @@
*/
public abstract class GenericHandler implements Handler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(GenericHandler.class);
private String handlerName;
public String getHandlerName()
@@ -53,7 +50,7 @@
{
Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
if (outbound == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_REQUIRED_PROPERTY", MessageContext.MESSAGE_OUTBOUND_PROPERTY));
+ throw Messages.MESSAGES.cannotObtainRequiredProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
}
Deleted: api/trunk/src/main/java/org/jboss/ws/api/handler/Message.properties
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/handler/Message.properties 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/handler/Message.properties 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1 +0,0 @@
-CANNOT_OBTAIN_REQUIRED_PROPERTY=Cannot obtain required property: {0}
Modified: api/trunk/src/main/java/org/jboss/ws/api/monitoring/RecordGroupAssociation.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/monitoring/RecordGroupAssociation.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/monitoring/RecordGroupAssociation.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,10 +21,10 @@
*/
package org.jboss.ws.api.monitoring;
+import static org.jboss.ws.api.Log.LOGGER;
+
import java.util.Stack;
-import org.jboss.logging.Logger;
-
/**
* Associates the record group ID with the current thread. This is implemented internally
* through a static ThreadLocal member.
@@ -36,9 +36,6 @@
{
private static ThreadLocal<Stack<String>> groupIDAssoc = new ThreadLocal<Stack<String>>();
- // provide logging
- private static Logger log = Logger.getLogger(RecordGroupAssociation.class);
-
/**
* Associates the specified groupID to the current thread
*
@@ -46,7 +43,7 @@
*/
public static void pushGroupID(String groupID)
{
- if(log.isTraceEnabled()) log.trace("pushGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
+ if (LOGGER.isTraceEnabled()) LOGGER.pushGroupID(groupID, Thread.currentThread().getName());
Stack<String> stack = groupIDAssoc.get();
if (stack == null)
{
@@ -69,7 +66,7 @@
{
groupID = stack.peek();
}
- if(log.isTraceEnabled()) log.trace("peekGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
+ if (LOGGER.isTraceEnabled()) LOGGER.peekGroupID(groupID, Thread.currentThread().getName());
return groupID;
}
@@ -86,7 +83,7 @@
{
groupID = stack.pop();
}
- if(log.isTraceEnabled()) log.trace("popGroupID: " + groupID +" (Thread " +Thread.currentThread().getName()+ ")");
+ if (LOGGER.isTraceEnabled()) LOGGER.popGroupID(groupID, Thread.currentThread().getName());
return groupID;
}
Deleted: api/trunk/src/main/java/org/jboss/ws/api/tools/Message.properties
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/tools/Message.properties 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/tools/Message.properties 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1,2 +0,0 @@
-ERROR_SETTING_CONTEXT_CLASSLOADER=Error setting context classloader
-ERROR_RUNNING_PRIVILEGED_ACTION=Error running privileged action
Modified: api/trunk/src/main/java/org/jboss/ws/api/tools/SecurityActions.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/tools/SecurityActions.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/tools/SecurityActions.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -25,10 +25,7 @@
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-
/**
* Security actions for this package
*
@@ -38,7 +35,6 @@
*/
class SecurityActions
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SecurityActions.class);
/**
* Get context classloader.
*
@@ -85,31 +81,16 @@
return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>() {
public ClassLoader run() throws Exception
{
- try
- {
- ClassLoader result = Thread.currentThread().getContextClassLoader();
- if (cl != null)
- Thread.currentThread().setContextClassLoader(cl);
- return result;
- }
- catch (Exception e)
- {
- throw e;
- }
- catch (Error e)
- {
- throw e;
- }
- catch (Throwable e)
- {
- throw new RuntimeException(BundleUtils.getMessage(bundle, "ERROR_SETTING_CONTEXT_CLASSLOADER"), e);
- }
+ ClassLoader result = Thread.currentThread().getContextClassLoader();
+ if (cl != null)
+ Thread.currentThread().setContextClassLoader(cl);
+ return result;
}
});
}
catch (PrivilegedActionException e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "ERROR_RUNNING_PRIVILEGED_ACTION"), e.getCause());
+ throw new RuntimeException(e);
}
}
}
Modified: api/trunk/src/main/java/org/jboss/ws/api/util/DOMUtils.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/util/DOMUtils.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/util/DOMUtils.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,6 +21,9 @@
*/
package org.jboss.ws.api.util;
+import static org.jboss.ws.api.Messages.MESSAGES;
+import static org.jboss.ws.api.Log.LOGGER;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -31,7 +34,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
@@ -45,7 +47,6 @@
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.logging.Logger;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -64,9 +65,6 @@
*/
public abstract class DOMUtils
{
- private static Logger log = Logger.getLogger(DOMUtils.class);
- private static ResourceBundle bundle = BundleUtils.getBundle(DOMUtils.class);
-
/** Get the qname of the given node.
*/
public static QName getElementQName(Element el)
@@ -111,7 +109,7 @@
}
if (namespaceURI.equals(""))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_FIND_NAMESPACE_URI_FOR", qualifiedName));
+ throw MESSAGES.cannotFindNamespaceURI(qualifiedName);
}
else
{
@@ -244,8 +242,8 @@
// change an object in a way which is incorrect with regard to namespaces.
if (uri == null && qname.startsWith("xmlns"))
{
- if (log.isTraceEnabled())
- log.trace("Ignore attribute: [uri=" + uri + ",qname=" + qname + ",value=" + value + "]");
+ if (LOGGER.isTraceEnabled())
+ LOGGER.ignoringAttribute(uri, qname, value);
}
else
{
@@ -553,7 +551,7 @@
}
else
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "SOURCE_TYPE_NOT_IMPLEMENTED", source.getClass()));
+ throw MESSAGES.sourceTypeNotImplemented(source.getClass());
}
return retElement;
@@ -569,8 +567,7 @@
}
catch (IOException e)
{
- log.error(BundleUtils.getMessage(bundle, "CAN_NOT_PARSE", xmlString));
- log.error("Cannot parse: " + xmlString);
+ LOGGER.cannotParse(xmlString);
throw e;
}
}
@@ -636,14 +633,14 @@
{
if (prefix == null || prefix.length() == 0)
{
- if (log.isTraceEnabled())
- log.trace("createElement {" + uri + "}" + localPart);
+ if (LOGGER.isTraceEnabled())
+ LOGGER.creatingElement(uri, prefix);
return doc.createElementNS(uri, localPart);
}
else
{
- if (log.isTraceEnabled())
- log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
+ if (LOGGER.isTraceEnabled())
+ LOGGER.creatingElement(uri, prefix, localPart);
return doc.createElementNS(uri, prefix + ":" + localPart);
}
}
Deleted: api/trunk/src/main/java/org/jboss/ws/api/util/Message.properties
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/util/Message.properties 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/util/Message.properties 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1,5 +0,0 @@
-CANNOT_FIND_NAMESPACE_URI_FOR=Cannot find namespace uri for: {0}
-SOURCE_TYPE_NOT_IMPLEMENTED=Source type not implemented: {0}
-FAILED_TO_LOAD=Failed to load {0}: {1}
-CANNOT_LOAD_PROPERTIES=Cannot load properties: {0}
-CAN_NOT_PARSE = Cannot parse: {0}
Modified: api/trunk/src/main/java/org/jboss/ws/api/util/ServiceLoader.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/util/ServiceLoader.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/main/java/org/jboss/ws/api/util/ServiceLoader.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.api.util;
+import static org.jboss.ws.api.Messages.MESSAGES;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -32,7 +34,6 @@
import java.util.Collections;
import java.util.Map;
import java.util.Properties;
-import java.util.ResourceBundle;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
@@ -58,7 +59,6 @@
*/
public final class ServiceLoader
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceLoader.class);
/**
* A synchronized weak hash map that keeps factory names retrieved using Service API (META-INF/services/*) for each classloader.
* Weak keys are used to remove entries when classloaders are garbage collected; values are service-property-name -> factory name maps.
@@ -157,7 +157,7 @@
}
catch (Throwable t)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_LOAD", new Object[]{ propertyName, factoryName}), t);
+ throw MESSAGES.failedToLoad(t, new Object[]{ propertyName, factoryName});
}
return factory;
@@ -207,7 +207,7 @@
}
catch (Throwable t)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_LOAD", new Object[]{ propertyName , factoryName}), t);
+ throw MESSAGES.failedToLoad(t, new Object[]{ propertyName , factoryName});
}
}
@@ -250,7 +250,7 @@
}
catch (Throwable t)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_LOAD", new Object[]{ propertyName , factoryName}), t);
+ throw MESSAGES.failedToLoad(t, new Object[]{ propertyName , factoryName});
}
}
@@ -271,7 +271,7 @@
}
catch (Throwable t)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_LOAD", defaultFactory), t);
+ throw MESSAGES.failedToLoad(t, defaultFactory);
}
}
@@ -314,7 +314,7 @@
}
catch (IOException ex)
{
- throw new SecurityException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_PROPERTIES", filename), ex);
+ throw MESSAGES.cannotLoadProperties(ex, filename);
}
finally
{
Deleted: api/trunk/src/test/java/org/jboss/ws/api/util/BundleUtilsTest.java
===================================================================
--- api/trunk/src/test/java/org/jboss/ws/api/util/BundleUtilsTest.java 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/test/java/org/jboss/ws/api/util/BundleUtilsTest.java 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.api.util;
-
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-public class BundleUtilsTest extends TestCase
-{
- public void testI18NMessage() throws Exception
- {
- String message = BundleUtils.getMessage(BundleUtils.getBundle(this.getClass()), "CAN_NOT_PARSE", "file");
- assertTrue("English error message is expected", message.indexOf("Cannot parse") > -1);
- Locale.setDefault(java.util.Locale.FRANCE);
- message = BundleUtils.getMessage(BundleUtils.getBundle(this.getClass()), "CAN_NOT_PARSE", "file");
- assertTrue("French error message is expected", message.contains("ne peut pas analyser"));
- }
-}
Deleted: api/trunk/src/test/java/org/jboss/ws/api/util/Message_fr.properties
===================================================================
--- api/trunk/src/test/java/org/jboss/ws/api/util/Message_fr.properties 2012-09-18 10:19:01 UTC (rev 16736)
+++ api/trunk/src/test/java/org/jboss/ws/api/util/Message_fr.properties 2012-09-18 12:52:43 UTC (rev 16737)
@@ -1 +0,0 @@
-CAN_NOT_PARSE = ne peut pas analyser: {0}
\ No newline at end of file
12 years, 3 months
JBossWS SVN: r16736 - api/trunk/src/main/java/org/jboss/ws/api/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-18 06:19:01 -0400 (Tue, 18 Sep 2012)
New Revision: 16736
Modified:
api/trunk/src/main/java/org/jboss/ws/api/configuration/ClientConfigUtil.java
Log:
Fixing javadoc
Modified: api/trunk/src/main/java/org/jboss/ws/api/configuration/ClientConfigUtil.java
===================================================================
--- api/trunk/src/main/java/org/jboss/ws/api/configuration/ClientConfigUtil.java 2012-09-17 15:05:09 UTC (rev 16735)
+++ api/trunk/src/main/java/org/jboss/ws/api/configuration/ClientConfigUtil.java 2012-09-18 10:19:01 UTC (rev 16736)
@@ -52,7 +52,7 @@
* Reads a client configuration and setups the properties in the provided proxy accordingly.
* This leverages the resolveClientConfigurer() method for getting the ClientConfigure to use.
*
- * @param bp The client proxy (port) instance to setup
+ * @param proxy The client proxy (port) instance to setup
* @param configFile The configuration file
* @param configName The configuration name
*/
12 years, 3 months
JBossWS SVN: r16735 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-17 11:05:09 -0400 (Mon, 17 Sep 2012)
New Revision: 16735
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
Log:
Removing unused member
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 15:03:18 UTC (rev 16734)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 15:05:09 UTC (rev 16735)
@@ -44,7 +44,6 @@
public class JBWS1666TestCase extends JBossWSTest
{
private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
- private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
java.util.Properties props = System.getProperties();
12 years, 3 months
JBossWS SVN: r16734 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-17 11:03:18 -0400 (Mon, 17 Sep 2012)
New Revision: 16734
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
Log:
Removing system.out
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 14:33:36 UTC (rev 16733)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 15:03:18 UTC (rev 16734)
@@ -83,7 +83,6 @@
//java -jar $JBOSS_HOME/jboss-modules.jar -mp $JBOSS_HOME/modules -jar client.jar
String props = " -Dlog4j.output.dir=" + System.getProperty("log4j.output.dir") + " -jar " + jbmjar + " -mp " + jbm;
final String command = javaCmd + props + " -jar " + f.getAbsolutePath() + " " + getServerHost();
- System.out.println("**** " + command);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
executeCommand(command, bout);
String res = null;
12 years, 3 months
JBossWS SVN: r16733 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/ws/jaxws/jbws1666 and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-17 10:33:36 -0400 (Mon, 17 Sep 2012)
New Revision: 16733
Added:
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST-jbossws-cxf-client.MF
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST.MF
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
Log:
[JBWS-3531][JBWS-3503] Refactoring JBWS1666TestCase to use jboss-modules client
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-09-17 11:15:30 UTC (rev 16732)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-09-17 14:33:36 UTC (rev 16733)
@@ -378,6 +378,21 @@
<include name="org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.class" />
</classes>
</war>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1666-client.jar"
+ manifest="${tests.output.dir}/test-resources/jaxws/jbws1666/META-INF/MANIFEST.MF">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestClient.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.class" />
+ </fileset>
+ </jar>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1666-b-client.jar"
+ manifest="${tests.output.dir}/test-resources/jaxws/jbws1666/META-INF/MANIFEST-jbossws-cxf-client.MF">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestClient.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.class" />
+ </fileset>
+ </jar>
+
<!-- jaxws-jbws1694 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws1694.jar">
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 11:15:30 UTC (rev 16732)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2012-09-17 14:33:36 UTC (rev 16733)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -25,22 +25,24 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
+import javax.xml.ws.spi.Provider;
+
import junit.framework.Test;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
* [JBWS-1666] Simplify JBossWS jar dependencies
- *
- * http://jira.jboss.org/jira/browse/JBWS-1666
+ * [JBWS-3531] Provide testcase for jboss-modules enabled clients
*
* @author Thomas.Diesler(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
* @since 14-Jun-2007
*/
public class JBWS1666TestCase extends JBossWSTest
{
-
private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
@@ -51,48 +53,37 @@
return new JBossWSTestSetup(JBWS1666TestCase.class, "jaxws-jbws1666.war");
}
- public void testPortAccess() throws Exception
+ public void testClientInTestsuiteJVM() throws Exception
{
String resStr = TestClient.testPortAccess(getServerHost());
assertEquals(TestClient.REQ_STR, resStr);
}
+
+ public void testClientUsingJBossModules() throws Exception {
+ runJBossModulesClient("jaxws-jbws1666-client.jar");
+ }
- public void testClientAccess() throws Exception
- {
+ public void testClientUsingJBossModulesWithJBossWSClientAggregationModule() throws Exception {
+ if (!isIntegrationCXF()) {
+ return;
+ }
+ runJBossModulesClient("jaxws-jbws1666-b-client.jar");
+ }
+
+ private void runJBossModulesClient(String clientJar) throws Exception {
File javaFile = new File (System.getProperty("java.home") + FS + "bin" + FS + "java");
String javaCmd = javaFile.exists() ? javaFile.getCanonicalPath() : "java";
- String jbh = System.getProperty("jboss.home");
- String jbc = jbh + FS + "client";
- String jbl = jbh + FS + "lib";
+ final String jbh = System.getProperty("jboss.home");
+ final String jbm = jbh + FS + "modules";
+ final String jbmjar = jbh + FS + "jboss-modules.jar";
- // Setup the classpath - do not modify this lightheartedly.
- // Maybe you should extend the Class-Path in the MANIFEST instead.
- StringBuffer cp = new StringBuffer(System.getProperty("test.classes.directory"));
- String stackName = null;
- if (isIntegrationCXF())
- {
- stackName = "cxf";
- }
- else if (isIntegrationNative())
- {
- stackName = "native";
- }
- else
- {
- throw new Exception("unsupported stack");
- }
- cp.append(PS + jbc + FS + "jbossws-" + stackName + "-client.jar");
- cp.append(PS + jbc + FS + "jboss-common-core.jar");
- cp.append(PS + jbc + FS + "jboss-javaee.jar");
- cp.append(PS + jbc + FS + "log4j.jar");
- cp.append(PS + jbc + FS + "resolver.jar");
- cp.append(PS + jbc + FS + "xercesImpl.jar");
- cp.append(PS + jbc + FS + "jboss-logging.jar");
+ final File f = new File(JBossWSTestHelper.getTestArchiveDir(), clientJar);
- String props = " -Djava.endorsed.dirs=" + jbl + FS + "endorsed ";
- props += " -Dlog4j.output.dir=" + System.getProperty("log4j.output.dir") + " ";
- String command = javaCmd + props + " -cp " + cp + " " + TestClient.class.getName() + " " + getServerHost();
+ //java -jar $JBOSS_HOME/jboss-modules.jar -mp $JBOSS_HOME/modules -jar client.jar
+ String props = " -Dlog4j.output.dir=" + System.getProperty("log4j.output.dir") + " -jar " + jbmjar + " -mp " + jbm;
+ final String command = javaCmd + props + " -jar " + f.getAbsolutePath() + " " + getServerHost();
+ System.out.println("**** " + command);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
executeCommand(command, bout);
String res = null;
@@ -101,6 +92,7 @@
BufferedReader reader = new BufferedReader(new java.io.StringReader(output));
res = reader.readLine();
}
- assertEquals(TestClient.REQ_STR, res);
+ //check result (includes check on Provider impl, which might be affected by missing javax.xml.ws.api module dependency
+ assertEquals(Provider.provider().getClass().getName() + ", " + TestClient.REQ_STR, res);
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2012-09-17 11:15:30 UTC (rev 16732)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2012-09-17 14:33:36 UTC (rev 16733)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -25,6 +25,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import javax.xml.ws.spi.Provider;
public class TestClient
{
@@ -46,6 +47,6 @@
{
String serverHost = args[0];
String resStr = testPortAccess(serverHost);
- System.out.println(resStr);
+ System.out.println(Provider.provider().getClass().getName() + ", " + resStr);
}
}
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST-jbossws-cxf-client.MF
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST-jbossws-cxf-client.MF (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST-jbossws-cxf-client.MF 2012-09-17 14:33:36 UTC (rev 16733)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: org.jboss.test.ws.jaxws.jbws1666.TestClient
+Dependencies: org.jboss.ws.cxf.jbossws-cxf-client
\ No newline at end of file
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST.MF
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST.MF (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1666/META-INF/MANIFEST.MF 2012-09-17 14:33:36 UTC (rev 16733)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: org.jboss.test.ws.jaxws.jbws1666.TestClient
+Dependencies: javax.jws.api,javax.xml.ws.api
\ No newline at end of file
12 years, 3 months