JBossWS SVN: r16867 - shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-12 09:35:57 -0400 (Fri, 12 Oct 2012)
New Revision: 16867
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
[JBWS-10027] fix compilation issues due to wrong backport
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 13:31:58 UTC (rev 16866)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 13:35:57 UTC (rev 16867)
@@ -33,6 +33,8 @@
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
import org.jboss.ws.common.concurrent.CopyJob;
import org.jboss.ws.common.io.TeeOutputStream;
13 years, 3 months
JBossWS SVN: r16866 - in shared-testsuite/branches/jbossws-shared-testsuite-4.0.x: src/main/java/org/jboss/wsf/test and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-12 09:31:58 -0400 (Fri, 12 Oct 2012)
New Revision: 16866
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
[JBPAPP-10027] backport appclient fix - svn merge -r 16864:16865 https://svn.jboss.org/repos/jbossws/shared-testsuite/trunk
Property changes on: shared-testsuite/branches/jbossws-shared-testsuite-4.0.x
___________________________________________________________________
Modified: svn:mergeinfo
- /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068,16272,16346
+ /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068,16272,16346,16865
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 13:19:39 UTC (rev 16865)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 13:31:58 UTC (rev 16866)
@@ -49,7 +49,7 @@
private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS + "appclient" + EXT;
private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>();
- private static ExecutorService es = Executors.newCachedThreadPool();
+ private static ExecutorService es = Executors.newCachedThreadPool(AppclientDaemonFactory.INSTANCE);
private static String appclientOutputDir;
private static class AppclientProcess {
@@ -222,4 +222,24 @@
final int sharpIndex = archive.indexOf('#');
return archive.substring(0, sharpIndex);
}
+
+ // [JBPAPP-10027] appclient threads are always daemons (to don't block JVM shutdown)
+ private static class AppclientDaemonFactory implements ThreadFactory {
+ static final AppclientDaemonFactory INSTANCE = new AppclientDaemonFactory();
+ final ThreadGroup group;
+ final AtomicInteger threadNumber = new AtomicInteger(1);
+ final String namePrefix;
+
+ AppclientDaemonFactory() {
+ group = Thread.currentThread().getThreadGroup();
+ namePrefix = "appclient-output-processing-daemon-";
+ }
+
+ public Thread newThread(final Runnable r) {
+ final Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement());
+ t.setDaemon(true);
+ t.setPriority(Thread.NORM_PRIORITY);
+ return t;
+ }
+ }
}
13 years, 3 months
JBossWS SVN: r16865 - shared-testsuite/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-12 09:19:39 -0400 (Fri, 12 Oct 2012)
New Revision: 16865
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
[JBPAPP-10027] fix JVM shutdown freeze in testsuite on Windows OS
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 11:16:22 UTC (rev 16864)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2012-10-12 13:19:39 UTC (rev 16865)
@@ -34,6 +34,8 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Semaphore;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
import org.jboss.ws.common.concurrent.CopyJob;
import org.jboss.ws.common.io.TeeOutputStream;
@@ -51,7 +53,7 @@
private static final String appclientScript = JBOSS_HOME + FS + "bin" + FS + "appclient" + EXT;
private static final Semaphore s = new Semaphore(1, true); //one appclient only can be running at the same time ATM
private static Map<String, AppclientProcess> appclients = new HashMap<String, AppclientProcess>(1);
- private static ExecutorService es = Executors.newCachedThreadPool();
+ private static ExecutorService executors = Executors.newCachedThreadPool(AppclientDaemonFactory.INSTANCE);
private static String appclientOutputDir;
private static class AppclientProcess {
@@ -139,8 +141,8 @@
// appclient err
ap.errTask = new CopyJob(ap.process.getErrorStream(), ap.log);
// unfortunately the following threads are needed because of Windows behavior
- es.submit(ap.outTask);
- es.submit(ap.errTask);
+ executors.submit(ap.outTask);
+ executors.submit(ap.errTask);
return ap;
} catch (Exception e) {
s.release();
@@ -231,4 +233,25 @@
final int sharpIndex = archive.indexOf('#');
return archive.substring(0, sharpIndex);
}
+
+ // [JBPAPP-10027] appclient threads are always daemons (to don't block JVM shutdown)
+ private static class AppclientDaemonFactory implements ThreadFactory {
+ static final AppclientDaemonFactory INSTANCE = new AppclientDaemonFactory();
+ final ThreadGroup group;
+ final AtomicInteger threadNumber = new AtomicInteger(1);
+ final String namePrefix;
+
+ AppclientDaemonFactory() {
+ group = Thread.currentThread().getThreadGroup();
+ namePrefix = "appclient-output-processing-daemon-";
+ }
+
+ public Thread newThread(final Runnable r) {
+ final Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement());
+ t.setDaemon(true);
+ t.setPriority(Thread.NORM_PRIORITY);
+ return t;
+ }
+ }
+
}
13 years, 3 months
JBossWS SVN: r16864 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core/jaxrpc/binding and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-10-12 07:16:22 -0400 (Fri, 12 Oct 2012)
New Revision: 16864
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/Message.properties
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
Log:
[JBWS-3509] Converting native messages to new logging
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -40,6 +40,7 @@
import org.jboss.logging.LogMessage;
import org.jboss.logging.Message;
import org.jboss.logging.MessageLogger;
+import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
/**
* JBossWS-CXF log messages
@@ -273,4 +274,48 @@
@Message(id = 25250, value = "JAX-RPC Service error")
void jaxRpcServiceError(@Cause Throwable cause);
-}
+ @LogMessage(level = INFO)
+ @Message(id = 25257, value = "Deprecated use of <call-properties> on JAXRPC Stub. Use <stub-properties>")
+ void deprecatedUseOfCallPropsOnJAXRPCStub();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 25258, value = "Adding client side handler to endpoint '%s': %s")
+ void addingClientSideHandlerToEndpoint(QName portName, Object handlerInfo);
+
+ @LogMessage(level = INFO)
+ @Message(id = 25259, value = "Using jaxrpc-mapping from: %s")
+ void useJaxRpcMappingFrom(URL mappingURL);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 25260, value = "Add handler to: %s%s")
+ void addHandlerTo(QName portName, HandlerMetaDataJAXRPC handler);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25269, value = "Cannot set endpoint address for port-component-link, unsuported number of endpoints.")
+ void cannotSetEndpointAddressForPCL();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25271, value = "Cannot create Service")
+ void cannotCreateService(@Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25274, value = "Unable to narrow port selection for %s")
+ void unableToNarrowPortSelection(Object obj);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25284, value = "Cannot obtain TypeBinding for: %s")
+ void cannotObtainTypeBindingFor(QName type);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25285, value = "Ambiguous binding for attribute: %s")
+ void ambiguosBinding(String attr);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25288, value = "Type definition not found in schema: %s")
+ void typeDefinitionNotInSchema(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25289, value = "Global element not found in schema: %s")
+ void globalElementNotInSchema(QName qname);
+
+}
\ No newline at end of file
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -29,9 +29,11 @@
import java.util.Collection;
import javax.management.ObjectName;
+import javax.naming.NamingException;
import javax.wsdl.Part;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.ServiceException;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
@@ -481,7 +483,7 @@
UnsupportedOperationException noSoapMessageAvailable(Class<?> clazz);
@Message(id = 25175, value = "Cannot obtain operation meta data for %s")
- WSException cannotObtainOperationMetaData(QName opName);
+ WSException cannotObtainOperationMetaData(Object opName);
@Message(id = 25176, value = "Target endpoint address not set")
WSException targetEndpointAddressNotSet();
@@ -648,4 +650,100 @@
@Message(id = 25251, value = "Don't know how to invoke method %s")
JAXRPCException dontKnowHowToInvoke(Method method);
-}
+ @Message(id = 25252, value = "Cannot find endpoint for name: %s")
+ ServiceException cannotFindEndpointForName(QName portName);
+
+ @Message(id = 25253, value = "Components should not use the %s method.")
+ UnsupportedOperationException shouldNotUseMethod(String m);
+
+ @Message(id = 25254, value = "SEI does not implement java.rmi.Remote: %s")
+ String notImplementRemote(String sei);
+
+ @Message(id = 25255, value = "Service meta data not available")
+ ServiceException serviceMetaDataNotAvailable();
+
+ @Message(id = 25256, value = "Cannot find endpoint meta data for: %s")
+ ServiceException cannotFindEndpointMetaData(Object obj);
+
+ @Message(id = 25261, value = "Unsupported property: %s")
+ JAXRPCException unsupportedPropery(String prop);
+
+ @Message(id = 25262, value = "Return value not supported by: %s")
+ WSException returnValueNotSupportedBy(Object obj);
+
+ @Message(id = 25263, value = "Call invocation failed with code [%s] because of: %s")
+ String callInvocationFailedBecauseOf(String faultCode, String faultString);
+
+ @Message(id = 25264, value = "Call invocation failed")
+ String callInvocationFailed();
+
+ @Message(id = 25265, value = "Different java type already registered: %s")
+ IllegalArgumentException differentJavaTypeAlreadyRegistered(String t);
+
+ @Message(id = 25266, value = "Cannot obtain response payload")
+ JAXRPCException cannotObtainResponsePayload(@Cause Throwable cause);
+
+ @Message(id = 25267, value = "Output parameters not available")
+ JAXRPCException outputParamsNotAvailable();
+
+ @Message(id = 25268, value = "Cannot obtain path to PortComponentLinkServlet")
+ NamingException cannotObtainPathToPCLServlet(@Cause Throwable cause);
+
+ @Message(id = 25270, value = "The service interface does not implement javax.xml.rpc.Service: %s")
+ JAXRPCException interfaceDoesNotImplementJAXRPCService(String intf);
+
+ @Message(id = 25272, value = "Within a <service-ref> it's not allowed to use a SEI across different <port-component-ref>'s: %s")
+ WSException notAllowedToUseInServiceRef(String seiName);
+
+ @Message(id = 25273, value = "Failed to narrow available endpoints by <port-component-ref> declaration")
+ WSException failedToNarrowavailableEpsByPcRef();
+
+ @Message(id = 25275, value = "Cannot unmarshal jaxrpc-mapping file: %s")
+ WSException cannotUnmarshallJAXRPCMapping(String jaxrpcMappingFile, @Cause Throwable cause);
+
+ @Message(id = 25276, value = "Value is not a %s: %s")
+ IllegalArgumentException valueIsNotA(Class<?> expectedClass, Class<?> actualClass);
+
+ @Message(id = 25277, value = "Cannot obtain component xmlType: %s")
+ WSException cannotObtainComponentXmlType(Object t);
+
+ @Message(id = 25278, value = "Cannot obtain component serializer for: %s")
+ WSException cannotObtainComponentSerializerFor(QName qname);
+
+ @Message(id = 25279, value = "Unsupported array type: %s")
+ WSException unsupportedArrayType(Class<?> t);
+
+ @Message(id = 25280, value = "Cannot obtain component deserializer for: %s")
+ WSException cannotObtainComponentDeserializerFor(QName qname);
+
+ @Message(id = 25281, value = "Unsupported array dimensions: %s")
+ WSException unsupportedArrayDimensions(int l);
+
+ @Message(id = 25282, value = "Cannot obtain attribute: %s")
+ WSException cannotObtainAttribute(QName qname);
+
+ @Message(id = 25283, value = "Invalid xmlType: %s")
+ IllegalArgumentException invalidXmlType(QName xmlType);
+
+ @Message(id = 25286, value = "Attribute %s found in jaxrpc-mapping but not in the schema: %s")
+ WSException attributeNotInSchema(QName attr, QName schema);
+
+ @Message(id = 25287, value = "Element %s found in jaxrpc-mapping but not in the schema: %s")
+ WSException elementNotInSchema(QName el, QName schema);
+
+ @Message(id = 25290, value = "Unexpected qname-scope for %s: %s")
+ WSException unexpectedQNameScope(String s1, String s2);
+
+ @Message(id = 25291, value = "Root type %s not found in the schema.")
+ WSException rootTypeNotFoundInSchema(QName qname);
+
+ @Message(id = 25292, value = "Cannot find required property: %s")
+ WSException cannotFindRequiredProperty(String prop);
+
+ @Message(id = 25293, value = "Failed to marshal DOM element %s")
+ IllegalStateException failedToMarshalDOMElement(QName elem, @Cause Throwable cause);
+
+ @Message(id = 25294, value = "The given root element name must be prefix qualified: %s")
+ IllegalArgumentException mustBePrefixQualified(QName elem);
+
+}
\ No newline at end of file
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -22,13 +22,12 @@
package org.jboss.ws.core.jaxrpc.binding;
import java.util.Calendar;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
@@ -43,7 +42,6 @@
*/
public class CalendarDeserializer extends DeserializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CalendarDeserializer.class);
// provide logging
private static final Logger log = Logger.getLogger(CalendarDeserializer.class);
@@ -68,7 +66,7 @@
value = SimpleTypeBindings.unmarshalTime(valueStr);
else if (Constants.TYPE_LITERAL_DATETIME.equals(xmlType))
value = SimpleTypeBindings.unmarshalDateTime(valueStr);
- else throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_XMLTYPE", xmlType));
+ else throw NativeMessages.MESSAGES.invalidXmlType(xmlType);
}
return value;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -22,13 +22,12 @@
package org.jboss.ws.core.jaxrpc.binding;
import java.util.Calendar;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
@@ -45,7 +44,6 @@
*/
public class CalendarSerializer extends SerializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CalendarSerializer.class);
// provide logging
private static final Logger log = Logger.getLogger(CalendarSerializer.class);
@@ -62,7 +60,7 @@
else if (Constants.TYPE_LITERAL_DATETIME.equals(xmlType))
valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
else
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_XMLTYPE", xmlType));
+ throw NativeMessages.MESSAGES.invalidXmlType(xmlType);
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,13 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
-import java.util.ResourceBundle;
-
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
@@ -44,7 +42,6 @@
*/
public class ElementSerializer extends SerializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ElementSerializer.class);
// provide logging
private static final Logger log = Logger.getLogger(ElementSerializer.class);
@@ -59,9 +56,9 @@
{
log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ELEMENT_VALUE_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("value");
if ((value instanceof Element) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "VALUE_IS_NOT_A_ELEMENT", value.getClass().getName()));
+ throw NativeMessages.MESSAGES.valueIsNotA(Element.class, value.getClass());
String xmlFragment = DOMWriter.printNode((Element)value, false);
return new BufferedStreamResult(xmlFragment);
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Message.properties 2012-10-12 11:16:22 UTC (rev 16864)
@@ -1,17 +0,0 @@
-ELEMENT_VALUE_CANNOT_BE_NULL=Element value cannot be null
-VALUE_IS_NOT_A_ELEMENT=Value is not a Element: {0}
-USE_SERIALIZE=Use serialize(SOAPContenentElement, SerializationContext)
-
-CANNOT_OBTAIN_COMPONENT_XMLTYPE=Cannot obtain component xmlType for: {0}
-CANNOT_OBTAIN_COMPONENT_DESERIALIZER=Cannot obtain component serializer for: javaType={0} xmlType={1}
-CANNOT_OBTAIN_COMPONENT_DESERIALIZER_FOR=Cannot obtain component serializer for: {1}
-CANNOT_OBTAIN_COMPONENT_SERIALIZER=Cannot obtain component serializer for: {0}
-UNSUPPORTED_ARRAY_TYPE=Unsupported array type: {0}
-CANNOT_OBTAIN_COMPONENT_XMLTYPE=Cannot obtain component xmlType: {0}
-
-UNSUPPORTED_ARRAY_DIMENSIONS=Unsupported array dimensions: {0}
-CANNOT_OBTAIN_ATTRIBUTE=Cannot obtain attribute: {0}
-CANNOT_OBTAIN_JAVATYPE=Cannot obtain javaType for: {0}
-INVALID_XMLTYPE=Invalid xmlType: {0}
-SOAPELEMENT_VALUE_CANNOT_BE_NULL=SOAPElement value cannot be null
-VALUE_IS_NOT_A_SOAPELEMENT=Value is not a SOAPElement: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,9 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.lang.reflect.Array;
import java.util.Iterator;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.xml.namespace.QName;
@@ -31,8 +32,6 @@
import javax.xml.transform.dom.DOMSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.JavaUtils;
@@ -52,7 +51,6 @@
*/
public class SOAPArrayDeserializer extends DeserializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPArrayDeserializer.class);
// provide logging
private static final Logger log = Logger.getLogger(SOAPArrayDeserializer.class);
@@ -71,7 +69,7 @@
paramMetaData.setSOAPArrayCompType(compXmlType);
if (compXmlType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_XMLTYPE", paramMetaData.getPartName()));
+ throw MESSAGES.cannotObtainComponentXmlType(paramMetaData.getPartName());
Class compJavaType = getJavaTypeForComponentType(compXmlType, serContext);
@@ -85,18 +83,17 @@
AbstractDeserializerFactory compDeserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(compJavaType, compXmlType);
if (compDeserializerFactory == null)
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_DESERIALIZER", new Object[]{ compJavaType.getName() , compXmlType }));
compDeserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(null, compXmlType);
}
if (compDeserializerFactory == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_DESERIALIZER_FOR", compXmlType));
+ throw MESSAGES.cannotObtainComponentDeserializerFor(compXmlType);
// Get the component type deserializer
componentDeserializer = (DeserializerSupport)compDeserializerFactory.getDeserializer();
if (arrDims.length < 1 || 2 < arrDims.length)
- throw new WSException(BundleUtils.getMessage(bundle, "UNSUPPORTED_ARRAY_DIMENSIONS", arrDims));
+ throw MESSAGES.unsupportedArrayDimensions(arrDims.length);
Iterator it = DOMUtils.getChildElements(soapElement);
if (arrDims.length == 1)
@@ -150,7 +147,7 @@
QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
if (arrayType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ATTRIBUTE", attrQName));
+ throw MESSAGES.cannotObtainAttribute(attrQName);
String localPart = arrayType.getLocalPart();
int dimIndex = localPart.indexOf("[");
@@ -169,7 +166,7 @@
QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
if (arrayType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ATTRIBUTE", attrQName));
+ throw MESSAGES.cannotObtainAttribute(attrQName);
String nsURI = arrayType.getNamespaceURI();
String localPart = arrayType.getLocalPart();
@@ -184,7 +181,7 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(compXmlType);
if (javaType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVATYPE", compXmlType));
+ throw MESSAGES.cannotObtainAttribute(compXmlType);
return JavaUtils.getWrapperType(javaType);
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,14 +21,12 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
-import java.util.ResourceBundle;
+import static org.jboss.ws.NativeMessages.MESSAGES;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.AbstractSerializerFactory;
@@ -50,7 +48,6 @@
*/
public class SOAPArraySerializer extends SerializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPArraySerializer.class);
// provide logging
private static final Logger log = Logger.getLogger(SOAPArraySerializer.class);
@@ -81,7 +78,7 @@
try
{
if (paramMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "USE_SERIALIZE"));
+ throw new IllegalStateException();
QName compXmlName = paramMetaData.getXmlName();
QName compXmlType = paramMetaData.getSOAPArrayCompType();
@@ -103,18 +100,17 @@
}
if (compXmlType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_XMLTYPE", compJavaType));
+ throw MESSAGES.cannotObtainComponentXmlType(compJavaType);
// Get the component type serializer factory
log.debug("Get component serializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
AbstractSerializerFactory compSerializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(compJavaType, compXmlType);
if (compSerializerFactory == null)
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_SERIALIZER", new Object[]{ compJavaType.getName() , compXmlType }));
compSerializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(null, compXmlType);
}
if (compSerializerFactory == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_COMPONENT_SERIALIZER", compXmlType));
+ throw MESSAGES.cannotObtainComponentSerializerFor(compXmlType);
// Get the component type serializer
compSerializer = (SerializerSupport)compSerializerFactory.getSerializer();
@@ -128,7 +124,7 @@
buffer = new StringBuilder("<" + nodeName + " xmlns:" + Constants.PREFIX_SOAP11_ENC + "='" + Constants.URI_SOAP11_ENC + "' ");
if (!(value instanceof Object[]))
- throw new WSException(BundleUtils.getMessage(bundle, "UNSUPPORTED_ARRAY_TYPE", javaType));
+ throw MESSAGES.unsupportedArrayType(javaType);
Object[] objArr = (Object[])value;
String arrayDim = "" + objArr.length;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,14 +21,12 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
-import java.util.ResourceBundle;
-
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
@@ -44,7 +42,6 @@
*/
public class SOAPElementSerializer extends SerializerSupport
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPElementSerializer.class);
// provide logging
private static final Logger log = Logger.getLogger(SOAPElementSerializer.class);
@@ -58,9 +55,9 @@
{
log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SOAPELEMENT_VALUE_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("value");
if ((value instanceof SOAPElement) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "VALUE_IS_NOT_A_SOAPELEMENT", value.getClass().getName()));
+ throw NativeMessages.MESSAGES.valueIsNotA(SOAPElement.class, value.getClass());
String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
return new BufferedStreamResult(xmlFragment);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -25,13 +25,10 @@
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.HashMap;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
@@ -50,11 +47,6 @@
* @since 05-Jul-2006
*/
public class JBossXBMarshallerImpl implements JBossXBMarshaller {
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXBMarshallerImpl.class);
-
- // provide logging
- private static final Logger log = Logger.getLogger(JBossXBMarshallerImpl.class);
-
// The marshaller properties
private HashMap properties = new HashMap();
@@ -184,7 +176,7 @@
public Object getProperty(String name)
{
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NAME_PARAMETER_IS_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("name");
return properties.get(name);
}
@@ -197,7 +189,7 @@
public void setProperty(String name, Object value)
{
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NAME_PARAMETER_IS_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("name");
properties.put(name, value);
}
@@ -216,16 +208,16 @@
private void assertRequiredProperties()
{
if (getProperty(JBossXBConstants.JBXB_SCHEMA_READER) == null && getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_REQUIRED_PROPERTY", JBossXBConstants.JBXB_XS_MODEL));
+ throw NativeMessages.MESSAGES.cannotFindRequiredProperty(JBossXBConstants.JBXB_XS_MODEL);
if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_REQUIRED_PROPERTY", JBossXBConstants.JBXB_JAVA_MAPPING));
+ throw NativeMessages.MESSAGES.cannotFindRequiredProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
if (xmlName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_REQUIRED_PROPERTY", JBossXBConstants.JBXB_ROOT_QNAME));
+ throw NativeMessages.MESSAGES.cannotFindRequiredProperty(JBossXBConstants.JBXB_ROOT_QNAME);
if (xmlName.getNamespaceURI().length() > 0 && xmlName.getPrefix().length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "MUST_BE_PREFIX_QUALIFIED", xmlName));
+ throw NativeMessages.MESSAGES.mustBePrefixQualified(xmlName);
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -22,11 +22,10 @@
package org.jboss.ws.core.jaxrpc.binding.jbossxb;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.utils.MessageContextAssociation;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
@@ -47,7 +46,6 @@
* @since May 31, 2006
*/
public class JBossXBSupport {
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXBSupport.class);
/**
* Setup SchemaBinding associated with the ServiceMetaData.
@@ -122,7 +120,7 @@
}
catch (SAXException e1)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_MARSHAL_DOM_ELEMENT", new Object[]{new QName(e.getNamespaceURI(), e.getLocalName()) , e1.getMessage()}));
+ throw NativeMessages.MESSAGES.failedToMarshalDOMElement(new QName(e.getNamespaceURI(), e.getLocalName()), e1);
}
}
};
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -23,10 +23,8 @@
import java.io.InputStream;
import java.util.HashMap;
-import java.util.ResourceBundle;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.UnmarshallerFactory;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
@@ -40,7 +38,6 @@
*/
public class JBossXBUnmarshallerImpl implements JBossXBUnmarshaller
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXBUnmarshallerImpl.class);
// The marshaller properties
private HashMap<String, Object> properties = new HashMap<String, Object>();
@@ -70,7 +67,7 @@
public Object getProperty(String name)
{
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NAME_PARAMETER_IS_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("name");
return properties.get(name);
}
@@ -81,7 +78,7 @@
public void setProperty(String name, Object value)
{
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NAME_PARAMETER_IS_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("name");
properties.put(name, value);
}
@@ -93,12 +90,12 @@
{
if (getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_REQUIRED_PROPERTY", JBossXBConstants.JBXB_XS_MODEL));
+ throw NativeMessages.MESSAGES.cannotFindRequiredProperty(JBossXBConstants.JBXB_XS_MODEL);
}
if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_REQUIRED_PROPERTY", JBossXBConstants.JBXB_JAVA_MAPPING));
+ throw NativeMessages.MESSAGES.cannotFindRequiredProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
}
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/Message.properties 2012-10-12 11:16:22 UTC (rev 16864)
@@ -1,14 +0,0 @@
-CANNOT_OBTAIN_TYPE_BINDING=Cannot obtain type binding for: {0}
-AMBIGUOUS_BINDING=Ambiguous binding for attribute: {0}
-ATTRIBUTE_NOT_IN_SCHEMA=Attribute {0} found in jaxrpc-mapping but not in the schema: {1}
-ELEMENT_NOT_IN_SCHEMA=Element {0} found in jaxrpc-mapping but not in the schema: {1}
-TYPE_DEFINITION_NOT_FOUND_IN_SCHEMA=Type definition not found in schema: {0}
-GLOBAL_ELEMENT_NOT_FOUND_IN_SCHEMA=Global element not found in schema: {0}
-UNEXPECTED_QNAME_SCOPE=Unexpected qname-scope for {0}: {1}
-ROOT_TYPE_NOT_FOUND_IN_SCHEMA=Root type {0} not found in the schema.
-FAILED_TO_CREATE_SOAPELEMENT=Failed to create SOAPElement
-FAILED_TO_CREATE_SOAPELEMENT_FACTORY=Failed to create soap element factory
-NAME_PARAMETER_IS_NULL=name parameter is null
-CANNOT_FIND_REQUIRED_PROPERTY=Cannot find required property: {0}
-FAILED_TO_MARSHAL_DOM_ELEMENT=Failed to marshal DOM element {0}: {1}
-MUST_BE_PREFIX_QUALIFIED=The given root element name must be prefix qualified: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -23,7 +23,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import java.util.ResourceBundle;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
@@ -34,8 +33,8 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.utils.JBossWSEntityResolver;
import org.jboss.ws.metadata.jaxrpcmapping.ExceptionMapping;
@@ -77,7 +76,6 @@
*/
public class SchemaBindingBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SchemaBindingBuilder.class);
// provide logging
private static final Logger log = Logger.getLogger(SchemaBindingBuilder.class);
@@ -236,7 +234,7 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_TYPE_BINDING", xmlType));
+ NativeLoggers.JAXRPC_LOGGER.cannotObtainTypeBindingFor(xmlType);
}
}
@@ -256,7 +254,7 @@
if (auxBinding.getQName().getLocalPart().equals(xmlAttrName))
{
if (attrBinding != null)
- log.warn(BundleUtils.getMessage(bundle, "AMBIGUOUS_BINDING", xmlAttrName));
+ NativeLoggers.JAXRPC_LOGGER.ambiguosBinding(xmlAttrName);
attrBinding = auxBinding;
}
@@ -279,7 +277,7 @@
if (attrBinding == null)
{
QName typeQName = typeBinding.getQName();
- throw new WSException(BundleUtils.getMessage(bundle, "ATTRIBUTE_NOT_IN_SCHEMA", new Object[]{ xmlName , typeQName}));
+ throw NativeMessages.MESSAGES.attributeNotInSchema(xmlName, typeQName);
}
String javaVariableName = varMapping.getJavaVariableName();
@@ -322,7 +320,7 @@
}
if (element == null)
- throw new WSException(BundleUtils.getMessage(bundle, "ELEMENT_NOT_IN_SCHEMA", new Object[]{ xmlName , typeQName}));
+ throw NativeMessages.MESSAGES.elementNotInSchema(xmlName, typeQName);
String javaVariableName = varMapping.getJavaVariableName();
if (javaVariableName != null)
@@ -380,7 +378,7 @@
typeBinding = schemaBinding.getType(xmlType);
if (typeBinding == null)
{
- log.warn(BundleUtils.getMessage(bundle, "TYPE_DEFINITION_NOT_FOUND_IN_SCHEMA", xmlType));
+ NativeLoggers.JAXRPC_LOGGER.typeDefinitionNotInSchema(xmlType);
}
}
else if ("element".equals(qnameScope))
@@ -392,12 +390,12 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "GLOBAL_ELEMENT_NOT_FOUND_IN_SCHEMA", xmlType));
+ NativeLoggers.JAXRPC_LOGGER.globalElementNotInSchema(xmlType);
}
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "UNEXPECTED_QNAME_SCOPE", new Object[]{ typeMapping.getJavaType() , qnameScope}));
+ throw NativeMessages.MESSAGES.unexpectedQNameScope(typeMapping.getJavaType(), qnameScope);
}
return typeBinding;
}
@@ -462,7 +460,7 @@
}
else if (xmlType.equals(Constants.TYPE_LITERAL_ANYTYPE) == false)
{
- throw new WSException(BundleUtils.getMessage(bundle, "ROOT_TYPE_NOT_FOUND_IN_SCHEMA", xmlType ));
+ throw NativeMessages.MESSAGES.rootTypeNotFoundInSchema(xmlType);
}
}
@@ -605,7 +603,7 @@
}
catch (SOAPException e)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_SOAPELEMENT"), e);
+ throw new IllegalStateException(e);
}
if (attrs != null)
@@ -646,7 +644,7 @@
}
catch (SOAPException e)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_SOAPELEMENT_FACTORY"), e);
+ throw new IllegalStateException(e);
}
}
return factory;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.client;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -31,7 +33,6 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -45,7 +46,6 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.CommonBindingProvider;
@@ -81,7 +81,6 @@
*/
public class CallImpl extends CommonClient implements Call, RoleSource
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CallImpl.class);
// provide logging
private static Logger log = Logger.getLogger(CallImpl.class);
@@ -198,7 +197,6 @@
// the javaType can be derived from the xmlType
if (javaType == null)
{
- log.warn(BundleUtils.getMessage(bundle, "REGISTER_UNQUALIFIED_PARAMETER", xmlType));
javaType = new UnqualifiedCallParameter(xmlType).getClass();
typeMapping.register(javaType, xmlType, null, null);
}
@@ -219,8 +217,10 @@
*/
public void addParameter(QName xmlName, QName xmlType, Class javaType, ParameterMode mode, boolean inHeader)
{
- if (xmlType == null || javaType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_PARAMETER"));
+ if (xmlType == null)
+ throw MESSAGES.illegalNullArgument("xmlType");
+ if (javaType == null)
+ throw MESSAGES.illegalNullArgument("javaType");
OperationMetaData opMetaData = getOperationMetaData();
ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaType.getName());
@@ -256,8 +256,10 @@
*/
public void setReturnType(QName xmlType, Class javaType)
{
- if (xmlType == null || javaType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_PARAMETER"));
+ if (xmlType == null)
+ throw MESSAGES.illegalNullArgument("xmlType");
+ if (javaType == null)
+ throw MESSAGES.illegalNullArgument("javaType");
OperationMetaData opMetaData = getOperationMetaData();
QName xmlName = new QName("");
@@ -309,7 +311,7 @@
public List getOutputValues()
{
if (epInv == null)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "OUTPUT_PARAMS_NOT_AVAILABLE"));
+ throw MESSAGES.outputParamsNotAvailable();
try
{
@@ -333,7 +335,7 @@
}
catch (SOAPException ex)
{
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_RESPONSE_PAYLOAD"), ex);
+ throw MESSAGES.cannotObtainResponsePayload(ex);
}
}
@@ -346,7 +348,7 @@
public Map getOutputParams()
{
if (epInv == null)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "OUTPUT_PARAMS_NOT_AVAILABLE"));
+ throw MESSAGES.outputParamsNotAvailable();
try
{
@@ -360,7 +362,7 @@
}
catch (SOAPException ex)
{
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_RESPONSE_PAYLOAD"), ex);
+ throw MESSAGES.cannotObtainResponsePayload(ex);
}
}
@@ -449,10 +451,10 @@
public Object getProperty(String name)
{
if (null == name)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_PROPERTY", name));
+ throw MESSAGES.unsupportedPropery(name);
// CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_PROPERTY", name));
+ throw MESSAGES.unsupportedPropery(name);
return properties.get(name);
}
@@ -462,11 +464,11 @@
public void setProperty(String name, Object value)
{
if (null == name)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_PROPERTY", name));
+ throw MESSAGES.unsupportedPropery(name);
// CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_PROPERTY", name));
+ throw MESSAGES.unsupportedPropery(name);
if (log.isDebugEnabled())
log.debug("setProperty: [name=" + name + ",value=" + value + "]");
@@ -532,9 +534,9 @@
}
catch (SOAPFaultException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CALL_INVOCATION_FAILED"), ex);
+ log.error(MESSAGES.callInvocationFailed(), ex);
String faultCode = ex.getFaultCode().getLocalPart();
- throw new RemoteException(BundleUtils.getMessage(bundle, "CALL_INVOCATION_FAILED_CAUSE", new Object[]{ faultCode , ex.getFaultString()}), ex);
+ throw new RemoteException(MESSAGES.callInvocationFailedBecauseOf(faultCode, ex.getFaultString()), ex);
}
catch (RemoteException rex)
{
@@ -546,7 +548,7 @@
}
catch (Exception ex)
{
- throw new RemoteException(BundleUtils.getMessage(bundle, "CALL_INVOCATION_FAILED"), ex);
+ throw new RemoteException(MESSAGES.callInvocationFailed(), ex);
}
finally
{
@@ -656,7 +658,7 @@
}
else if (regJavaType != null && JavaUtils.isAssignableFrom(regJavaType, javaType) == false)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ALREADY_REGISTERED", regJavaType.getName()));
+ throw MESSAGES.differentJavaTypeAlreadyRegistered(regJavaType.getName());
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -27,7 +27,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -35,8 +34,8 @@
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.jaxrpc.handler.ClientHandlerChain;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
@@ -60,10 +59,6 @@
*/
public class HandlerRegistryImpl implements HandlerRegistry
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HandlerRegistryImpl.class);
- // provide logging
- private static Logger log = Logger.getLogger(HandlerRegistryImpl.class);
-
// Map<QName,HandlerChain> the endpoint name to a HandlerChain
private Map<QName, HandlerChain> handlerChains = new HashMap<QName, HandlerChain>();
// Maps the port name to a list of HandlerInfo objects
@@ -108,7 +103,7 @@
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_META_DATA", portName));
+ throw NativeMessages.MESSAGES.cannotObtainEndpointMetaData(portName);
epMetaData.clearHandlers();
for (HandlerInfo info : infos)
@@ -142,7 +137,7 @@
handler.setInitParams(initParams);
epMetaData.addHandler(handler);
- log.debug("Add handler to: " + portName + handler);
+ NativeLoggers.JAXRPC_LOGGER.addHandlerTo(portName, handler);
}
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties 2012-10-12 11:16:22 UTC (rev 16864)
@@ -1,27 +0,0 @@
-REGISTER_UNQUALIFIED_PARAMETER=Register unqualified call parameter for: {0}
-INVALID_NULL_PARAMETER=Invalid null parameter
-OUTPUT_PARAMS_NOT_AVAILABLE=Output params not available
-CANNOT_OBTAIN_RESPONSE_PAYLOAD=Cannot obtain response payload
-CALL_INVOCATION_FAILED=Call invocation failed
-CALL_INVOCATION_FAILED_CAUSE=Call invocation failed with code [{0}] because of: {1}
-ALREADY_REGISTERED=Different java type already registered: {0}
-
-CANNOT_OBTAIN_ENDPOINT_META_DATA=Cannot obtain endpoint meta data for: {0}
-CANNOT_FIND_ENDPOINT=Cannot find endpoint for name: {0}
-SHOULD_NOT_USE_METHOD=Components should not use the {0} method.
-SEI_CLASS_CANNOT_BE_NULL=SEI class cannot be null
-
-SERVICE_META_DATA_NOT_AVAILABLE=Service meta data not available
-CANNOT_FIND_ENDPOINT_META_DATA=Cannot find endpoint meta data for: {0}
-
-NOT_IMPLEMENT_REMOTE=SEI does not implement java.rmi.Remote: {0}
-CANNOT_CREATE_PROXY=Cannot create proxy
-SEI_CLASS_CANNOT_BE_NULL=SEI class cannot be null
-SERVICE_META_DATA_NOT_AVAILABLE=Service meta data not available
-SEI_DOES_NOT_IMPLEMENT_JAVA.RMI.REMOTE=SEI does not implement java.rmi.Remote: {0}
-CANNOT_OBTAIN_ENDPOINT_META_DATA_FOR=Cannot obtain endpoint meta data for: {0}
-CANNOT_CREATE_PROXY=Cannot create proxy
-CANNOT_OBTAIN_OPERATION_META_DATA=Cannot obtain operation meta data for: {0}
-RETURN_VALUE_NOT_SUPPORTED=Return value not supported by: {0}
-UNSUPPORTED_PROPERTY=Unsupported property: {0}
-LEGACY_PROPERY=Legacy propery {0} mapped to {1}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/PortProxy.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -30,16 +30,12 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
-import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Stub;
import javax.xml.rpc.soap.SOAPFaultException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -53,10 +49,6 @@
*/
public class PortProxy implements InvocationHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(PortProxy.class);
- // provide logging
- private static final Logger log = Logger.getLogger(PortProxy.class);
-
// The underlying Call
private CallImpl call;
// List<Method> of the Stub methods
@@ -141,7 +133,7 @@
EndpointMetaData epMetaData = call.getEndpointMetaData();
OperationMetaData opMetaData = epMetaData.getOperation(method);
if (opMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_OPERATION_META_DATA", methodName));
+ throw NativeMessages.MESSAGES.cannotObtainOperationMetaData(methodName);
call.setOperationName(opMetaData.getQName());
@@ -159,7 +151,7 @@
{
Class retType = method.getReturnType();
if (retType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "RETURN_VALUE_NOT_SUPPORTED", opMetaData));
+ throw NativeMessages.MESSAGES.returnValueNotSupportedBy(opMetaData);
if (JavaUtils.isPrimitive(retType))
retObj = JavaUtils.getPrimitiveValueArray(retObj);
@@ -190,12 +182,11 @@
private String assertPropertyName(String name)
{
if (name != null && name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_PROPERTY", name));
+ throw NativeMessages.MESSAGES.unsupportedPropery(name);
if (legacyPropertyMap.keySet().contains(name))
{
String jbosswsName = legacyPropertyMap.get(name);
- log.warn(BundleUtils.getMessage(bundle, "LEGACY_PROPERY", new Object[]{ name , jbosswsName }));
name = jbosswsName;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -29,7 +29,7 @@
import javax.xml.rpc.ServiceException;
import javax.xml.rpc.ServiceFactory;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
/**
* Service class acts as a factory for:
@@ -44,9 +44,6 @@
*/
public class ServiceFactoryImpl extends ServiceFactory
{
- // provide logging
- private final Logger log = Logger.getLogger(ServiceFactoryImpl.class);
-
/**
* Create an instance of the generated service implementation class for a given service interface, if available.
*
@@ -120,7 +117,7 @@
URL mappingURL = SecurityActions.getResource(cl, "META-INF/jaxrpc-mapping.xml");
if (mappingURL != null)
- log.info("Use jaxrpc-mapping from: " + mappingURL);
+ NativeLoggers.JAXRPC_LOGGER.useJaxRpcMappingFrom(mappingURL);
return createService(wsdlURL, serviceName, mappingURL, null);
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.client;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
@@ -34,7 +36,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -46,8 +47,7 @@
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.common.ResourceLoaderAdapter;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
@@ -79,10 +79,6 @@
*/
public class ServiceImpl implements ServiceExt, Serializable, Externalizable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceImpl.class);
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceImpl.class);
-
// The service meta data that is associated with this JAXRPC Service
private transient ServiceMetaData serviceMetaData;
private QName serviceName;
@@ -291,7 +287,7 @@
{
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
- throw new ServiceException(BundleUtils.getMessage(bundle, "CANNOT_FIND_ENDPOINT", portName));
+ throw MESSAGES.cannotFindEndpointForName(portName);
List<Call> calls = new ArrayList<Call>();
for (OperationMetaData opMetaData : epMetaData.getOperations())
@@ -314,7 +310,7 @@
*/
public HandlerRegistry getHandlerRegistry()
{
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "SHOULD_NOT_USE_METHOD", "getHandlerRegistry()"));
+ throw MESSAGES.shouldNotUseMethod("getHandlerRegistry()");
}
/**
@@ -333,7 +329,7 @@
*/
public TypeMappingRegistry getTypeMappingRegistry()
{
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "SHOULD_NOT_USE_METHOD", "getTypeMappingRegistry()"));
+ throw MESSAGES.shouldNotUseMethod("getTypeMappingRegistry()");
}
/**
@@ -371,14 +367,14 @@
public Remote getPort(Class seiClass) throws ServiceException
{
if (seiClass == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SEI_CLASS_CANNOT_BE_NULL"));
+ throw MESSAGES.illegalNullArgument("seiClass");
String seiName = seiClass.getName();
if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new ServiceException(BundleUtils.getMessage(bundle, "NOT_IMPLEMENT_REMOTE", seiName));
+ throw new ServiceException(MESSAGES.notImplementRemote(seiName));
if (serviceMetaData == null)
- throw new ServiceException(BundleUtils.getMessage(bundle, "SERVICE_META_DATA_NOT_AVAILABLE"));
+ throw MESSAGES.serviceMetaDataNotAvailable();
try
{
@@ -390,7 +386,7 @@
}
if (epMetaData == null)
- throw new ServiceException(BundleUtils.getMessage(bundle, "CANNOT_FIND_ENDPOINT_META_DATA", seiName));
+ throw MESSAGES.cannotFindEndpointMetaData(seiName);
return createProxy(seiClass, epMetaData);
}
@@ -400,7 +396,7 @@
}
catch (Exception ex)
{
- throw new ServiceException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_PROXY"), ex);
+ throw new ServiceException(ex);
}
}
@@ -414,18 +410,18 @@
public Remote getPort(QName portName, Class seiClass) throws ServiceException
{
if (seiClass == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SEI_CLASS_CANNOT_BE_NULL"));
+ throw MESSAGES.illegalNullArgument("seiClass");
if (serviceMetaData == null)
- throw new ServiceException(BundleUtils.getMessage(bundle, "SERVICE_META_DATA_NOT_AVAILABLE"));
+ throw MESSAGES.serviceMetaDataNotAvailable();
String seiName = seiClass.getName();
if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new ServiceException(BundleUtils.getMessage(bundle, "NOT_IMPLEMENT_REMOTE", seiName));
+ throw new ServiceException(MESSAGES.notImplementRemote(seiName));
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
- throw new ServiceException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_META_DATA", portName));
+ throw MESSAGES.cannotFindEndpointMetaData(portName);
try
{
@@ -440,7 +436,7 @@
}
catch (Exception ex)
{
- throw new ServiceException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_PROXY"), ex);
+ throw new ServiceException(ex);
}
}
@@ -451,7 +447,7 @@
// JBoss-4.0.x does not support <stub-properties>
if (initCallProperties(call, seiClass.getName()) > 0)
- log.info("Deprecated use of <call-properties> on JAXRPC Stub. Use <stub-properties>");
+ NativeLoggers.JAXRPC_LOGGER.deprecatedUseOfCallPropsOnJAXRPCStub();
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
@@ -561,7 +557,7 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
+ NativeLoggers.JAXRPC_LOGGER.addingClientSideHandlerToEndpoint(portName, info);
handlerInfos.add(info);
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/Message.properties 2012-10-12 11:16:22 UTC (rev 16864)
@@ -1,17 +0,0 @@
-# NativeServiceReferenceableJAXRPC.java
-CANNOT_OBTAIN_PATH=Cannot obtain path to PortComponentLinkServlet: {0}
-CANNOT_MARSHALL_SERVICE_REF_META_DATA=Cannot marshall service ref meta data, cause: {0}
-CANNOT_MARSHALL_SECURITY_CONFIG=Cannot marshall security config, cause: {0}
-
-# NativeServiceObjectFactoryJAXRPC.java
-NOT_IMPLEMENT_REMOTE=SEI does not implement java.rmi.Remote: {0}
-CANNOT_UNMARSHALL_SERVICE_REF_META_DATA=Cannot unmarshall service ref meta data
-CANNOT_UNMARSHALL_SECURITY_CONFIG=Cannot unmarshall security config, cause: {0}
-CANNOT_RESOLVE_PORT_COMPONENT_LINK=Cannot resolve port-component-link: {0}
-CANNOT_SET_ENDPOINT_ADDRESS=Cannot set endpoint address for port-component-link, unsuported number of endpoints
-NOT_IMPLEMENT_SERVICE=The service interface does not implement javax.xml.rpc.Service: {0}
-CANNOT_CREATE_SERVICE=Cannot create service
-NOT_ALLOWED_TO_USE=Within a <service-ref> it's not allowed to use a SEI across different <port-component-ref>'s: {0}
-FAILED_TO_NARROW_ENDPOINTS=Failed to narrow available endpoints by <port-component-ref> declaration
-UNABLE_TO_NARROW_PORT_SELECTION=Unable to narrow port selection for {0}
-CANNOT_UNMARSHALL_JAXRPC_MAPPING_FILE=Cannot unmarshal jaxrpc-mapping-file: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.jaxrpc.client.serviceref;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -38,7 +40,6 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.ResourceBundle;
import javax.naming.Context;
import javax.naming.Name;
@@ -47,12 +48,10 @@
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;
import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.jaxrpc.client.ServiceExt;
import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
@@ -83,7 +82,6 @@
*/
public final class NativeServiceObjectFactoryJAXRPC implements ObjectFactory
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NativeServiceObjectFactoryJAXRPC.class);
// provide logging
private static final Logger log = Logger.getLogger(NativeServiceObjectFactoryJAXRPC.class);
@@ -125,7 +123,7 @@
}
catch (IOException ex)
{
- NamingException ne = new NamingException(BundleUtils.getMessage(bundle, "CANNOT_UNMARSHALL_SERVICE_REF_META_DATA"));
+ NamingException ne = new NamingException();
ne.setRootCause(ex);
throw ne;
}
@@ -176,7 +174,7 @@
EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
if (endpoint == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_RESOLVE_PORT_COMPONENT_LINK", pcLink));
+ throw MESSAGES.cannotResolvePortComponentLink(pcLink);
ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
endpointAddress = sepMetaData.getEndpointAddress();
@@ -207,7 +205,7 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_SET_ENDPOINT_ADDRESS"));
+ NativeLoggers.JAXRPC_LOGGER.cannotSetEndpointAddressForPCL();
}
}
@@ -221,7 +219,7 @@
ClassLoader contextCL = SecurityActions.getContextClassLoader();
Class<?> siClass = SecurityActions.loadClass(contextCL, serviceRef.getServiceInterface());
if (Service.class.isAssignableFrom(siClass) == false)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "NOT_IMPLEMENT_SERVICE", siClass.getName()));
+ throw MESSAGES.interfaceDoesNotImplementJAXRPCService(siClass.getName());
// load all service endpoint interface classes
for (UnifiedPortComponentRefMetaData pcr : serviceRef.getPortComponentRefs())
@@ -231,7 +229,7 @@
{
Class<?> seiClass = contextCL.loadClass(seiName);
if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NOT_IMPLEMENT_REMOTE", seiClass.getName()));
+ throw new IllegalArgumentException(MESSAGES.notImplementRemote(seiClass.getName()));
}
}
@@ -243,7 +241,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_CREATE_SERVICE"), ex);
+ NativeLoggers.JAXRPC_LOGGER.cannotCreateService(ex);
throw ex;
}
}
@@ -263,7 +261,7 @@
// Constraint#1: within a service-ref it's not allowed to use a SEI across different pcref's
if (pcrefs.get(seiName) != null)
- throw new WSException(BundleUtils.getMessage(bundle, "NOT_ALLOWED_TO_USE", seiName));
+ throw MESSAGES.notAllowedToUseInServiceRef(seiName);
pcrefs.put(seiName, pcref);
}
@@ -297,7 +295,7 @@
// Constraint: Dont exclude all of them ;)
if (pcRef2EndpointMapping.size() > 0 && (pcRef2EndpointMapping.size() == narrowedEndpoints.size()))
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_NARROW_ENDPOINTS"));
+ throw MESSAGES.failedToNarrowavailableEpsByPcRef();
for (QName q : narrowedEndpoints)
{
@@ -309,7 +307,7 @@
else
{
// TODO: In case there is more then one EMPD this should cause an exception
- log.warn(BundleUtils.getMessage(bundle, "UNABLE_TO_NARROW_PORT_SELECTION", pcref));
+ NativeLoggers.JAXRPC_LOGGER.unableToNarrowPortSelection(pcref);
}
}
}
@@ -341,7 +339,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_UNMARSHALL_JAXRPC_MAPPING_FILE", mappingFile), e);
+ throw MESSAGES.cannotUnmarshallJAXRPCMapping(mappingFile, e);
}
}
return javaWsdlMapping;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-10-12 11:16:22 UTC (rev 16864)
@@ -24,7 +24,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
-import java.util.ResourceBundle;
import javax.naming.BinaryRefAddr;
import javax.naming.NamingException;
@@ -32,7 +31,7 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -51,7 +50,6 @@
*/
public final class NativeServiceReferenceableJAXRPC implements Referenceable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NativeServiceReferenceableJAXRPC.class);
public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
@@ -99,7 +97,7 @@
}
catch (Exception ex)
{
- throw new NamingException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_PATH", ex));
+ throw NativeMessages.MESSAGES.cannotObtainPathToPCLServlet(ex);
}
}
}
@@ -120,7 +118,7 @@
}
catch (IOException e)
{
- throw new NamingException(BundleUtils.getMessage(bundle, "CANNOT_MARSHALL_SERVICE_REF_META_DATA", e.toString()));
+ throw new NamingException(e.toString());
}
return baos.toByteArray();
}
13 years, 3 months
JBossWS SVN: r16863 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-10-12 04:30:12 -0400 (Fri, 12 Oct 2012)
New Revision: 16863
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/Message.properties
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/WSTimeoutException.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/SSLContextFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyHelper.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
Log:
[JBWS-3509] WIP on converting native messages to new logging...
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -32,6 +32,7 @@
import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.Handler;
import javax.xml.rpc.handler.HandlerInfo;
import org.jboss.logging.BasicLogger;
@@ -49,6 +50,8 @@
public interface NativeLoggers extends BasicLogger
{
NativeLoggers ROOT_LOGGER = org.jboss.logging.Logger.getMessageLogger(NativeLoggers.class, "org.jboss.ws.native");
+ NativeLoggers CLIENT_LOGGER = org.jboss.logging.Logger.getMessageLogger(NativeLoggers.class, "org.jboss.ws.native.client");
+ NativeLoggers JAXRPC_LOGGER = org.jboss.logging.Logger.getMessageLogger(NativeLoggers.class, "org.jboss.ws.native.jaxrpc");
@LogMessage(level = ERROR)
@Message(id = 25006, value = "Cannot process metrics")
@@ -198,4 +201,76 @@
@Message(id = 25193, value = "Multiple service endoints found for: %s")
void multipleServiceEndpointFoundFor(String s);
+ @LogMessage(level = ERROR)
+ @Message(id = 25201, value = "Error while parsing headers for configuring keep-alive, closing connection.")
+ void errorParsingHeadersForConfiguringKeepAlive(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25204, value = "Channel closed by remote peer while sending message.")
+ void channelClosed();
+
+ @LogMessage(level = WARN)
+ @Message(id = 25205, value = "Can't set chunk size from call properties, illegal value provided.")
+ void cannotSetChunkSize();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 25217, value = "Could not find keytore url.")
+ void couldNotFindKeystore(@Cause Throwable cause);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 25218, value = "Could not find truststore url.")
+ void couldNotFindTruststore(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25226, value = "Cannot deserialize fault detail")
+ void cannotDeserializeFaultDetail(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25227, value = "Error creating SOAPFault message")
+ void errorCreatingSoapFaultMessage(@Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25229, value = "Empty namespace URI with fault code %s, assuming: %s")
+ void emptyNamespaceURI(QName q, String s);
+
+ @LogMessage(level = INFO)
+ @Message(id = 25231, value = "Ignoring Call.SOAPACTION_USE_PROPERTY because of BP-1.0 R2745, R2745")
+ void ignoreCallSoapActionUseProperty();
+
+ @LogMessage(level = WARN)
+ @Message(id = 25240, value = "Handler is in state DOES_NOT_EXIST, skipping Handler.handleRequest for: %s")
+ void handlerDoesNotExistSkippingHandleRequest(Handler h);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25241, value = "Handler is in state DOES_NOT_EXIST, skipping Handler.handleResponse for: %s")
+ void handlerDoesNotExistSkippingHandleResponse(Handler h);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25242, value = "Handler is in state DOES_NOT_EXIST, skipping Handler.handleFault for: %s")
+ void handlerDoesNotExistSkippingHandleFault(Handler h);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25243, value = "RuntimeException in handler method, transition to does not exist")
+ void handlerTransitionToDoesNotExist();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25244, value = "RuntimeException in request handler")
+ void runtimeExceptionInRequestHandler(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25245, value = "RuntimeException in response handler")
+ void runtimeExceptionInResponseHandler(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25246, value = "Cannot trace SOAP message")
+ void cannotTraceJAXRPCSoapMessage(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25247, value = "Cannot create handler instance for: %s")
+ void cannotCreateHandlerInstance(Object handlerInfo, @Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25250, value = "JAX-RPC Service error")
+ void jaxRpcServiceError(@Cause Throwable cause);
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -23,12 +23,15 @@
import java.io.File;
import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.ConnectException;
import java.net.URL;
import java.util.Collection;
import javax.management.ObjectName;
import javax.wsdl.Part;
import javax.xml.namespace.QName;
+import javax.xml.rpc.JAXRPCException;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
@@ -38,7 +41,9 @@
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
+import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.soap.utils.Style;
import org.jboss.ws.core.soap.utils.Use;
import org.jboss.ws.metadata.wsdl.WSDLException;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
@@ -541,4 +546,106 @@
@Message(id = 25199, value = "Cannot get channel future before closing the stream")
IllegalStateException cannotGetChannelFuture();
+ @Message(id = 25200, value = "Could not connect to %s")
+ ConnectException couldNotConnectTo(String host);
+
+ @Message(id = 25202, value = "Timeout after: %s ms")
+ WSTimeoutException timeout(Long timeout);
+
+ @Message(id = 25203, value = "Receive timeout")
+ WSTimeoutException receiveTimeout();
+
+ @Message(id = 25206, value = "Could not transmit message")
+ IOException couldNotTransmitMessage();
+
+ @Message(id = 25207, value = "Connection timeout %s")
+ WSTimeoutException connectionTimeout(Long timeout);
+
+ @Message(id = 25208, value = "Can not set remoting socket factory with null protocol")
+ IllegalArgumentException cannotSetRemotingSocketFactory();
+
+ @Message(id = 25209, value = "Error creating server socket factory SSL context")
+ IOException errorCreatingServerSocketFactorySSLContext(@Cause Exception cause);
+
+ @Message(id = 25210, value = "Error creating socket factory SSL context")
+ IOException errorCreatingSocketFactorySSLContext(@Cause Exception cause);
+
+ @Message(id = 25211, value = "Can not find keystore url.")
+ IOException cannotFindKeystoreUrl(@Cause Exception cause);
+
+ @Message(id = 25212, value = "Error initializing server socket factory SSL context")
+ IOException errorInitializingServerSocketFactorySSLContext(@Cause Exception cause);
+
+ @Message(id = 25213, value = "Can not find truststore url.")
+ IOException cannotFindTruststoreUrl(@Cause Exception cause);
+
+ @Message(id = 25214, value = "Error initializing socket factory SSL context")
+ IOException errorInitializingSocketFactorySSLContext(@Cause Exception cause);
+
+ @Message(id = 25215, value = "Can not find key entry for key store (%s) with given alias (%s)")
+ IOException cannotFindKeyEntry(URL ksUrl, String alias);
+
+ @Message(id = 25216, value = "Can not find store file for url because store url is null")
+ String nullStoreURL();
+
+ @Message(id = 25219, value = "Cannot compare IQName to %s")
+ IllegalArgumentException cannotCompareIQNameTo(Object obj);
+
+ @Message(id = 25220, value = "Only element nodes are supported")
+ UnsupportedOperationException onlyElementNotesSupported();
+
+ @Message(id = 25221, value = "Only DOMSource is supported")
+ UnsupportedOperationException onlyDOMSourceSupported();
+
+ @Message(id = 25222, value = "Unsupported encoding style: %s")
+ JAXRPCException unsupportedEncodingStyle(String s);
+
+ @Message(id = 25223, value = "Cannot obtain deserializer factory for: %s")
+ JAXRPCException cannotObtainDeserializerFactory(QName qname);
+
+ @Message(id = 25224, value = "Cannot obtain serializer factory for: %s")
+ JAXRPCException cannotObtainSerializerFactory(QName qname);
+
+ @Message(id = 25225, value = "Invalid deserialization result: %s")
+ WSException invalidDeserializationResult(Object res);
+
+ @Message(id = 25228, value = "Cannot create SOAPFault message")
+ JAXRPCException cannotCreateSoapFaultMessage(@Cause Throwable cause);
+
+ @Message(id = 25230, value = "Illegal faultcode '%s', allowed values are: %s")
+ IllegalArgumentException illegalFaultCode(QName fc, Collection<QName> allowed);
+
+ @Message(id = 25232, value = "RoleSource was not available")
+ IllegalStateException roleSourceNotAvailable();
+
+ @Message(id = 25233, value = "Cannot generate xsd schema for: %s")
+ JAXRPCException cannotGenerateXsdSchemaFor(QName qname, @Cause Throwable cause);
+
+ @Message(id = 25234, value = "Cannot generate XSModel")
+ WSException cannotGenerateXsdModel();
+
+ @Message(id = 25235, value = "Unexpected style: %s")
+ WSException unexpectedStyle(Style style);
+
+ @Message(id = 25236, value = "Cannot generate XSModel")
+ WSException unexpectedParameterStyle();
+
+ @Message(id = 25237, value = "Operation is not document/literal (wrapped)")
+ WSException operationIsNotDocLitWrapped();
+
+ @Message(id = 25238, value = "Cannot generate a type when there is no wrapped parameter")
+ WSException cannotGenerateTypeWithNoWrappedParams();
+
+ @Message(id = 25239, value = "Could not generate wrapper type: %s")
+ WSException cannotGenerateWrapperType(String type, @Cause Throwable cause);
+
+ @Message(id = 25248, value = "No handler at position: %s")
+ IllegalArgumentException noHandlerAtPosition(int p);
+
+ @Message(id = 25249, value = "Invalid handler entry")
+ IllegalStateException invalidHandlerEntry();
+
+ @Message(id = 25251, value = "Don't know how to invoke method %s")
+ JAXRPCException dontKnowHowToInvoke(Method method);
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/WSTimeoutException.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/WSTimeoutException.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/WSTimeoutException.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -31,11 +31,21 @@
{
private long timeout;
+ public WSTimeoutException(String message)
+ {
+ super(message);
+ }
+
public WSTimeoutException(String message, long timeout)
{
super(message);
this.timeout = timeout;
}
+
+ public void setTimeout(long timeout)
+ {
+ this.timeout = timeout;
+ }
public long getTimeout()
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,15 +21,12 @@
*/
package org.jboss.ws.core.binding;
-import java.util.ResourceBundle;
-
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.Deserializer;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.soap.SOAPContentElement;
@@ -44,8 +41,6 @@
*/
public abstract class DeserializerSupport implements Deserializer
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DeserializerSupport.class);
- private static final Logger log = Logger.getLogger(DeserializerSupport.class);
private static final QName XSI_NIL = new QName("http://www.w3.org/2001/XMLSchema-instance", "nil");
public Object deserialize(SOAPContentElement soapElement, SerializationContext serContext) throws BindingException
@@ -95,9 +90,9 @@
if (nodeType == Node.ELEMENT_NODE)
{
return (Element)node;
- } else throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "ONLY_ELEMENT_NODES_ARE_SUPPORTED"));
+ } else throw NativeMessages.MESSAGES.onlyElementNotesSupported();
}
- else throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "ONLY_DOMSOURCE_IS_SUPPORTED"));
+ else throw NativeMessages.MESSAGES.onlyDOMSourceSupported();
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,5 +0,0 @@
-JAVATYPE_CANNOT_BE_NULL=javaType cannot be null for: {0}
-XMLTYPE_CANNOT_BE_NULL=xmlType cannot be null for: {0}
-CANNOT_COMPARE_IQNAME=Cannot compare IQName to {0}
-ONLY_ELEMENT_NODES_ARE_SUPPORTED=Only element nodes are supported
-ONLY_DOMSOURCE_IS_SUPPORTED=Only DOMSource is supported
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -34,7 +34,7 @@
*/
public abstract class SerializationContext
{
- private Class javaType;
+ private Class<?> javaType;
private TypeMappingImpl typeMapping;
// The namespace registry that is valid for this serialization context
@@ -67,12 +67,12 @@
return namespaceRegistry;
}
- public Class getJavaType()
+ public Class<?> getJavaType()
{
return javaType;
}
- public void setJavaType(Class javaType)
+ public void setJavaType(Class<?> javaType)
{
this.javaType = javaType;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -30,7 +30,6 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.concurrent.ConcurrentHashMap;
import javax.xml.namespace.QName;
@@ -39,7 +38,7 @@
import javax.xml.rpc.encoding.TypeMapping;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.common.utils.HashCodeUtil;
@@ -68,7 +67,6 @@
*/
public abstract class TypeMappingImpl implements TypeMapping
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TypeMappingImpl.class);
// provide logging
private static final Logger log = Logger.getLogger(TypeMappingImpl.class);
@@ -150,9 +148,9 @@
private void registerInternal(Class javaType, IQName xmlType, SerializerFactory sf, DeserializerFactory df)
{
if (javaType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "JAVATYPE_CANNOT_BE_NULL", xmlType));
+ throw NativeMessages.MESSAGES.illegalNullArgument("javaType");
if (xmlType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLTYPE_CANNOT_BE_NULL", javaType));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xmlType");
KeyPair kPair = new KeyPair(xmlType, javaType);
FactoryPair fPair = new FactoryPair(sf, df);
@@ -708,7 +706,7 @@
public boolean equals(Object object) {
if(!(object instanceof IQName))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_COMPARE_IQNAME", object));
+ throw NativeMessages.MESSAGES.cannotCompareIQNameTo(object);
IQName iqn = (IQName)object;
return (iqn.namespace == this.namespace && iqn.localPart == this.localPart);
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,9 +0,0 @@
-CAN_NOT_SET_REMOTING_SOCKET_FACTORY=Can not set remoting socket factory with null protocol
-ERROR_CREATING_SERVER_SOCKET_FACTORY=Error creating server socket factory SSL context: {0}
-ERROR_CREATING_SOCKET_FACTORY=Error creating socket factory SSL context: {0}
-CAN_NOT_FIND_KEYSTORE_URL=Can not find keystore url.
-ERROR_INITIALIZING_SERVER_SOCKET_FACTORY=Error initializing server socket factory SSL context: {0}
-CAN_NOT_FIND_TRUSTSTORE_URL=Can not find truststore url.
-ERROR_INITIALIZING_SOCKET_FACTORY=Error initializing socket factory SSL context: {0}
-CAN_NOT_FIND_KEY_ENTRY=Can not find key entry for key store ({0}) with given alias ({1})
-CAN_NOT_FIND_STORE_FILE=Can not find store file for url because store url is null.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/SSLContextFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/SSLContextFactory.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/ssl/SSLContextFactory.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.client.ssl;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -36,7 +38,6 @@
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
@@ -46,8 +47,7 @@
import javax.net.ssl.X509KeyManager;
import javax.net.ssl.X509TrustManager;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.core.StubExt;
/**
@@ -165,10 +165,6 @@
private Boolean serverSocketUseClientMode = null;
private Boolean serverAuthMode = null;
- private static final ResourceBundle bundle = BundleUtils.getBundle(SSLContextFactory.class);
-
- private static final Logger log = Logger.getLogger(SSLContextFactory.class);
-
/**
* Constructor for {@link SSLContextFactory} that does not have
* any configuration so it falls back to all defaults.
@@ -240,7 +236,7 @@
}
else
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CAN_NOT_SET_REMOTING_SOCKET_FACTORY"));
+ throw MESSAGES.cannotSetRemotingSocketFactory();
}
}
@@ -848,9 +844,7 @@
}
catch(Exception e)
{
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "ERROR_CREATING_SERVER_SOCKET_FACTORY", e.getMessage()));
- ioe.setStackTrace(e.getStackTrace());
- throw ioe;
+ throw MESSAGES.errorCreatingServerSocketFactorySSLContext(e);
}
return;
@@ -887,9 +881,7 @@
}
catch(Exception e)
{
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "ERROR_CREATING_SOCKET_FACTORY", e.getMessage()));
- ioe.setStackTrace(e.getStackTrace());
- throw ioe;
+ throw MESSAGES.errorCreatingSocketFactorySSLContext(e);
}
return;
@@ -923,14 +915,12 @@
if (isServerSocketUseClientMode())
{
keyManagers = null;
- log.debugf("Could not find keytore url. %s", e.getMessage());
+ NativeLoggers.CLIENT_LOGGER.couldNotFindKeystore(e);
}
else
{
// because this ssl context will create server socket factories, will throw if can not find keystore
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "CAN_NOT_FIND_KEYSTORE_URL"));
- ioe.initCause(e);
- throw ioe;
+ throw MESSAGES.cannotFindKeystoreUrl(e);
}
}
@@ -942,7 +932,7 @@
catch (NullStoreURLException e)
{
trustManagers = null;
- log.debugf("Could not find truststore url. %s", e.getMessage());
+ NativeLoggers.CLIENT_LOGGER.couldNotFindTruststore(e);
}
secureRandom = getSecureRandom();
@@ -951,9 +941,7 @@
}
catch(Exception e)
{
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "ERROR_INITIALIZING_SERVER_SOCKET_FACTORY", e.getMessage()));
- ioe.setStackTrace(e.getStackTrace());
- throw ioe;
+ throw MESSAGES.errorInitializingServerSocketFactorySSLContext(e);
}
return;
@@ -986,7 +974,7 @@
{
// this is allowable since would be the normal scenario
keyManagers = null;
- log.debugf("Could not find keystore url. %s ", e.getMessage());
+ NativeLoggers.CLIENT_LOGGER.couldNotFindKeystore(e);
}
try
@@ -1002,13 +990,11 @@
if(keyManagers != null)
{
trustManagers = null;
- log.debugf("Could not find truststore url. %s", e.getMessage());
+ NativeLoggers.CLIENT_LOGGER.couldNotFindTruststore(e);
}
else
{
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "CAN_NOT_FIND_TRUSTSTORE_URL"));
- ioe.initCause(e);
- throw ioe;
+ throw MESSAGES.cannotFindTruststoreUrl(e);
}
}
@@ -1018,9 +1004,7 @@
}
catch(Exception e)
{
- IOException ioe = new IOException(BundleUtils.getMessage(bundle, "ERROR_INITIALIZING_SOCKET_FACTORY", e.getMessage()));
- ioe.setStackTrace(e.getStackTrace());
- throw ioe;
+ throw MESSAGES.errorInitializingSocketFactorySSLContext(e);
}
return;
@@ -1121,7 +1105,7 @@
if(!containsAlias)
{
// can not continue as supplied alias does not exist as key entry
- throw new IOException(BundleUtils.getMessage(bundle, "CAN_NOT_FIND_KEY_ENTRY", new Object[]{ ksPathURL, alias }));
+ throw MESSAGES.cannotFindKeyEntry(ksPathURL, alias);
}
}
@@ -1202,7 +1186,7 @@
if ( storePathURL == null )
{
- throw new NullStoreURLException(BundleUtils.getMessage(bundle, "CAN_NOT_FIND_STORE_FILE"));
+ throw new NullStoreURLException(MESSAGES.nullStoreURL());
}
// now that keystore instance created, need to load data from file
@@ -1266,7 +1250,7 @@
if(tst.exists() == true)
{
- url = tst.toURL();
+ url = tst.toURI().toURL();
}
else
{
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,11 +0,0 @@
-OPERATION_CANCELLED=Operation Cancelled
-TIMEOUT_EXCEEDED=Timeout Exceeded
-COULD_NOT_CONNECT_TO=Could not connect to {0}
-ERROR_WHILE_PARSING_HEADERS=Error while parsing headers for configuring keep-alive, closing connection.
-INVALID_ADDRESS=Invalid address: {0}
-RECEIVE_TIMEOUT=Receive timeout
-CHANNEL_CLOSED=Channel closed by remote peer while sending message
-CONNECTION_TIMEOUT=Connection timeout
-COULD_NOT_TRANSMIT_MESSAGE=Could not transmit message
-CAN_NOT_SET_CHUNK_SIZE=Can't set chunk size from call properties, illegal value provided!
-TIMEOUT=Timeout after: {0}ms
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyClient.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -29,7 +29,6 @@
import java.nio.channels.ClosedChannelException;
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -39,7 +38,6 @@
import javax.net.ssl.SSLEngine;
import javax.xml.rpc.Stub;
-import org.jboss.logging.Logger;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferOutputStream;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -53,7 +51,8 @@
import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.ssl.SslHandler;
import org.jboss.util.Base64;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.client.Marshaller;
@@ -70,12 +69,10 @@
*/
public class NettyClient
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NettyClient.class);
public static final String RESPONSE_CODE = "org.jboss.ws.core.client.transport.NettyClient#ResponseCode";
public static final String RESPONSE_CODE_MESSAGE = "org.jboss.ws.core.client.transport.NettyClient#ResponseCodeMessage";
public static final String PROTOCOL = "org.jboss.ws.core.client.transport.NettyClient#Protocol";
public static final String RESPONSE_HEADERS = "org.jboss.ws.core.client.transport.NettyClient#ResponseHeaders";
- private static Logger log = Logger.getLogger(NettyClient.class);
private Marshaller marshaller;
private UnMarshaller unmarshaller;
@@ -122,7 +119,7 @@
{
if (NettyTransportHandler.getHttpKeepAliveSet())
{
- log.info("Retrying with a new connection..."); //because using keep-alive connections it's possible to try re-using closed connections before they've been evicted
+ //because using keep-alive connections it's possible to try re-using closed connections before they've been evicted
return invokeInternal(reqMessage, targetAddress, oneway, additionalHeaders, callProps);
}
else
@@ -141,7 +138,7 @@
}
catch (MalformedURLException e)
{
- throw new RuntimeException(BundleUtils.getMessage(bundle, "INVALID_ADDRESS", targetAddress), e);
+ throw new RuntimeException(e);
}
NettyTransportHandler transport = NettyTransportHandler.getInstance(target, NettyHelper.getChannelPipelineFactory(getSSLHandler(target, callProps)));
@@ -213,10 +210,12 @@
Throwable t = ee.getCause();
throw t != null ? t : ee;
}
- catch (TimeoutException te)
- {
- throw new WSTimeoutException(BundleUtils.getMessage(bundle, "RECEIVE_TIMEOUT"), receiveTimeout == null ? -1 : receiveTimeout);
- }
+ catch (TimeoutException te)
+ {
+ WSTimeoutException e = NativeMessages.MESSAGES.receiveTimeout();
+ e.setTimeout(receiveTimeout == null ? -1 : receiveTimeout);
+ throw e;
+ }
resHeaders = result.getResponseHeaders();
resMetadata = result.getMetadata();
Object resMessage = oneway ? null : unmarshaller.read(result.getResponse(), resMetadata, resHeaders);
@@ -232,7 +231,7 @@
}
catch (ClosedChannelException cce)
{
- log.error(BundleUtils.getMessage(bundle, "CHANNEL_CLOSED"));
+ NativeLoggers.CLIENT_LOGGER.channelClosed();
transport.end();
throw cce;
}
@@ -243,7 +242,7 @@
}
catch (TimeoutException te)
{
- throw new WSTimeoutException(BundleUtils.getMessage(bundle, "CONNECTION_TIMEOUT"), connectionTimeout == null ? -1 : connectionTimeout);
+ throw NativeMessages.MESSAGES.connectionTimeout(connectionTimeout == null ? -1 : connectionTimeout);
}
catch (IOException ioe)
{
@@ -255,7 +254,7 @@
}
catch (Throwable t)
{
- IOException io = new IOException(BundleUtils.getMessage(bundle, "COULD_NOT_TRANSMIT_MESSAGE"));
+ IOException io = NativeMessages.MESSAGES.couldNotTransmitMessage();
io.initCause(t);
transport.end();
throw io;
@@ -348,7 +347,7 @@
}
catch (Exception e)
{
- log.warn(BundleUtils.getMessage(bundle, "CAN_NOT_SET_CHUNK_SIZE"));
+ NativeLoggers.CLIENT_LOGGER.cannotSetChunkSize();
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyHelper.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyHelper.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyHelper.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -25,7 +25,6 @@
import java.util.Collection;
import java.util.Map;
-import java.util.ResourceBundle;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
@@ -36,7 +35,7 @@
import org.jboss.netty.handler.codec.http.HttpRequestEncoder;
import org.jboss.netty.handler.codec.http.HttpResponseDecoder;
import org.jboss.netty.handler.ssl.SslHandler;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.WSTimeoutException;
/**
@@ -48,7 +47,6 @@
*/
public class NettyHelper
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NettyHelper.class);
public static final String RESPONSE_HANDLER_NAME = "handler";
public static ChannelPipelineFactory getChannelPipelineFactory()
@@ -92,7 +90,7 @@
boolean bool = future.awaitUninterruptibly(timeout);
if (!bool)
{
- throw new WSTimeoutException(BundleUtils.getMessage(bundle, "TIMEOUT"), timeout);
+ throw NativeMessages.MESSAGES.timeout(timeout);
}
}
else
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportHandler.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -27,10 +27,8 @@
import java.net.URL;
import java.security.AccessController;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
-import org.jboss.logging.Logger;
import org.jboss.netty.bootstrap.ClientBootstrap;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFactory;
@@ -38,7 +36,8 @@
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpVersion;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.api.util.ServiceLoader;
import org.jboss.ws.common.Constants;
@@ -52,8 +51,6 @@
*/
public class NettyTransportHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NettyTransportHandler.class);
- private static Logger log = Logger.getLogger(NettyTransportHandler.class);
private static final int DEFAULT_KEEP_ALIVE_CONS = 5;
private URL url;
@@ -165,7 +162,7 @@
NettyHelper.awaitUninterruptibly(connectFuture, timeout);
if (!connectFuture.isSuccess())
{
- ConnectException ce = new ConnectException(BundleUtils.getMessage(bundle, "COULD_NOT_CONNECT_TO", url.getHost()));
+ ConnectException ce = NativeMessages.MESSAGES.couldNotConnectTo(url.getHost());
ce.initCause(connectFuture.getCause());
throw ce;
}
@@ -259,7 +256,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "ERROR_WHILE_PARSING_HEADERS"), ex);
+ NativeLoggers.CLIENT_LOGGER.errorParsingHeadersForConfiguringKeepAlive(ex);
keepAliveConnections = -1;
keepingAlive = false;
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,25 +0,0 @@
-CANNOT_GENERATE_XSMODEL=Cannot generate XSModel
-CANNOT_GENERATE_XSDSCHEMA=Cannot generate xsdSchema for: {0}
-INVALID_NAMESPACE_FOR_TYPE=Invalid namespace for type: {0}
-MESSAGECONTEXT_NOT_AVAILABLE=MessageContext not available
-UNEXPECTED_STYLE=Unexpected style: {0}
-UNEXPECTED_PARAMETER_STYLE=Unexpected parameter style
-CANNOT_WRAP_REQUEST_STRUCTURE=Cannot wrap request structure: {0}
-REQUEST_STRUCT_CANNOT_BE_NULL=Request struct cannot be null
-CANNOT_UNWRAP_REQUEST_STRUCTURE=Cannot unwrap request structure: {0}
-CANNOT_WRAP_RESPONSE_STRUCTURE=Cannot wrap response structure: {0}
-OPERATION_IS_NOT_DOC_LIT=Operation is not document/literal (wrapped)
-CANNOT_GENERATE_TYPE=Cannot generate a type when their is no wrapped parameters
-COULD_NOT_GENERATE_WRAPPER_TYPE=Could not generate wrapper type: {0}
-ROLESOURCE_WAS_NOT_AVAILABLE=RoleSource was not available
-CANNOT_OBTAIN_DESERIALIZER_FACTORY=Cannot obtain deserializer factory for: {0}
-INVALID_DESERIALIZATION_RESULT=Invalid deserialization result: {0}
-CANNOT_DESERIALIZE_FAULT_DETAIL=Cannot deserialize fault detail
-SOAP_REQUEST_EXCEPTION=SOAP request exception
-ERROR_CREATING_SOAPFAULT_MESSAGE=Error creating SOAPFault message
-CANNOT_CREATE_SOAPFAULT_MESSAGE=Cannot create SOAPFault message for: {0}
-CANNOT_OBTAIN_SERIALIZER_FACTORY=Cannot obtain serializer factory for: {0}
-FAULTCODE_CANNOT_BE_NULL=faultcode cannot be null
-EMPTY_NAMESPACE_URI=Empty namespace URI with fault code {0}, assuming: {1}
-ILLEGAL_FAULTCODE=Illegal faultcode '{0}', allowed values are: {1}
-UNSUPPORTED_ENCODING_STYLE=Unsupported encoding style: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,12 +21,13 @@
*/
package org.jboss.ws.core.jaxrpc;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javassist.ClassPool;
import javassist.CtClass;
@@ -39,7 +40,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
@@ -62,7 +62,6 @@
*/
public class ParameterWrapping
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ParameterWrapping.class);
// provide logging
private static Logger log = Logger.getLogger(ParameterWrapping.class);
@@ -70,10 +69,10 @@
private static void assertOperationMetaData(OperationMetaData opMetaData)
{
if (opMetaData.getStyle() != Style.DOCUMENT)
- throw new WSException(BundleUtils.getMessage(bundle, "UNEXPECTED_STYLE", opMetaData.getStyle()));
+ throw MESSAGES.unexpectedStyle(opMetaData.getStyle());
if (!opMetaData.isWrappedParameterStyle())
- throw new WSException(BundleUtils.getMessage(bundle, "UNEXPECTED_PARAMETER_STYLE"));
+ throw MESSAGES.unexpectedParameterStyle();
}
private static Object holderValue(Object holder)
@@ -86,7 +85,7 @@
return HolderUtils.getHolderValue(holder);
}
- public static Class getWrappedType(String variable, Class wrapperType)
+ public static Class<?> getWrappedType(String variable, Class<?> wrapperType)
{
try
{
@@ -105,7 +104,7 @@
{
assertOperationMetaData(request.getOperationMetaData());
- Class reqStructType = request.getJavaType();
+ Class<?> reqStructType = request.getJavaType();
if(log.isDebugEnabled()) log.debug("wrapRequestParameters: " + reqStructType.getName());
List<WrappedParameter> wrappedParameters = request.getWrappedParameters();
try
@@ -125,7 +124,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_WRAP_REQUEST_STRUCTURE", e));
+ throw new WSException(e);
}
}
@@ -135,19 +134,19 @@
assertOperationMetaData(opMetaData);
if (reqStruct == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "REQUEST_STRUCT_CANNOT_BE_NULL"));
+ throw MESSAGES.illegalNullArgument("reqStruct");
- Class[] targetParameterTypes = opMetaData.getJavaMethod().getParameterTypes();
+ Class<?>[] targetParameterTypes = opMetaData.getJavaMethod().getParameterTypes();
Map<Integer, Object> outParameters = new HashMap<Integer, Object>(targetParameterTypes.length);
List<WrappedParameter> wrappedParameters = request.getWrappedParameters();
- Class reqStructType = reqStruct.getClass();
+ Class<?> reqStructType = reqStruct.getClass();
if(log.isDebugEnabled()) log.debug("unwrapRequestParameters: " + reqStructType.getName());
try
{
for (WrappedParameter param : wrappedParameters)
{
- Class targetType = targetParameterTypes[param.getIndex()];
+ Class<?> targetType = targetParameterTypes[param.getIndex()];
Object value = param.accessor().get(reqStruct);
// INOUT Parameter
@@ -166,7 +165,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_UNWRAP_REQUEST_STRUCTURE", e));
+ throw new IllegalArgumentException(e);
}
return outParameters;
@@ -176,7 +175,7 @@
{
assertOperationMetaData(returnMetaData.getOperationMetaData());
- Class resStructType = returnMetaData.getJavaType();
+ Class<?> resStructType = returnMetaData.getJavaType();
if (returnValue != null && returnValue.getClass() == resStructType)
{
if(log.isDebugEnabled()) log.debug("Response parameter already wrapped" + resStructType.getName());
@@ -202,7 +201,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_WRAP_RESPONSE_STRUCTURE", e));
+ throw new WSException(e);
}
}
@@ -214,11 +213,11 @@
Object retValue = null;
if (resStruct != null)
{
- Class resStructType = resStruct.getClass();
+ Class<?> resStructType = resStruct.getClass();
if(log.isDebugEnabled()) log.debug("unwrapResponseParameter: " + resStructType.getName());
List<WrappedParameter> wrappedParameters = retMetaData.getWrappedParameters();
- Class[] targetTypes = operationMetaData.getJavaMethod().getParameterTypes();
+ Class<?>[] targetTypes = operationMetaData.getJavaMethod().getParameterTypes();
try
{
for (WrappedParameter param : wrappedParameters)
@@ -230,7 +229,7 @@
}
else
{
- Class targetType = targetTypes[param.getIndex()];
+ Class<?> targetType = targetTypes[param.getIndex()];
if (HolderUtils.isHolderType(targetType))
HolderUtils.setHolderValue(methodParams[param.getIndex()], value);
methodParams[param.getIndex()] = value;
@@ -243,7 +242,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_UNWRAP_REQUEST_STRUCTURE", e));
+ throw new IllegalArgumentException(e);
}
}
return retValue;
@@ -275,10 +274,10 @@
ClassLoader loader = serviceMetaData.getUnifiedMetaData().getClassLoader();
if (operationMetaData.isDocumentWrapped() == false)
- throw new WSException(BundleUtils.getMessage(bundle, "OPERATION_IS_NOT_DOC_LIT"));
+ throw MESSAGES.operationIsNotDocLitWrapped();
if (wrappedParameters == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_TYPE"));
+ throw MESSAGES.cannotGenerateTypeWithNoWrappedParams();
String serviceName = serviceMetaData.getServiceName().getLocalPart();
String parameterName = pmd.getXmlName().getLocalPart();
@@ -288,7 +287,7 @@
String wrapperName = packageName + "._JBossWS_" + serviceName + "_" + endpointName + "_" + parameterName;
if(log.isDebugEnabled()) log.debug("Generating wrapper: " + wrapperName);
- Class wrapperType;
+ Class<?> wrapperType;
try
{
ClassPool pool = new ClassPool(true);
@@ -309,7 +308,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_GENERATE_WRAPPER_TYPE", wrapperName), e);
+ throw MESSAGES.cannotGenerateWrapperType(wrapperName, e);
}
// Register type mapping if needed
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,12 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.CommonSOAP11Binding;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.soap.SOAPFaultImpl;
@@ -40,7 +39,6 @@
*/
public class SOAP11BindingJAXRPC extends CommonSOAP11Binding
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAP11BindingJAXRPC.class);
// Delegate to JAXWS SOAP binding
private SOAPBindingJAXRPC delegate = new SOAPBindingJAXRPC();
@@ -63,7 +61,7 @@
public Set<String> getRoles()
{
if (!(headerSource instanceof RoleSource))
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ROLESOURCE_WAS_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.roleSourceNotAvailable();
return ((RoleSource)headerSource).getRoles();
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,12 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.CommonSOAP12Binding;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.soap.SOAPFaultImpl;
@@ -40,7 +39,6 @@
*/
public class SOAP12BindingJAXRPC extends CommonSOAP12Binding
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAP12BindingJAXRPC.class);
// Delegate to JAXWS SOAP binding
private SOAPBindingJAXRPC delegate = new SOAPBindingJAXRPC();
@@ -58,7 +56,7 @@
public Set<String> getRoles()
{
if (!(headerSource instanceof RoleSource))
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ROLESOURCE_WAS_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.roleSourceNotAvailable();
return ((RoleSource)headerSource).getRoles();
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -25,7 +25,7 @@
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.soap.utils.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -38,9 +38,6 @@
*/
class SOAPBindingJAXRPC
{
- // provide logging
- private static Logger log = Logger.getLogger(SOAPBindingJAXRPC.class);
-
public void setSOAPActionHeader(OperationMetaData opMetaData, SOAPMessage reqMessage)
{
MessageContextJAXRPC msgContext = (MessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
@@ -57,7 +54,7 @@
// present with an empty string as its value.
if (msgContext.getProperty(Call.SOAPACTION_USE_PROPERTY) != null)
- log.info("Ignore Call.SOAPACTION_USE_PROPERTY because of BP-1.0 R2745, R2745");
+ NativeLoggers.JAXRPC_LOGGER.ignoreCallSoapActionUseProperty();
String soapActionProperty = (String)msgContext.getProperty(Call.SOAPACTION_URI_PROPERTY);
if (soapActionProperty != null)
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,10 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
@@ -48,8 +49,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.NativeLoggers;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPFaultException;
@@ -76,7 +75,6 @@
*/
public class SOAPFaultHelperJAXRPC
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPFaultHelperJAXRPC.class);
// provide logging
private static Logger log = Logger.getLogger(SOAPFaultHelperJAXRPC.class);
/**
@@ -134,7 +132,7 @@
// Get the deserializer from the type mapping
AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(javaType, xmlType);
if (desFactory == null)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_DESERIALIZER_FACTORY", xmlType));
+ throw MESSAGES.cannotObtainDeserializerFactory(xmlType);
try
{
@@ -153,7 +151,7 @@
DeserializerSupport des = (DeserializerSupport)desFactory.getDeserializer();
Object userEx = des.deserialize(xmlName, xmlType, xmlFragment, serContext);
if (userEx == null || (userEx instanceof Exception) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "INVALID_DESERIALIZATION_RESULT", userEx));
+ throw MESSAGES.invalidDeserializationResult(userEx);
faultEx.initCause((Exception)userEx);
}
@@ -163,7 +161,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_DESERIALIZE_FAULT_DETAIL"), ex);
+ NativeLoggers.JAXRPC_LOGGER.cannotDeserializeFaultDetail(ex);
}
}
else
@@ -213,7 +211,7 @@
}
Throwable faultCause = faultEx.getCause();
- NativeLoggers.ROOT_LOGGER.soapRequestException(faultCause != null ? faultCause : faultEx);
+ NativeLoggers.JAXRPC_LOGGER.soapRequestException(faultCause != null ? faultCause : faultEx);
try
{
@@ -226,8 +224,8 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "ERROR_CREATING_SOAPFAULT_MESSAGE"), ex);
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_SOAPFAULT_MESSAGE", faultEx));
+ NativeLoggers.JAXRPC_LOGGER.errorCreatingSoapFaultMessage(ex);
+ throw MESSAGES.cannotCreateSoapFaultMessage(faultEx);
}
}
@@ -283,7 +281,7 @@
// Get the serializer from the type mapping
AbstractSerializerFactory serFactory = (AbstractSerializerFactory)typeMapping.getSerializer(javaType, xmlType);
if (serFactory == null)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_SERIALIZER_FACTORY", xmlType));
+ throw MESSAGES.cannotObtainSerializerFactory(xmlType);
try
{
@@ -347,19 +345,19 @@
private static void assertFaultCode(QName faultCode)
{
if (faultCode == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "FAULTCODE_CANNOT_BE_NULL"));
+ throw MESSAGES.illegalNullArgument("faultCode");
// For lazy folkes like the CTS that don't bother to give
// a namesapce URI, assume they use a standard code
String nsURI = faultCode.getNamespaceURI();
if ("".equals(nsURI))
{
- log.warn(BundleUtils.getMessage(bundle, "EMPTY_NAMESPACE_URI", new Object[]{ faultCode , Constants.NS_SOAP11_ENV}));
+ NativeLoggers.JAXRPC_LOGGER.emptyNamespaceURI(faultCode , Constants.NS_SOAP11_ENV);
faultCode = new QName(Constants.NS_SOAP11_ENV, faultCode.getLocalPart());
}
// WS-I allows non custom faultcodes if you use a non soap namespace
if (Constants.NS_SOAP11_ENV.equals(nsURI) && allowedFaultCodes.contains(faultCode) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_FAULTCODE", new Object[]{ faultCode , allowedFaultCodes}));
+ throw MESSAGES.illegalFaultCode(faultCode, allowedFaultCodes);
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -23,14 +23,11 @@
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import javax.xml.rpc.JAXRPCException;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.JavaToXSD;
@@ -42,7 +39,7 @@
*/
public class SchemaGenerator
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SchemaGenerator.class);
+// private static final ResourceBundle bundle = BundleUtils.getBundle(SchemaGenerator.class);
// provide logging
private static final Logger log = Logger.getLogger(SchemaGenerator.class);
@@ -71,7 +68,7 @@
JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType);
if (xsModel == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_XSMODEL"));
+ throw NativeMessages.MESSAGES.cannotGenerateXsdModel();
if(log.isDebugEnabled()) log.debug("\n" + xsModel.serialize());
return xsModel;
@@ -82,7 +79,7 @@
}
catch (Exception e)
{
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_XSDSCHEMA", xmlType), e);
+ throw NativeMessages.MESSAGES.cannotGenerateXsdSchemaFor(xmlType, e);
}
}
@@ -102,6 +99,6 @@
{
String nsURI = xmlType.getNamespaceURI();
if (nsURI.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NAMESPACE_FOR_TYPE", xmlType));
+ throw new IllegalArgumentException();
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,14 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc;
-import java.util.ResourceBundle;
-
import javax.xml.namespace.QName;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.SerializationContext;
@@ -49,7 +45,6 @@
*/
public class SerializationContextJAXRPC extends SerializationContext
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SerializationContextJAXRPC.class);
// provide logging
private static final Logger log = Logger.getLogger(SerializationContextJAXRPC.class);
@@ -120,8 +115,7 @@
public XSModel getXsModel()
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
OperationMetaData opMetaData = msgContext.getOperationMetaData();
ServiceMetaData serviceMetaData = opMetaData.getEndpointMetaData().getServiceMetaData();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -23,13 +23,11 @@
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
-import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.encoding.TypeMapping;
import javax.xml.rpc.encoding.TypeMappingRegistry;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -41,7 +39,6 @@
*/
public class TypeMappingRegistryImpl implements TypeMappingRegistry
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TypeMappingRegistryImpl.class);
// The registered typeMapping for the literal encoding style
private Map<String, TypeMappingImpl> typeMappings = new HashMap<String, TypeMappingImpl>();
@@ -160,6 +157,6 @@
private void assertEncodingStyle(String encURI)
{
if (Constants.URI_LITERAL_ENC.equals(encURI) == false && Constants.URI_SOAP11_ENC.equals(encURI) == false)
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "UNSUPPORTED_ENCODING_STYLE", encURI));
+ throw NativeMessages.MESSAGES.unsupportedEncodingStyle(encURI);
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,5 +1,3 @@
-NOT_KNOW_HOW_TO_INVOKE=Don't know how to invoke: {0}
-SERVICE_ERROR=Service error
REGISTER_UNQUALIFIED_PARAMETER=Register unqualified call parameter for: {0}
INVALID_NULL_PARAMETER=Invalid null parameter
OUTPUT_PARAMS_NOT_AVAILABLE=Output params not available
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -33,13 +33,13 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
/**
* This is the proxy that implements the service interface .
@@ -51,7 +51,6 @@
*/
public class ServiceProxy implements InvocationHandler, Serializable, Externalizable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceProxy.class);
// provide logging
private static final Logger log = Logger.getLogger(ServiceProxy.class);
@@ -152,7 +151,7 @@
return retObj;
}
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "NOT_KNOW_HOW_TO_INVOKE", method));
+ throw NativeMessages.MESSAGES.dontKnowHowToInvoke(method);
}
catch (Exception e)
{
@@ -170,7 +169,7 @@
if (ex instanceof InvocationTargetException)
th = ((InvocationTargetException)ex).getTargetException();
- log.error(BundleUtils.getMessage(bundle, "SERVICE_ERROR"), th);
+ NativeLoggers.JAXRPC_LOGGER.jaxRpcServiceError(th);
throw th;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -30,7 +30,6 @@
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -43,7 +42,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.MessageTrace;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
@@ -63,7 +63,6 @@
*/
public abstract class HandlerChainBaseImpl implements HandlerChain
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HandlerChainBaseImpl.class);
private static Logger log = Logger.getLogger(HandlerChainBaseImpl.class);
public static final int STATE_DOES_NOT_EXIST = 0;
@@ -146,7 +145,7 @@
}
catch (Exception ex)
{
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_INITIALIZE_HANDLER_CHAIN"), ex);
+ throw new JAXRPCException(ex);
}
// set state to created
@@ -305,7 +304,7 @@
}
catch (RuntimeException e)
{
- log.error(BundleUtils.getMessage(bundle, "RUNTIMEEXCEPTION_IN_REQUEST_HANDLER"), e);
+ NativeLoggers.JAXRPC_LOGGER.runtimeExceptionInRequestHandler(e);
doNext = false;
throw e;
}
@@ -382,7 +381,7 @@
}
catch (RuntimeException rte)
{
- log.error(BundleUtils.getMessage(bundle, "RUNTIMEEXCEPTION_IN_RESPONSE_HANDLER"), rte);
+ NativeLoggers.JAXRPC_LOGGER.runtimeExceptionInResponseHandler(rte);
doNext = false;
throw rte;
}
@@ -472,7 +471,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_TRACE_SOAP_MESSAGE"), ex);
+ NativeLoggers.JAXRPC_LOGGER.cannotTraceJAXRPCSoapMessage(ex);
return null;
}
}
@@ -500,7 +499,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_CREATE_HANDLER_INSTANCE", entry.info), ex);
+ NativeLoggers.JAXRPC_LOGGER.cannotCreateHandlerInstance(entry.info, ex);
}
}
}
@@ -512,7 +511,7 @@
protected Handler getHandlerAt(int pos)
{
if (pos < 0 || handlers.size() <= pos)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NO_HANDLER_AT_POSITION", pos));
+ throw NativeMessages.MESSAGES.noHandlerAtPosition(pos);
HandlerEntry entry = (HandlerEntry)handlers.get(pos);
return entry.handler;
@@ -530,7 +529,7 @@
public HandlerEntry(HandlerWrapper handler, HandlerInfo info, HandlerType type)
{
if (handler == null || info == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "INVALID_HANDLER_ENTRY"));
+ throw NativeMessages.MESSAGES.invalidHandlerEntry();
if (type == null)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.core.jaxrpc.handler;
-import java.util.ResourceBundle;
+import static org.jboss.ws.NativeLoggers.JAXRPC_LOGGER;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
@@ -31,7 +31,6 @@
import javax.xml.rpc.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
/**
* A wrapper arround a {@link javax.xml.rpc.handler.Handler} that takes care of its lifecycle.
@@ -40,7 +39,6 @@
*/
public class HandlerWrapper implements Handler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HandlerWrapper.class);
private static Logger log = Logger.getLogger(HandlerWrapper.class);
public final static int DOES_NOT_EXIST = 0;
@@ -114,7 +112,7 @@
{
if (state == DOES_NOT_EXIST)
{
- log.warn(BundleUtils.getMessage(bundle, "HANDLER_DOES_NOT_EXIST_SKIPHANDLEREQUEST", delegate));
+ JAXRPC_LOGGER.handlerDoesNotExistSkippingHandleRequest(delegate);
return true;
}
@@ -135,7 +133,7 @@
{
if (state == DOES_NOT_EXIST)
{
- log.warn(BundleUtils.getMessage(bundle, "HANDLER_DOES_NOT_EXIST_SKIPHANDLERESPONSE", delegate));
+ JAXRPC_LOGGER.handlerDoesNotExistSkippingHandleResponse(delegate);
return true;
}
@@ -156,7 +154,7 @@
{
if (state == DOES_NOT_EXIST)
{
- log.warn(BundleUtils.getMessage(bundle, "HANDLER_DOES_NOT_EXIST_SKIPHANDLEFAULT", delegate));
+ JAXRPC_LOGGER.handlerDoesNotExistSkippingHandleFault(delegate);
return true;
}
@@ -178,7 +176,7 @@
{
if ((e instanceof SOAPFaultException) == false)
{
- log.warn(BundleUtils.getMessage(bundle, "TRANSITION_TO_DOES_NOT_EXIST"));
+ JAXRPC_LOGGER.handlerTransitionToDoesNotExist();
destroy();
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/Message.properties 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/Message.properties 2012-10-12 08:30:12 UTC (rev 16863)
@@ -1,11 +0,0 @@
-CANNOT_INITIALIZE_HANDLER_CHAIN=Cannot initialize handler chain
-RUNTIMEEXCEPTION_IN_REQUEST_HANDLER=RuntimeException in request handler
-RUNTIMEEXCEPTION_IN_RESPONSE_HANDLER=RuntimeException in response handler
-CANNOT_TRACE_SOAP_MESSAGE=Cannot trace SOAP message
-CANNOT_CREATE_HANDLER_INSTANCE=Cannot create handler instance for: {0}
-NO_HANDLER_AT_POSITION=No handler at position: {0}
-INVALID_HANDLER_ENTRY=Invalid handler entry
-HANDLER_DOES_NOT_EXIST_SKIPHANDLEREQUEST=Handler is in state DOES_NOT_EXIST, skipping Handler.handleRequest for: {0}
-HANDLER_DOES_NOT_EXIST_SKIPHANDLERESPONSE=Handler is in state DOES_NOT_EXIST, skipping Handler.handleResponse for: {0}
-HANDLER_DOES_NOT_EXIST_SKIPHANDLEFAULT=Handler is in state DOES_NOT_EXIST, skipping Handler.handleFault for: {0}
-TRANSITION_TO_DOES_NOT_EXIST=RuntimeException in handler method, transition to does not exist
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2012-10-12 07:07:00 UTC (rev 16862)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2012-10-12 08:30:12 UTC (rev 16863)
@@ -27,7 +27,6 @@
import javax.xml.rpc.handler.MessageContext;
-import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
@@ -48,8 +47,6 @@
*/
public abstract class MessageContextJAXRPC extends CommonMessageContext implements MessageContext
{
- private static Logger log = Logger.getLogger(MessageContextJAXRPC.class);
-
public static final String SERVLET_CONTEXT = "javax.xml.ws.servlet.context";
public static final String SERVLET_REQUEST = "javax.xml.ws.servlet.request";
public static final String SERVLET_RESPONSE = "javax.xml.ws.servlet.response";
@@ -84,7 +81,6 @@
public static CommonMessageContext processPivot(CommonMessageContext requestContext)
{
- log.debug("Begin response processing");
return requestContext;
}
13 years, 3 months
JBossWS SVN: r16862 - in stack/native/branches/jbossws-native-4.0.x: modules/core and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-12 03:07:00 -0400 (Fri, 12 Oct 2012)
New Revision: 16862
Modified:
stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
[JBWS-3537] rollback netty upgrade for JBossWS EAP
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-10-12 07:02:44 UTC (rev 16861)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-10-12 07:07:00 UTC (rev 16862)
@@ -68,7 +68,7 @@
<artifactId>mail</artifactId>
</dependency>
<dependency>
- <groupId>io.netty</groupId>
+ <groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</dependency>
<dependency>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-10-12 07:02:44 UTC (rev 16861)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-10-12 07:07:00 UTC (rev 16862)
@@ -37,7 +37,7 @@
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
- <include>io.netty:netty:jar</include>
+ <include>org.jboss.netty:netty:jar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-12 07:02:44 UTC (rev 16861)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-12 07:07:00 UTC (rev 16862)
@@ -69,7 +69,7 @@
<saaj.api.version>1.0.1.Final</saaj.api.version>
<jboss.common.core.version>2.2.16.GA</jboss.common.core.version>
<jboss.logging.version>3.1.0.GA</jboss.logging.version>
- <netty.version>3.4.5.Final</netty.version>
+ <netty.version>3.2.6.Final</netty.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
<xerces.version>2.9.1</xerces.version>
<jbossxb.version>2.0.3.GA</jbossxb.version>
@@ -180,7 +180,7 @@
<version>${xerces.version}</version>
</dependency>
<dependency>
- <groupId>io.netty</groupId>
+ <groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<version>${netty.version}</version>
</dependency>
13 years, 3 months
JBossWS SVN: r16861 - stack/native/branches/jbossws-native-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-12 03:02:44 -0400 (Fri, 12 Oct 2012)
New Revision: 16861
Modified:
stack/native/branches/jbossws-native-4.0.x/
Log:
Blocked revisions 16844,16859-16860 via svnmerge
.......
r16844 | alessio.soldano(a)jboss.com | 2012-10-11 10:18:16 +0200 (Thu, 11 Oct 2012) | 2 lines
[JBWS-3509] WIP on convertin native messages to new logging...
.......
r16859 | alessio.soldano(a)jboss.com | 2012-10-11 16:38:55 +0200 (Thu, 11 Oct 2012) | 2 lines
[JBWS-3509] WIP on convertin native messages to new logging...
.......
r16860 | alessio.soldano(a)jboss.com | 2012-10-11 18:19:51 +0200 (Thu, 11 Oct 2012) | 2 lines
[JBWS-3509] WIP on convertin native messages to new logging...
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-blocked
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:15652,15877,15934,...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:15652,15877,15934,...
13 years, 3 months
JBossWS SVN: r16860 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core/client and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-10-11 12:19:51 -0400 (Thu, 11 Oct 2012)
New Revision: 16860
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/Message.properties
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportOutputStream.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/TextImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
Log:
[JBWS-3509] WIP on convertin native messages to new logging...
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -190,4 +190,12 @@
@Message(id = 25177, value = "Exception caught while (preparing for) performing invocation")
void exceptionWhilePreparingForInvocation(@Cause Throwable cause);
+ @LogMessage(level = WARN)
+ @Message(id = 25192, value = "Exception while processing handleFault")
+ void exceptionProcessingHandleFault(@Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25193, value = "Multiple service endoints found for: %s")
+ void multipleServiceEndpointFoundFor(String s);
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -31,6 +31,7 @@
import javax.xml.namespace.QName;
import javax.xml.soap.Name;
import javax.xml.soap.SOAPException;
+import javax.xml.transform.Source;
import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xs.XSElementDeclaration;
@@ -42,6 +43,7 @@
import org.jboss.ws.metadata.wsdl.WSDLException;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.w3c.dom.Node;
/**
* JBossWS-CXF exception messages
@@ -479,4 +481,64 @@
@Message(id = 25176, value = "Target endpoint address not set")
WSException targetEndpointAddressNotSet();
+ @Message(id = 25178, value = "No ByteArrayConverter for %s")
+ WSException noByteArrayConverterFor(String c);
+
+ @Message(id = 25179, value = "Failed to convert %s")
+ WSException failedToConvert(Object o);
+
+ @Message(id = 25180, value = "%s is already a javax.xml.rpc.holders.Holder")
+ IllegalArgumentException alreadyAHolder(String className);
+
+ @Message(id = 25181, value = "%s is not a javax.xml.rpc.holders.Holder")
+ IllegalArgumentException notAHolder(Object holder);
+
+ @Message(id = 25182, value = "Cannot find or access public 'value' field in %s")
+ IllegalArgumentException cannotFindOrAccessPublicFieldValue(Object holder);
+
+ @Message(id = 25183, value = "Holder [%s] value not assignable: %s")
+ IllegalArgumentException holderValueNotAssignable(Object holder, Object value);
+
+ @Message(id = 25184, value = "Object value not available")
+ IllegalStateException objectValueNotAvailable();
+
+ @Message(id = 25185, value = "Content root name does not match element name: %s != %s")
+ WSException doesNotMatchElementName(QName contentRootName, QName elementName);
+
+ @Message(id = 25186, value = "javaType %s is not assignable from: %s")
+ WSException javaTypeIsNotAssignableFrom2(String s1, String s2);
+
+ @Message(id = 25187, value = "The parent element of a soap part is not defined")
+ SOAPException parentElemOfSOAPPartIsNotDefined();
+
+ @Message(id = 25188, value = "Setting value of a soap part is not defined")
+ IllegalStateException settingValueOfSOAPPartIsNotDefined();
+
+ @Message(id = 25189, value = "Unsupported DOMSource node: %s")
+ SOAPException unsupportedDOMSourceNode(Node node);
+
+ @Message(id = 25190, value = "Unsupported source parameter: %s")
+ SOAPException unsupportedSourceParameter(Source s);
+
+ @Message(id = 25191, value = "Access to '%s' resource is not allowed")
+ IOException accessIsNotAllowed(String path);
+
+ @Message(id = 25194, value = "Cannot resolve port-component-link: %s")
+ WSException cannotResolvePortComponentLink(String pcl);
+
+ @Message(id = 25195, value = "Cannot obtain remote connetion for %s")
+ IllegalArgumentException cannotObtainRemoteConnectionFor(Object obj);
+
+ @Message(id = 25196, value = "Cannot obtain target address from %s")
+ IllegalArgumentException cannotObtainTargetAddressFrom(Object obj);
+
+ @Message(id = 25197, value = "Connection is already closed")
+ IOException connectionAlreadyClosed();
+
+ @Message(id = 25198, value = "Invalid chunk size (must be greater than 0): %s")
+ IllegalArgumentException invalidChunkSize(int size);
+
+ @Message(id = 25199, value = "Cannot get channel future before closing the stream")
+ IllegalStateException cannotGetChannelFuture();
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -25,13 +25,12 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.soap.MimeHeader;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.MessageTrace;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.client.transport.NettyClient;
@@ -52,8 +51,6 @@
*/
public abstract class HTTPRemotingConnection implements RemoteConnection
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HTTPRemotingConnection.class);
-
private boolean closed;
private Integer chunkSize;
@@ -90,10 +87,10 @@
public SOAPMessage invoke(SOAPMessage reqMessage, Object endpoint, boolean oneway) throws IOException
{
if (endpoint == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "GIVEN_ENDPOINT_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("endpoint");
if (closed)
- throw new IOException(BundleUtils.getMessage(bundle, "CONNECTION_IS_ALREADY_CLOSED"));
+ throw NativeMessages.MESSAGES.connectionAlreadyClosed();
String targetAddress;
Map<String, Object> callProps = new HashMap<String, Object>();
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/Message.properties 2012-10-11 16:19:51 UTC (rev 16860)
@@ -1,5 +0,0 @@
-GIVEN_ENDPOINT_CANNOT_BE_NULL=Given endpoint cannot be null
-CONNECTION_IS_ALREADY_CLOSED=Connection is already closed
-GIVEN_ENDPOINT_CANNOT_BE_NULL=Given endpoint cannot be null
-CANNOT_OBTAIN_TARGET_ADDRESS=Cannot obtain target address from: {0}
-CANNOT_OBTAIN_REMOTE_CONNETION=Cannot obtain remote connetion for: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/RemoteConnectionFactory.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -21,9 +21,7 @@
*/
package org.jboss.ws.core.client;
-import java.util.ResourceBundle;
-
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.api.util.ServiceLoader;
/**
@@ -34,12 +32,11 @@
*/
public class RemoteConnectionFactory
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(RemoteConnectionFactory.class);
public RemoteConnection getRemoteConnection(EndpointInfo epInfo)
{
String targetAddress = epInfo.getTargetAddress();
if (targetAddress == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_TARGET_ADDRESS", epInfo));
+ throw NativeMessages.MESSAGES.cannotObtainTargetAddressFrom(epInfo);
String key = null;
targetAddress = targetAddress.toLowerCase();
@@ -47,11 +44,11 @@
key = RemoteConnection.class.getName() + ".http";
if (key == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_REMOTE_CONNETION", targetAddress));
+ throw NativeMessages.MESSAGES.cannotObtainRemoteConnectionFor(targetAddress);
RemoteConnection con = (RemoteConnection)ServiceLoader.loadService(key, null, this.getClass().getClassLoader());
if (con == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_REMOTE_CONNETION", key));
+ throw NativeMessages.MESSAGES.cannotObtainRemoteConnectionFor(key);
return con;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/Message.properties 2012-10-11 16:19:51 UTC (rev 16860)
@@ -1,5 +1,3 @@
-INVALID_CHUNK_SIZE=Invalid chunk size (must be greater than 0)
-CANNOT_GET_CHANNEL=Cannot get channel future before closing the stream.
OPERATION_CANCELLED=Operation Cancelled
TIMEOUT_EXCEEDED=Timeout Exceeded
COULD_NOT_CONNECT_TO=Could not connect to {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportOutputStream.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportOutputStream.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/NettyTransportOutputStream.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.OutputStream;
-import java.util.ResourceBundle;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -31,7 +30,7 @@
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.handler.codec.http.DefaultHttpChunk;
import org.jboss.netty.handler.codec.http.HttpChunk;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* An output stream that sends messages using Netty.
@@ -46,7 +45,6 @@
*/
public class NettyTransportOutputStream extends OutputStream
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NettyTransportOutputStream.class);
private Channel channel;
private byte[] buffer;
private int cur;
@@ -64,7 +62,7 @@
this.channel = channel;
if (chunkSize <= 0)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_CHUNK_SIZE"));
+ throw NativeMessages.MESSAGES.invalidChunkSize(chunkSize);
}
this.cur = 0;
this.buffer = new byte[chunkSize];
@@ -155,7 +153,7 @@
{
if (!closed)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_GET_CHANNEL"));
+ throw NativeMessages.MESSAGES.cannotGetChannelFuture();
}
return future;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/transport/WSResponseHandler.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -24,7 +24,6 @@
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -41,7 +40,6 @@
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
-import org.jboss.ws.api.util.BundleUtils;
/**
* A Netty channel upstream handler that receives MessageEvent
@@ -53,7 +51,6 @@
@Sharable
public class WSResponseHandler extends SimpleChannelUpstreamHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSResponseHandler.class);
private FutureResult future;
public WSResponseHandler()
@@ -180,7 +177,7 @@
}
if (cancelled)
{
- throw new InterruptedException(BundleUtils.getMessage(bundle, "OPERATION_CANCELLED"));
+ throw new InterruptedException();
}
if (exception != null)
{
@@ -200,11 +197,11 @@
}
if (cancelled)
{
- throw new InterruptedException(BundleUtils.getMessage(bundle, "OPERATION_CANCELLED"));
+ throw new InterruptedException();
}
if (!done)
{
- throw new TimeoutException(BundleUtils.getMessage(bundle, "TIMEOUT_EXCEEDED"));
+ throw new TimeoutException();
}
if (exception != null)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -21,13 +21,10 @@
*/
package org.jboss.ws.core.server;
-import java.util.ResourceBundle;
-
import javax.xml.rpc.handler.soap.SOAPMessageContext;
import javax.xml.soap.SOAPMessage;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.EndpointInvocation;
@@ -42,14 +39,9 @@
*/
public class DelegatingInvocation extends Invocation
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(DelegatingInvocation.class);
private EndpointInvocation getEndpointInvocation()
{
- EndpointInvocation epInv = getInvocationContext().getAttachment(EndpointInvocation.class);
- if (epInv == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_INVOCATION"));
-
- return epInv;
+ return getInvocationContext().getAttachment(EndpointInvocation.class);
}
@Override
@@ -94,6 +86,6 @@
@Override
public void setArgs(Object[] args)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_SET_ARGS"));
+ throw new UnsupportedOperationException();
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/Message.properties 2012-10-11 16:19:51 UTC (rev 16860)
@@ -1,17 +0,0 @@
-CANNOT_OBTAIN_PCLINK=Cannot obtain request parameter 'pcLink'
-CANNOT_RESOLVE_PORT_COMPONENT_LINK=Cannot resolve port-component-link: {0}
-CANNOT_OBTAIN_WSDL_LOCATION=Cannot obtain wsdl location
-ACCESS_IS_NOT_ALLOWED=Access to '{0}' resource is not allowed
-SKIPPING_REWRITE_OF_INVALID_ADDRESS=Skipping rewrite of invalid address: {0}
-CANNOT_OBTAIN_ENDPOINT_INVOCATION=Cannot obtain endpoint invocation
-CANNOT_SET_ARGS=Cannot set args on this invocation
-
-CANNOT_OBTAIN_ENDPOINT_META_DATA=Cannot obtain endpoint meta data
-RPC/LITERAL_PAPAMETERS_IS_NULL=The RPC/Literal Operation [{0} ] parameters can not be null
-EXCEPTION_PROCESSING_HANDLEFAULT=Exception while processing handleFault:
-CANNOT_PROVIDE_WEBSERVICECONTEXT=Cannot provide WebServiceContext, since the current MessageContext does not provide a ServletRequest
-CANNOT_CREATE_ENDPOINT_INSTANCE=Cannot create endpoint instance
-CODESOURCE=CodeSource: {0}
-CLASSLOADER=ClassLoader: {0}
-MULTIPLE_OPERATIONS_NOT_SUPPORTED=Multiple operations not supported for HTTP binding
-MULTIPLE_SERVICE_ENDOINTS_FOUND=Multiple service endoints found for: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentLinkServlet.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.PrintWriter;
-import java.util.ResourceBundle;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
@@ -32,8 +31,7 @@
import javax.servlet.http.HttpServletResponse;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -58,7 +56,6 @@
*/
public class PortComponentLinkServlet extends HttpServlet
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(PortComponentLinkServlet.class);
// provide logging
private static final Logger log = Logger.getLogger(PortComponentLinkServlet.class);
@@ -78,11 +75,11 @@
{
String pcLink = req.getParameter("pcLink");
if (pcLink == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_PCLINK"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("pcLink");
Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
if (endpoint == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_RESOLVE_PORT_COMPONENT_LINK", pcLink));
+ throw NativeMessages.MESSAGES.cannotResolvePortComponentLink(pcLink);
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -22,10 +22,8 @@
package org.jboss.ws.core.server;
import java.util.Iterator;
-import java.util.ResourceBundle;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointResolver;
@@ -36,9 +34,6 @@
*/
public class PortComponentResolver implements EndpointResolver
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(PortComponentResolver.class);
- private static final Logger log = Logger.getLogger(PortComponentResolver.class);
-
private String pcLink;
public PortComponentResolver(String pcref)
@@ -65,7 +60,7 @@
{
if (endpoint != null)
{
- log.warn(BundleUtils.getMessage(bundle, "MULTIPLE_SERVICE_ENDOINTS_FOUND", pcLink));
+ NativeLoggers.ROOT_LOGGER.multipleServiceEndpointFoundFor(pcLink);
endpoint = null;
break;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -24,7 +24,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.UndeclaredThrowableException;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.server.ServiceLifecycle;
@@ -36,7 +35,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.CommonBinding;
@@ -70,7 +70,6 @@
*/
public class ServiceEndpointInvoker
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceEndpointInvoker.class);
// provide logging
private static final Logger log = Logger.getLogger(ServiceEndpointInvoker.class);
@@ -85,7 +84,7 @@
ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
if (sepMetaData == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_META_DATA"));
+ throw NativeMessages.MESSAGES.cannotObtainEndpointMetaData(endpoint);
bindingProvider = new CommonBindingProvider(sepMetaData);
delegate = new HandlerDelegateJAXRPC(sepMetaData);
@@ -240,7 +239,7 @@
}
catch (RuntimeException subEx)
{
- log.warn(BundleUtils.getMessage(bundle, "EXCEPTION_PROCESSING_HANDLEFAULT"), ex);
+ NativeLoggers.ROOT_LOGGER.exceptionProcessingHandleFault(ex);
binding.bindFaultMessage(subEx);
ex = subEx;
}
@@ -289,7 +288,7 @@
}
catch (Exception ex)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ENDPOINT_INSTANCE"), ex);
+ throw new IllegalStateException(ex);
}
}
}
@@ -321,8 +320,6 @@
}
catch (NoSuchMethodException ex)
{
- log.error(BundleUtils.getMessage(bundle, "CODESOURCE", implClass.getProtectionDomain().getCodeSource()));
- log.error(BundleUtils.getMessage(bundle, "CLASSLOADER", implClass.getClassLoader()));
throw ex;
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -27,10 +27,9 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.util.ResourceBundle;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.spi.management.ServerConfig;
import org.w3c.dom.Attr;
@@ -54,7 +53,6 @@
*/
public class WSDLRequestHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLRequestHandler.class);
// provide logging
private static Logger log = Logger.getLogger(WSDLRequestHandler.class);
@@ -64,6 +62,8 @@
public WSDLRequestHandler(URL wsdlLocationFromMetadata, String wsdlPublishLocationFromMetadata, ServerConfig config)
{
+ if (wsdlLocationFromMetadata == null)
+ throw NativeMessages.MESSAGES.illegalNullArgument("wsdlLocationFromMetadata");
this.wsdlLocation = wsdlLocationFromMetadata;
this.wsdlPublishLoc = wsdlPublishLocationFromMetadata;
this.config = config;
@@ -104,10 +104,6 @@
private Document getDocumentForPath(URL reqURL, String wsdlHost, boolean rewriteUsingCalledURL, String resPath) throws IOException
{
Document wsdlDoc;
-
- if (wsdlLocation == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_WSDL_LOCATION"));
-
// get the root wsdl
if (resPath == null)
{
@@ -156,7 +152,7 @@
}
else
{
- throw new IOException(BundleUtils.getMessage(bundle, "ACCESS_IS_NOT_ALLOWED", resourceAbsPath ));
+ throw NativeMessages.MESSAGES.accessIsNotAllowed(resourceAbsPath);
}
}
@@ -315,13 +311,13 @@
}
else
{
- log.info("Skipping rewrite of non-http address: " + orgLocation);
+ log.debug("Skipping rewrite of non-http address: " + orgLocation);
return false;
}
}
catch (URISyntaxException e)
{
- log.error(BundleUtils.getMessage(bundle, "SKIPPING_REWRITE_OF_INVALID_ADDRESS", orgLocation), e);
+ log.debug("Skipping rewrite of non-http address: " + orgLocation);
return false;
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/Message.properties 2012-10-11 16:19:51 UTC (rev 16860)
@@ -53,13 +53,10 @@
UNSUPPORTED_ENCODING_STYLE=Unsupported encoding style: {0}
CANNOT_UNMARSHALL_SOAPMESSAGE=Cannot unmarshall SOAPMessage
-CANNOT_EXPAND_CONTAINER_CHILDREN=Cannot expand container children
ILLEGAL_STATE_REQUESTED=Illegal state requested: {0}
OBJECT_VALUE_NOT_AVAILABLE=Object value not available
MESSAGECONTEXT_NOT_AVAILABLE=MessageContext not available
-JAVA_TYPE_NOT_ASSIGNABLE=Java type '{0}' is not assignable from: {1}
CANNOT_OBTAIN_DESERIALIZER_FACTORY=Cannot obtain deserializer factory for: [xmlType={0},javaType={1}]
-DOES_NOT_MATCH_ELEMENT_NAME=Content root name does not match element name: {0} != {1}
EMPTY_SOAP_BODY_NOT_SUPPORTED=Empty SOAP body with no child element not supported for RPC
NOT_A_SOAPMESSAGE=Not a SOAPMessage: {0}
@@ -83,11 +80,7 @@
ALREADY_CONTAINS_DETAIL=this fault already contains a detail element
UNABLE_TO_CREATE_FAULT_DETAIL=Unable to create fault detail: {0}
NOT_A_SOAPMESSAGE=Not a SOAPMessage: {0}
-UNSUPPORTED_DOMSOURCE_NODE=Unsupported DOMSource node: {0}
CANNOT_PARSE_STREAM_SOURCE=Cannot parse stream source
-UNSUPPORTED_SOURCE_PARAMETER=Unsupported source parameter: {0}
-THE_PARENT_ELEMENT_NOT_DEFINED=The parent element of a soap part is not defined
-SETTING_VALUE_NOT_DEFINED=Setting value of a soap part is not defined
VALIDATION_ERROR=Validation error: Cannot obtain wsdl URL
SOAP11_NOT_SUPPORT_ROLE=SOAP 1.1 does not support the concept of Role
INVALID_NULL_PARENT_ELEMENT=Invalid null parent element
@@ -103,7 +96,6 @@
CANNOT_DECODE_NAME=Cannot decode name for cid: {0}
IGNORE_SOAPEXCEPTION=Ignore SOAPException: {0}
MIMEHEADERS_CANNOT_BE_NULL=MimeHeaders cannot be null
-INVALID_OFFSET=Invalid offset [{0}] for '{1}'
ILLEGAL_STATE_REQUESTED=Illegal state requested: {0}
PAYLOAD_NOT_AVAILABLE=Payload not available
PAYLOAD_CANNOT_BE_SET_ON_OBJECT_CONTENT=Payload cannot be set on object content
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -27,7 +27,6 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPElement;
@@ -40,7 +39,7 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.api.util.ServiceLoader;
import org.jboss.ws.core.soap.utils.Style;
import org.w3c.dom.Attr;
@@ -68,7 +67,6 @@
*/
public class SOAPPartImpl extends SOAPPart
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SOAPPartImpl.class);
// provide logging
private static Logger log = Logger.getLogger(SOAPPartImpl.class);
@@ -171,7 +169,7 @@
else if (node instanceof Element)
domElement = (Element)node;
else
- throw new SOAPException(BundleUtils.getMessage(bundle, "UNSUPPORTED_DOMSOURCE_NODE", node));
+ throw NativeMessages.MESSAGES.unsupportedDOMSourceNode(node);
EnvelopeBuilder envBuilder = (EnvelopeBuilder) ServiceLoader.loadService(EnvelopeBuilder.class.getName(), EnvelopeBuilderDOM.class.getName());
envBuilder.setStyle(Style.DOCUMENT);
@@ -193,12 +191,12 @@
}
catch (IOException e)
{
- throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_PARSE_STREAM_SOURCE"), e);
+ throw new SOAPException(e);
}
}
else
{
- throw new SOAPException(BundleUtils.getMessage(bundle, "UNSUPPORTED_SOURCE_PARAMETER", source));
+ throw NativeMessages.MESSAGES.unsupportedSourceParameter(source);
}
}
@@ -578,12 +576,12 @@
public void setParentElement(SOAPElement parent) throws SOAPException
{
- throw new SOAPException(BundleUtils.getMessage(bundle, "THE_PARENT_ELEMENT_NOT_DEFINED"));
+ throw NativeMessages.MESSAGES.parentElemOfSOAPPartIsNotDefined();
}
public void setValue(String value)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "SETTING_VALUE_NOT_DEFINED"));
+ throw NativeMessages.MESSAGES.settingValueOfSOAPPartIsNotDefined();
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/TextImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/TextImpl.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/TextImpl.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -23,9 +23,7 @@
import java.io.IOException;
import java.io.Writer;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
import org.w3c.dom.DOMException;
import org.w3c.dom.Text;
@@ -37,8 +35,6 @@
*/
public class TextImpl extends NodeImpl implements javax.xml.soap.Text
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TextImpl.class);
-
public TextImpl(org.w3c.dom.Node node)
{
super(node);
@@ -88,7 +84,7 @@
{
if (offset < 0 || offset > getNodeValue().length())
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_OFFSET", new Object[]{offset, getNodeValue()}));
+ throw new IllegalArgumentException("Invalid offset [" + offset + "] for '" + getNodeValue() + "'");
String before = getNodeValue().substring(0, offset + 1);
setNodeValue(before);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -23,15 +23,14 @@
import java.lang.reflect.Array;
import java.lang.reflect.Method;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.CommonMessageContext;
@@ -59,7 +58,6 @@
*/
class XMLContent extends SOAPContent
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(XMLContent.class);
private static final Logger log = Logger.getLogger(XMLContent.class);
// The well formed XML content of this element.
@@ -99,13 +97,13 @@
}
catch (SOAPException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_EXPAND_CONTAINER_CHILDREN"), ex);
+ throw new WSException(ex);
}
next = new DOMContent(container);
}
else
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_STATE_REQUESTED", nextState));
+ throw new IllegalArgumentException("Illegal state requested " + nextState);
}
return next;
@@ -123,12 +121,12 @@
public Object getObjectValue()
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "OBJECT_VALUE_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.objectValueNotAvailable();
}
public void setObjectValue(Object objValue)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "OBJECT_VALUE_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.objectValueNotAvailable();
}
private Object unmarshallObjectContents()
@@ -143,8 +141,7 @@
log.debug("getObjectValue [xmlType=" + xmlType + ",javaType=" + javaType + "]");
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
SerializationContext serContext = msgContext.getSerializationContext();
ParameterMetaData pmd = container.getParamMetaData();
@@ -199,7 +196,7 @@
{
if (!JavaUtils.isAssignableFrom(javaType, obj.getClass()))
{
- throw new WSException(BundleUtils.getMessage(bundle, "JAVA_TYPE_NOT_ASSIGNABLE", new Object[]{ javaType , objType.getName()}));
+ throw NativeMessages.MESSAGES.javaTypeIsNotAssignableFrom2(javaType.toString(), objType.getName());
}
}
}
@@ -242,9 +239,6 @@
}
}
- if (deserializerFactory == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_DESERIALIZER_FACTORY", new Object[]{ xmlType , javaType}));
-
return deserializerFactory;
}
@@ -265,7 +259,7 @@
boolean artificalElement = (SOAPContentElement.GENERIC_PARAM_NAME.equals(qname) || SOAPContentElement.GENERIC_RETURN_NAME.equals(qname));
if (!artificalElement && !contentRootName.equals(qname))
- throw new WSException(BundleUtils.getMessage(bundle, "DOES_NOT_MATCH_ELEMENT_NAME", new Object[]{ contentRootName , qname}));
+ throw NativeMessages.MESSAGES.doesNotMatchElementName(contentRootName, qname);
// Remove all child nodes
container.removeContents();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -21,12 +21,13 @@
*/
package org.jboss.ws.core.utils;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Calendar;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.holders.BigDecimalHolder;
@@ -51,8 +52,6 @@
import javax.xml.rpc.holders.ShortWrapperHolder;
import javax.xml.rpc.holders.StringHolder;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
/**
@@ -65,11 +64,8 @@
*/
public class HolderUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HolderUtils.class);
- private static final Logger log = Logger.getLogger(HolderUtils.class);
-
/** True if the given type is a holder. */
- public static boolean isHolderType(Class javaType)
+ public static boolean isHolderType(Class<?> javaType)
{
return javax.xml.rpc.holders.Holder.class.isAssignableFrom(javaType);
}
@@ -86,13 +82,13 @@
* @param valueType the value
* @return the holder, or null if there is no match
*/
- public static Class getJAXRPCHolderType(Class valueType)
+ public static Class<?> getJAXRPCHolderType(Class<?> valueType)
{
if (valueType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_PARAMETER"));
+ throw MESSAGES.illegalNullArgument("valueType");
if (javax.xml.rpc.holders.Holder.class.isAssignableFrom(valueType))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ALREADY_A_HOLDER", valueType.getName()));
+ throw MESSAGES.alreadyAHolder(valueType.getName());
if (valueType == BigDecimal.class)
return BigDecimalHolder.class;
@@ -137,8 +133,6 @@
if (valueType == Object.class)
return ObjectHolder.class;
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_GET_HOLDER_TYPE", valueType));
-
return null;
}
@@ -154,7 +148,7 @@
boolean jaxrpcHolder = javax.xml.rpc.holders.Holder.class.isAssignableFrom(holderClass);
if (!jaxrpcHolder)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NOT_A_HOLDER", holderClass.getName()));
+ throw MESSAGES.notAHolder(holderClass.getName());
// Holder is supposed to have a public value field.
Field field;
@@ -164,7 +158,7 @@
}
catch (NoSuchFieldException e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_FIND_PUBLIC_VALUE_FIELD", holderClass));
+ throw MESSAGES.cannotFindOrAccessPublicFieldValue(holderClass);
}
return field.getType();
@@ -182,7 +176,7 @@
{
boolean jaxrpcHolder = javax.xml.rpc.holders.Holder.class.isAssignableFrom(holderClass);
if (!jaxrpcHolder)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NOT_A_HOLDER", holderClass.getName()));
+ throw MESSAGES.notAHolder(holderClass.getName());
// Holder is supposed to have a public value field.
Field field;
@@ -192,7 +186,7 @@
}
catch (NoSuchFieldException e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_FIND_PUBLIC_VALUE_FIELD", holderClass));
+ throw MESSAGES.cannotFindOrAccessPublicFieldValue(holderClass);
}
return field.getType();
@@ -207,10 +201,10 @@
public static Object getHolderValue(Object holder)
{
if (holder == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_PARAMETER"));
+ throw MESSAGES.illegalNullArgument("holder");
if (!javax.xml.rpc.holders.Holder.class.isInstance(holder))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NOT_A_HOLDER", holder));
+ throw MESSAGES.notAHolder(holder);
try
{
@@ -224,7 +218,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_ACCESS_PUBLIC_VALUE_FIELD", holder));
+ throw MESSAGES.cannotFindOrAccessPublicFieldValue(holder);
}
}
@@ -239,15 +233,15 @@
public static void setHolderValue(Object holder, Object value)
{
if (holder == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "HOLDER_INSTANCE_WAS_NULL"));
+ throw MESSAGES.illegalNullArgument("holder");
if (!javax.xml.rpc.holders.Holder.class.isInstance(holder))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NOT_A_HOLDER", holder));
+ throw MESSAGES.notAHolder(holder);
Class valueType = getValueType(holder.getClass());
if (value != null && JavaUtils.isAssignableFrom(valueType, value.getClass()) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "HOLDER_VALUE_NOT_ASSIGNABLE", new Object[]{ holder.getClass().getName() , value}));
+ throw MESSAGES.holderValueNotAssignable(holder.getClass().getName(), value);
if (valueType.isArray())
value = JavaUtils.syncArray(value, valueType);
@@ -264,7 +258,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_ACCESS_PUBLIC_VALUE_FIELD", holder));
+ throw MESSAGES.cannotFindOrAccessPublicFieldValue(holder);
}
}
@@ -278,7 +272,7 @@
public static Object createHolderInstance(Object value, Class<?> holderType)
{
if (! isHolderType(holderType))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NOT_A_HOLDER_TYPE", holderType.getName()));
+ throw MESSAGES.notAHolder(holderType);
Object holder;
@@ -292,7 +286,7 @@
}
catch (Exception e)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_INSTANCIATE_HOLDER", holderType));
+ throw new IllegalArgumentException(e);
}
setHolderValue(holder, value);
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/Message.properties 2012-10-11 16:19:51 UTC (rev 16860)
@@ -1,19 +0,0 @@
-NO_BYTEARRAYCONVERTER_CLASS=No ByteArrayConverter for class: {0}
-NO_BYTEARRAYCONVERTER_CONTENT_TYPE=No ByteArrayConverter for content type: {0}
-FAILED_TO_CONVERT=Failed to convert {0}
-UNABLE_TO_CONVERT=Unable to convert {0}
-FAILED_TO_CONVERT_STRING=Failed to convert java.lang.String
-FAILED_TO_CONVERT_BYTE=Failed to convert byte[]
-ILLEGAL_NULL_PARAMETER=Illegal null parameter
-ALREADY_A_HOLDER=Is already a holder: {0}
-CANNOT_GET_HOLDER_TYPE=Cannot get holder type for: {0}
-IS_NOT_A_HOLDER=Is not a holder: {0}
-CANNOT_FIND_PUBLIC_VALUE_FIELD=Cannot find public value field: {0}
-ILLEGAL_NULL_PARAMETER=Illegal null parameter
-IS_NOT_A_HOLDER=Is not a holder: {0}
-CANNOT_ACCESS_PUBLIC_VALUE_FIELD=Cannot access public value field: {0}
-HOLDER_INSTANCE_WAS_NULL=Holder instance was null
-IS_NOT_A_HOLDER=Is not a holder: {0}
-HOLDER_VALUE_NOT_ASSIGNABLE=Holder [{0}] value not assignable: {1}
-NOT_A_HOLDER_TYPE=Not a holder type:{0}
-CANNOT_INSTANCIATE_HOLDER=Cannot instanciate holder: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2012-10-11 14:38:55 UTC (rev 16859)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2012-10-11 16:19:51 UTC (rev 16860)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.core.utils;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -28,7 +30,6 @@
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.imageio.ImageIO;
@@ -42,8 +43,6 @@
import javax.xml.namespace.QName;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.IOUtils;
import org.jboss.ws.common.JavaUtils;
@@ -55,11 +54,9 @@
*/
public class MimeUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(MimeUtils.class);
+ private static Map<String, Class<?>> mime2class = new HashMap<String, Class<?>>();
+ private static Map<Class<?>, String> class2mime = new HashMap<Class<?>, String>();
- private static Map<String, Class> mime2class = new HashMap<String, Class>();
- private static Map<Class, String> class2mime = new HashMap<Class, String>();
-
static {
mime2class.put("text/plain", java.lang.String.class);
mime2class.put("image/jpeg", java.awt.Image.class);
@@ -127,7 +124,7 @@
* @param mimeTypes the set of mime types to search
* @return true if there is a match, false if not
*/
- public static boolean isMemberOf(String mimeType, Set mimeTypes)
+ public static boolean isMemberOf(String mimeType, Set<?> mimeTypes)
{
if (mimeTypes.contains(mimeType))
return true;
@@ -149,8 +146,8 @@
* Resolve the class for a mype type.
* Defaults to <code>DataHandler</code> if no mapping could be found.
*/
- public static Class resolveClass(String mimeType) {
- Class cl = mime2class.get(mimeType);
+ public static Class<?> resolveClass(String mimeType) {
+ Class<?> cl = mime2class.get(mimeType);
if(null==cl)
cl = javax.activation.DataHandler.class;
return cl;
@@ -168,9 +165,9 @@
return mimeType;
}
- public static String resolveMimeType(Class clazz) {
+ public static String resolveMimeType(Class<?> clazz) {
String mimeType = "application/octet-stream";
- for(Class cl : class2mime.keySet())
+ for(Class<?> cl : class2mime.keySet())
{
if(JavaUtils.isAssignableFrom(cl, clazz))
mimeType = class2mime.get(cl);
@@ -178,7 +175,7 @@
return mimeType;
}
- public static ByteArrayConverter getConverterForJavaType(Class targetClazz)
+ public static ByteArrayConverter getConverterForJavaType(Class<?> targetClazz)
{
ByteArrayConverter converter = null;
if(JavaUtils.isAssignableFrom(java.awt.Image.class, targetClazz))
@@ -193,7 +190,7 @@
converter = new RealByteArrayConverter();
if(null == converter)
- throw new WSException(BundleUtils.getMessage(bundle, "NO_BYTEARRAYCONVERTER_CLASS", targetClazz.getName()));
+ throw MESSAGES.noByteArrayConverterFor(targetClazz.getName());
return converter;
}
@@ -215,7 +212,7 @@
}
if(null == converter)
- throw new WSException(BundleUtils.getMessage(bundle, "NO_BYTEARRAYCONVERTER_CONTENT_TYPE", contentType));
+ throw MESSAGES.noByteArrayConverterFor(contentType);
return converter;
}
@@ -252,12 +249,12 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
@@ -280,12 +277,12 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
}
@@ -305,7 +302,7 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT_STRING"));
+ throw MESSAGES.failedToConvert("java.lang.String");
}
return converted;
@@ -321,12 +318,12 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
}
@@ -347,7 +344,7 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT_BYTE"));
+ throw MESSAGES.failedToConvert("byte[]");
}
return converted;
@@ -364,12 +361,12 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
}
@@ -389,7 +386,7 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CONVERT", obj.getClass()));
+ throw MESSAGES.failedToConvert(obj.getClass());
}
}
}
13 years, 3 months
JBossWS SVN: r16859 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-10-11 10:38:55 -0400 (Thu, 11 Oct 2012)
New Revision: 16859
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/Message.properties
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveFieldAccessorFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveMethodAccessorFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/ExceptionMapping.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMapping.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/MethodParamPartsMapping.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/WsdlMessageMapping.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointConfigMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypeMappingMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java
Log:
[JBWS-3509] WIP on convertin native messages to new logging...
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -126,4 +126,68 @@
@Message(id = 25097, value = "Cannot parse XSModel string: %s")
void cannotParseXSModelString(String s, @Cause Throwable cause);
+ @LogMessage(level = WARN)
+ @Message(id = 25101, value = "Cannot obtain javaTypeName for xmlType: %s")
+ void cannotObtainJavaTypeName(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25104, value = "Multiple possible endpoints implementing SEI: %s")
+ void multiplePossibleEndpointImplementingSEI(String seiName);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25112, value = "Set java type name after eager initialization: %s")
+ void setJavaTypeAfterEagerInit(String typeName);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25122, value = "Loading java type after eager initialization")
+ void loadingJavaTypeAfterEagerInit();
+
+ @LogMessage(level = WARN)
+ @Message(id = 25129, value = "Setting name of or loading SEI after eager initialization")
+ void loadingSettingSEIAfterEagerInit();
+
+ @LogMessage(level = WARN)
+ @Message(id = 25130, value = "Cannot load class for type %s %s")
+ void cannotLoadClassForType(QName q, String s, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25131, value = "Loading java method after eager initialization")
+ void loadingJavaMethodAfterEagerInit();
+
+ @LogMessage(level = WARN)
+ @Message(id = 25135, value = "Cannot find jaxrpc-mapping for type: %s")
+ void cannotFindJAXRPCMappingForType(QName type);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25138, value = "Malformed URL: %s")
+ void malformedURL(String url);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25140, value = "Cannot obtain fault type for element: %s")
+ void cannotObtainFaultTypeForElement(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25141, value = "Cannot obtain java type mapping for: %s")
+ void cannotObtainJavaTypeMappingFor(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25144, value = "Cannot obtain SEI mapping for: %s")
+ void cannotObtainSEIMappingFor(String name);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25161, value = "Mime type %s not allowed for parameter %s allowed types are: %s")
+ void mimeTypeNotAllowed(String type, QName param, Collection<String> allowed);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25169, value = "Expected SOAP %s envelope, but got: %s")
+ void unexpectedSoapEnvelopeVersion(String expectedEnvelopeVersion, String envelopeNS);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25174, value = "Failed to cleanup attachment part")
+ void failedToCleanupAttachmentPart(@Cause Throwable cause);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25177, value = "Exception caught while (preparing for) performing invocation")
+ void exceptionWhilePreparingForInvocation(@Cause Throwable cause);
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -22,12 +22,14 @@
package org.jboss.ws;
import java.io.File;
+import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import javax.management.ObjectName;
import javax.wsdl.Part;
import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
import javax.xml.soap.SOAPException;
import org.apache.xerces.xni.XNIException;
@@ -35,6 +37,8 @@
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.soap.utils.Use;
import org.jboss.ws.metadata.wsdl.WSDLException;
import org.jboss.ws.metadata.wsdl.WSDLTypes;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -95,7 +99,7 @@
WSException cannotLoadClass(String className, @Cause Throwable cause);
@Message(id = 25021, value = "Cannot obtain endpoint for: %s")
- WSException cannotObtainEndpoint(ObjectName oname);
+ WSException cannotObtainEndpoint(Object oname);
@Message(id = 25023, value = "Schema mapping, %s argument is null")
IllegalArgumentException illegalNullArgumentInSchemaMapping(String argument);
@@ -289,4 +293,190 @@
@Message(id = 25099, value = "Parser should stop, the key value is %s")
XNIException parserShouldStopKeyValueIs(String keyValue, @Cause Exception cause);
+ @Message(id = 25100, value = "Classloader not available")
+ IllegalStateException classloaderNotAvailable();
+
+ @Message(id = 25102, value = "Ambiguous type mappping for: %s")
+ WSException ambiguousTypeMapping(QName qname);
+
+ @Message(id = 25103, value = "Invalid qname scope: %s")
+ IllegalArgumentException invalidQNameScope(String scope);
+
+ @Message(id = 25105, value = "EndpointMetaData name must be unique: %s")
+ WSException endpointMetadataMustBeUnique(QName qname);
+
+ @Message(id = 25106, value = "No type mapping for encoding style: %s")
+ WSException noTypeMapping(Use use);
+
+ @Message(id = 25107, value = "Conflicting encoding styles not supported: %s, %s")
+ WSException conflictingEncodingStyles(Object obj1, Object obj2);
+
+ @Message(id = 25108, value = "Requested namespace is not WSDL target namespace: %s")
+ WSException notWsdlTargetNamespace(String ns);
+
+ @Message(id = 25109, value = "context root should start with '/': %s")
+ IllegalArgumentException contextRootShouldStartsWith(String ctxRoot);
+
+ @Message(id = 25110, value = "URL pattern should start with '/': %s")
+ IllegalArgumentException urlPatternShouldStartsWith(String urlPattern);
+
+ @Message(id = 25111, value = "Endpoint not available")
+ IllegalStateException endpointNotAvailable();
+
+ @Message(id = 25113, value = "Invalid mode: %s")
+ IllegalArgumentException invalidMode(String mode);
+
+ @Message(id = 25114, value = "Invalid mime type: %s")
+ IllegalArgumentException invalidMimeType(QName xmlType);
+
+ @Message(id = 25115, value = "Autogeneration of wrapper beans not supported with JAXRPC")
+ WSException jaxrpcWrapperBeanAutogenNotSupported();
+
+ @Message(id = 25116, value = "Cannot load: %s")
+ WSException cannotLoad(String className);
+
+ @Message(id = 25117, value = "Cannot find java method: %s")
+ WSException cannotFindJavaMethod(String method);
+
+ @Message(id = 25118, value = "OneWay operations cannot have a return parameter")
+ WSException onewayOperationCannotHaveReturn();
+
+ @Message(id = 25119, value = "OneWay operations cannot have checked exceptions")
+ WSException onewayOperationCannotHaveCheckedExc();
+
+ @Message(id = 25120, value = "OneWay operations cannot have INOUT or OUT parameters")
+ WSException onewayOperationCannotHaveInOutPars();
+
+ @Message(id = 25121, value = "Handler class name cannot be null")
+ IllegalStateException handlerClassNameCannotBeNull();
+
+ @Message(id = 25123, value = "%s is not assignable to Exception")
+ IllegalStateException notAssignableToException(Class<?> clazz);
+
+ @Message(id = 25124, value = "%s is not a java.lang.Exception")
+ WSException notAnException(String clazz);
+
+ @Message(id = 25125, value = "Could not instantiate service exception (%s), since neither a faultInfo nor sorted constructor is present: %s")
+ WSException couldNotInstanciateServiceException(String exc, String s);
+
+ @Message(id = 25126, value = "Unsupported binding: %s")
+ WSException unsupportedBinding(String bindingID);
+
+ @Message(id = 25127, value = "Mixed SOAP parameter styles not supported: %s, %s")
+ WSException conflictingSOAPParameterStyles(Object obj1, Object obj2);
+
+ @Message(id = 25128, value = "Cannot uniquely indentify operation: %s")
+ WSException cannotUniquelyIdentifyOp(QName op);
+
+ @Message(id = 25132, value = "Invalid parameter mode: %s")
+ IllegalArgumentException invalidParameterMode(String mode);
+
+ @Message(id = 25133, value = "Cannot parse: %s")
+ IOException cannotParse(URL url);
+
+ @Message(id = 25134, value = "Invalid anonymous qname: %s")
+ IllegalArgumentException invalidAnonymousQName(String value);
+
+ @Message(id = 25136, value = "Service path cannot be null")
+ WSException servicePathCannotBeNull();
+
+ @Message(id = 25137, value = "Cannot find <url-pattern> for servlet-name: %s")
+ WSException cannotFindURLPatternForServletName(String s);
+
+ @Message(id = 25139, value = "Cannot find port in wsdl: %s")
+ IllegalArgumentException cannotFindPortInWsdl2(QName port);
+
+ @Message(id = 25142, value = "jaxrpc-mapping-file not configured from webservices.xml")
+ WSException mappingFileNotConfigured();
+
+ @Message(id = 25143, value = "Cannot obtain UnifiedBeanMetaData for: %s")
+ WSException cannotObtainUnifiedBeanMetaData(String name);
+
+ @Message(id = 25145, value = "Cannot find port in wsdl: %s")
+ WSException cannotFindPortInWsdl(QName port);
+
+ @Message(id = 25146, value = "Cannot obtain java type mapping for: %s")
+ WSException cannotObtainJavaTypeMappingFor(QName qname);
+
+ @Message(id = 25147, value = "Cannot obtain java/xml type mapping for: %s")
+ WSException cannotObtainJavaXmlTypeMappingFor(QName qname);
+
+ @Message(id = 25148, value = "Cannot locate binding operation for: %s")
+ WSException cannotLocateBindingOperationFor(QName q);
+
+ @Message(id = 25149, value = "Cannot obtain method mapping for: %s")
+ WSException cannotObtainMethodMappingFor(QName qname);
+
+ @Message(id = 25150, value = "Cannot obtain method parameter mapping for message part '%s' in wsdl operation %s")
+ WSException cannotObtainMethodParameterMappingFor(String part, String wsdlOp);
+
+ @Message(id = 25151, value = "RPC style was missing an output, and was not an IN-ONLY MEP.")
+ WSException rpcStyleMissingOutputAndNotAInOnlyMEP();
+
+ @Message(id = 25152, value = "Cannot wrap parameters without SEI method mapping")
+ IllegalArgumentException cannotWrapParametersWithoutSEIMethodMapping();
+
+ @Message(id = 25153, value = "Could not determine variable name for element: %s")
+ IllegalArgumentException couldNotDetermineVariableNameForElement(String elem);
+
+ @Message(id = 25154, value = "Invalid parameter mode for element %s")
+ IllegalArgumentException invalidParameterModeForElement(String elem);
+
+ @Message(id = 25155, value = "Could not update IN parameter to be INOUT, as indicated in the mapping: %s")
+ WSException couldNotUpdateInParameterAsIndicated(String part);
+
+ @Message(id = 25156, value = "Cannot obtain wsdl service: %s")
+ IllegalArgumentException cannotObtainWSDLService(QName service);
+
+ @Message(id = 25157, value = "Field cannot be static: %s")
+ WSException fieldCannotBeStatic(String field);
+
+ @Message(id = 25158, value = "Unsupported message type: %s")
+ String unsupportedMessageType(Object obj);
+
+ @Message(id = 25159, value = "Cannot trace SOAP Message")
+ String cannotTraceSOAPMessage();
+
+ @Message(id = 25160, value = "Operation %s does not have a return value")
+ WSException operationDoesNotHaveReturnValue(QName op);
+
+ @Message(id = 25162, value = "Mime type %s not allowed for parameter %s allowed types are: %s")
+ SOAPException mimeTypeNotAllowed(String type, QName param, Collection<String> allowed);
+
+ @Message(id = 25163, value = "javaType [%s] is not assignable from attachment content: %s")
+ SOAPException javaTypeIsNotAssignable(String javaType, String contentType);
+
+ @Message(id = 25164, value = "Parameter %s not assignable from %s")
+ WSException parameterNotAssignable(Object clazz1, Object clazz2);
+
+ @Message(id = 25165, value = "javaType %s is not assignable from: %s")
+ BindingException javaTypeIsNotAssignableFrom(String s1, String s2);
+
+ @Message(id = 25166, value = "Cannot find RPC element in %s")
+ SOAPException cannotFindRPCElement(Object parent);
+
+ @Message(id = 25167, value = "Invalid number of payload elements: %s")
+ WSException invalidNumberOfPayloadElements(int n);
+
+ @Message(id = 25168, value = "Cannot unbind response message with empty soap body")
+ WSException emptySOAPBody();
+
+ @Message(id = 25170, value = "Could not determine mime type for attachment parameter: %s")
+ BindingException couldNotDetermineMimeType(String par);
+
+ @Message(id = 25171, value = "Could not locate attachment for parameter: %s")
+ BindingException couldNotLocateAttachment(QName qname);
+
+ @Message(id = 25172, value = "Cannot find child element: %s")
+ WSException cannotFindChildElement(Name name);
+
+ @Message(id = 25173, value = "No SOAPMessage available. Current message context carries: %s")
+ UnsupportedOperationException noSoapMessageAvailable(Class<?> clazz);
+
+ @Message(id = 25175, value = "Cannot obtain operation meta data for %s")
+ WSException cannotObtainOperationMetaData(QName opName);
+
+ @Message(id = 25176, value = "Target endpoint address not set")
+ WSException targetEndpointAddressNotSet();
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,13 +21,12 @@
*/
package org.jboss.ws.core;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
@@ -38,8 +37,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ResourceLoaderAdapter;
import org.jboss.ws.core.DirectionHolder.Direction;
@@ -68,7 +66,6 @@
*/
public abstract class CommonClient implements StubExt, HeaderSource
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CommonClient.class);
// provide logging
private static Logger log = Logger.getLogger(CommonClient.class);
@@ -118,7 +115,7 @@
{
epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_ENDPOINT_FOR_NAME", portName));
+ throw MESSAGES.cannotObtainEndpoint(portName);
}
if (epMetaData != null)
@@ -163,9 +160,6 @@
*/
public OperationMetaData getOperationMetaData()
{
- if (operationName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "OPERATION_NAME_NOT_SET"));
-
return getOperationMetaData(operationName);
}
@@ -174,7 +168,7 @@
public OperationMetaData getOperationMetaData(QName opName)
{
if (opName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_GET_OPERATIONMETADATA"));
+ throw MESSAGES.illegalNullArgument("opName");
EndpointMetaData epMetaData = getEndpointMetaData();
OperationMetaData opMetaData = epMetaData.getOperation(opName);
@@ -185,7 +179,7 @@
}
if (opMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_OPERATION_META_DATA_FOR", opName));
+ throw MESSAGES.cannotObtainOperationMetaData(opName);
return opMetaData;
}
@@ -300,7 +294,7 @@
// The endpoint address must be known beyond this point
if (targetAddress == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TARGET_ENDPOINT_ADDRESS_NOT_SET"));
+ throw MESSAGES.targetEndpointAddressNotSet();
Map<String, Object> callProps = new HashMap<String, Object>(requestCtx);
EndpointInfo epInfo = new EndpointInfo(epMetaData, targetAddress, callProps);
@@ -366,7 +360,7 @@
}
catch (Exception ex)
{
- log.error(BundleUtils.getMessage(bundle, "EXCEPTION_CAUGHT_WHILE_(PREPARING_FOR)_PERFORMING_THE_INVOCATION"), ex);
+ NativeLoggers.ROOT_LOGGER.exceptionWhilePreparingForInvocation(ex);
// Reverse the message direction
processPivotInternal(msgContext, direction);
if (faultType[2] != null)
@@ -540,7 +534,7 @@
}
catch (SOAPException ex)
{
- throw new JAXRPCException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ATTACHMENT_PART"));
+ throw new JAXRPCException(ex);
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -25,7 +25,6 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.soap.AttachmentPart;
@@ -33,7 +32,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -48,9 +48,6 @@
*/
public abstract class CommonMessageContext implements Map<String, Object>
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CommonMessageContext.class);
- private static Logger log = Logger.getLogger(CommonMessageContext.class);
-
public static final String REMOTING_METADATA = "org.jboss.ws.remoting.metadata";
// The serialization context for this message ctx
@@ -106,7 +103,7 @@
public SOAPMessage getSOAPMessage()
{
if(message!=null && ((message instanceof SOAPMessage) == false))
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "NO_SOAPMESSAGE_AVILABLE", message.getClass()));
+ throw NativeMessages.MESSAGES.noSoapMessageAvailable(message.getClass());
return (SOAPMessage)message;
}
@@ -207,6 +204,7 @@
}
catch (IllegalArgumentException ex)
{
+ Logger log = Logger.getLogger(CommonMessageContext.class);
if (log.isDebugEnabled())
log.debug("Ignore: " + ex.getMessage());
}
@@ -239,7 +237,7 @@
if(msg!=null && (msg instanceof SOAPMessage)) // in case of http binding
{
- Iterator it = ((SOAPMessage)msg).getAttachments();
+ Iterator<?> it = ((SOAPMessage)msg).getAttachments();
while(it.hasNext())
{
AttachmentPart attachment = (AttachmentPart)it.next();
@@ -253,7 +251,7 @@
}
catch (SOAPException e)
{
- log.warn(BundleUtils.getMessage(bundle, "FAILED_TO_CLEANUP_ATTACHMENT_PART"), e);
+ NativeLoggers.ROOT_LOGGER.failedToCleanupAttachmentPart(e);
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -22,7 +22,6 @@
package org.jboss.ws.core;
import java.util.Iterator;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.activation.DataHandler;
@@ -45,8 +44,8 @@
import org.apache.xerces.xs.XSElementDeclaration;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.JavaUtils;
@@ -79,7 +78,6 @@
*/
public abstract class CommonSOAPBinding implements CommonBinding
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(CommonSOAPBinding.class);
// provide logging
protected Logger log = Logger.getLogger(getClass());
@@ -119,8 +117,7 @@
try
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
// Associate current message with message context
SOAPMessage reqMessage = createMessage(opMetaData);
@@ -209,8 +206,7 @@
EndpointInvocation epInv = new EndpointInvocation(opMetaData);
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
// Get the namespace registry
NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
@@ -233,7 +229,7 @@
}
if (payloadParent == null)
- throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_FIND_RPC_ELEMENT"));
+ throw NativeMessages.MESSAGES.cannotFindRPCElement(soapBody);
QName elName = payloadParent.getElementQName();
elName = namespaceRegistry.registerQName(elName);
@@ -277,7 +273,7 @@
numChildElements++;
}
if (numChildElements != numParameters)
- throw new WSException(BundleUtils.getMessage(bundle, "INVALID_NUMBER_OF_PAYLOAD_ELEMENTS", numChildElements));
+ throw NativeMessages.MESSAGES.invalidNumberOfPayloadElements(numChildElements);
}
// Generic message endpoint
@@ -309,8 +305,7 @@
try
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
// Associate current message with message context
SOAPMessage resMessage = (SOAPMessage)createMessage(opMetaData);
@@ -434,8 +429,7 @@
// Get the SOAP message context that is associated with the current thread
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
SOAPHeader soapHeader = soapEnvelope.getHeader();
SOAPBody soapBody = (SOAPBody)soapEnvelope.getBody();
@@ -450,7 +444,7 @@
if (style == Style.RPC)
{
if (soapBodyElement == null)
- throw new WSException(BundleUtils.getMessage(bundle, "EMPTY_SOAP_BODY"));
+ throw NativeMessages.MESSAGES.emptySOAPBody();
soapElement = soapBodyElement;
}
@@ -499,10 +493,6 @@
{
msgContext.setSOAPMessage(faultMessage);
}
- else
- {
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_SET_FAULT_MESSAGE"));
- }
return faultMessage;
}
@@ -513,10 +503,10 @@
String envNS = soapEnvelope.getNamespaceURI();
String bindingId = opMetaData.getEndpointMetaData().getBindingId();
if (CommonSOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) && Constants.NS_SOAP11_ENV.equals(envNS) == false)
- log.warn(BundleUtils.getMessage(bundle, "EXPECTED_SOAP11", envNS));
+ NativeLoggers.ROOT_LOGGER.unexpectedSoapEnvelopeVersion("1.1", envNS);
if (CommonSOAPBinding.SOAP12HTTP_BINDING.equals(bindingId) && Constants.NS_SOAP12_ENV.equals(envNS) == false)
- log.warn(BundleUtils.getMessage(bundle, "EXPECTED_SOAP12", envNS));
+ NativeLoggers.ROOT_LOGGER.unexpectedSoapEnvelopeVersion("1.2", envNS);
}
private AttachmentPart createAttachmentPart(ParameterMetaData paramMetaData, Object value) throws SOAPException, BindingException
@@ -534,7 +524,7 @@
// Conformance (MIME type mismatch): On receipt of a message where the MIME type of a part does not
// match that described in the WSDL an implementation SHOULD throw a WebServiceException.
if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
- log.warn(BundleUtils.getMessage(bundle, "MIME_TYPE_NOT_ALLOWED", new Object[]{ mimeType , partName , mimeTypes}));
+ NativeLoggers.ROOT_LOGGER.mimeTypeNotAllowed(mimeType, paramMetaData.getXmlName(), mimeTypes);
part.setDataHandler((DataHandler)value);
}
@@ -551,7 +541,7 @@
}
if (mimeType == null)
- throw new BindingException(BundleUtils.getMessage(bundle, "COULD_NOT_DETERMINE_MIME_TYPE", partName));
+ throw NativeMessages.MESSAGES.couldNotDetermineMimeType(partName);
part.setContent(value, mimeType);
}
@@ -571,7 +561,7 @@
AttachmentPart part = getAttachmentByPartName(xmlName.getLocalPart(), message);
if (part == null)
- throw new BindingException(BundleUtils.getMessage(bundle, "COULD_NOT_LOCATE_ATTACHMENT", paramMetaData.getXmlName()));
+ throw NativeMessages.MESSAGES.couldNotLocateAttachment(paramMetaData.getXmlName());
return part;
}
@@ -593,13 +583,13 @@
private SOAPContentElement addParameterToMessage(ParameterMetaData paramMetaData, Object value, SOAPElement soapElement, SOAPEnvelope soapEnvelope) throws SOAPException, BindingException
{
QName xmlName = paramMetaData.getXmlName();
- Class javaType = paramMetaData.getJavaType();
+ Class<?> javaType = paramMetaData.getJavaType();
if (value != null)
{
- Class valueType = value.getClass();
+ Class<?> valueType = value.getClass();
if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
- throw new BindingException(BundleUtils.getMessage(bundle, "JAVATYPE_IS_NOT_ASSIGNABLE", new Object[]{ javaType.getName() , valueType.getName()}));
+ throw NativeMessages.MESSAGES.javaTypeIsNotAssignableFrom(javaType.getName(), valueType.getName());
}
// Make sure we have a prefix on qualified names
@@ -733,7 +723,7 @@
}
if (soapContentElement == null && optional == false)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_CHILD_ELEMENT", xmlName));
+ throw NativeMessages.MESSAGES.cannotFindChildElement(xmlName);
return soapContentElement;
}
@@ -745,15 +735,14 @@
public void checkMustUnderstand(OperationMetaData opMetaData) throws Exception
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- if (msgContext == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MESSAGECONTEXT_NOT_AVAILABLE"));
+ assert(msgContext != null);
SOAPMessage soapMessage = (SOAPMessage)msgContext.getSOAPMessage();
SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
if (soapEnvelope == null || soapEnvelope.getHeader() == null)
return;
- Iterator it = soapEnvelope.getHeader().examineAllHeaderElements();
+ Iterator<?> it = soapEnvelope.getHeader().examineAllHeaderElements();
while (it.hasNext())
{
SOAPHeaderElement soapHeaderElement = (SOAPHeaderElement)it.next();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -28,7 +28,6 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.activation.DataHandler;
@@ -38,8 +37,9 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.soap.SOAPContentElement;
@@ -58,7 +58,6 @@
*/
public class EndpointInvocation
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointInvocation.class);
// provide logging
private static final Logger log = Logger.getLogger(EndpointInvocation.class);
@@ -167,7 +166,7 @@
paramValue = transformPayloadValue(paramMetaData, paramValue);
if (paramValue != null)
{
- Class valueType = paramValue.getClass();
+ Class<?> valueType = paramValue.getClass();
if (HolderUtils.isHolderType(valueType))
{
paramValue = HolderUtils.getHolderValue(paramValue);
@@ -180,7 +179,7 @@
{
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (value != null && retMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle, "OPERATION_DOES_NOT_HAVE_A_RETURN_VALUE", opMetaData.getQName()));
+ throw NativeMessages.MESSAGES.operationDoesNotHaveReturnValue(opMetaData.getQName());
if (log.isDebugEnabled())
log.debug("setReturnValue: " + getTypeName(value));
@@ -214,7 +213,7 @@
String javaName = paramMetaData.getJavaTypeName();
if (xmlType == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_XML_TYPE", new Object[]{ xmlName , javaName }));
+ throw NativeMessages.MESSAGES.cannotObtainXmlType(xmlName);
Object retValue = paramValue;
@@ -223,7 +222,7 @@
{
AttachmentPart part = (AttachmentPart)paramValue;
- Set mimeTypes = paramMetaData.getMimeTypes();
+ Set<String> mimeTypes = paramMetaData.getMimeTypes();
if (DataHandler.class.isAssignableFrom(javaType) && !javaType.equals(Object.class))
{
DataHandler handler = part.getDataHandler();
@@ -233,7 +232,7 @@
// Conformance (MIME type mismatch): On receipt of a message where the MIME type of a part does not
// match that described in the WSDL an implementation SHOULD throw a WebServiceException.
if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
- log.warn(BundleUtils.getMessage(bundle, "MIME_TYPE_NOT_ALLOWED", new Object[]{ mimeType , xmlName , mimeTypes}));
+ NativeLoggers.ROOT_LOGGER.mimeTypeNotAllowed(mimeType, xmlName, mimeTypes);
retValue = part.getDataHandler();
}
@@ -243,7 +242,7 @@
String mimeType = MimeUtils.getBaseMimeType(part.getContentType());
if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
- throw new SOAPException(BundleUtils.getMessage(bundle, "MIME_TYPE_NOT_ALLOWED", new Object[]{ mimeType , xmlName , mimeTypes}));
+ throw NativeMessages.MESSAGES.mimeTypeNotAllowed(mimeType, xmlName, mimeTypes);
if (retValue != null)
{
@@ -257,8 +256,7 @@
}
else
{
- throw new SOAPException(BundleUtils.getMessage(bundle, "JAVATYPE_IS_NOT_ASSIGNABLE",
- new Object[]{ javaType.getName(), valueType.getName()}));
+ throw NativeMessages.MESSAGES.javaTypeIsNotAssignable(javaType.getName(), valueType.getName());
}
}
}
@@ -296,7 +294,7 @@
continue;
QName xmlName = paramMetaData.getXmlName();
- Class javaType = paramMetaData.getJavaType();
+ Class<?> javaType = paramMetaData.getJavaType();
Object value;
if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA())
@@ -308,7 +306,7 @@
value = inputParams[index];
if (value != null)
{
- Class inputType = value.getClass();
+ Class<?> inputType = value.getClass();
if (HolderUtils.isHolderType(inputType))
{
@@ -323,7 +321,7 @@
if (value != null && !paramMetaData.isSwA())
{
if (JavaUtils.isAssignableFrom(javaType, inputType) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "PARAMETER_NOT_ASSIGNABLE", new Object[]{ javaType , inputType}));
+ throw NativeMessages.MESSAGES.parameterNotAssignable(javaType, inputType);
}
}
}
@@ -339,7 +337,7 @@
{
Object retValue = paramValue;
Method method = opMetaData.getJavaMethod();
- Class[] targetParameterTypes = method.getParameterTypes();
+ Class<?>[] targetParameterTypes = method.getParameterTypes();
if (opMetaData.isDocumentWrapped() && !paramMetaData.isInHeader() && !paramMetaData.isSwA() && !paramMetaData.isMessageType())
{
@@ -350,7 +348,7 @@
{
// Replace INOUT and OUT parameters by their respective holder values
int index = paramMetaData.getIndex();
- Class targetParameterType = targetParameterTypes[index];
+ Class<?> targetParameterType = targetParameterTypes[index];
if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode() == ParameterMode.OUT)
{
@@ -362,9 +360,9 @@
if (retValue != null)
{
- Class valueType = retValue.getClass();
+ Class<?> valueType = retValue.getClass();
if (JavaUtils.isAssignableFrom(targetParameterType, valueType) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "PARAMETER_NOT_ASSIGNABLE", new Object[]{ targetParameterType.getName() , getTypeName(retValue)}));
+ throw NativeMessages.MESSAGES.parameterNotAssignable(targetParameterType.getName(), getTypeName(retValue));
if (valueType.isArray())
retValue = JavaUtils.syncArray(retValue, targetParameterType);
@@ -376,7 +374,7 @@
}
}
- private void syncOutWrappedParameters(Class[] targetParameterTypes, Object[] payload)
+ private void syncOutWrappedParameters(Class<?>[] targetParameterTypes, Object[] payload)
{
ParameterMetaData returnMetaData = opMetaData.getReturnParameter();
if (returnMetaData != null)
@@ -395,7 +393,7 @@
}
catch (Exception e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_ADD_OUTPUT_PARAM", param.getName()), e);
+ throw new WSException(e);
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,37 +0,0 @@
-MESSAGECONTEXT_NOT_AVAILABLE=MessageContext not available
-CANNOT_FIND_RPC_ELEMENT=Cannot find RPC element in
-INVALID_NUMBER_OF_PAYLOAD_ELEMENTS=Invalid number of payload elements: {0}
-EMPTY_SOAP_BODY=Cannot unbind response message with empty soap body
-CANNOT_SET_FAULT_MESSAGE=Cannot set fault message in message context
-EXPECTED_SOAP11=Expected SOAP-1.1 envelope, but got: {0}
-EXPECTED_SOAP12=Expected SOAP-1.2 envelope, but got: {0}
-MIME_TYPE_NOT_ALLOWED=Mime type {0}not allowed for parameter {1} allowed types are {2}
-COULD_NOT_DETERMINE_MIME_TYPE=Could not determine mime type for attachment parameter: {0}
-COULD_NOT_LOCATE_ATTACHMENT=Could not locate attachment for parameter: {0}
-JAVATYPE_IS_NOT_ASSIGNABLE=javaType {0} is not assignable from: {1}
-CANNOT_FIND_CHILD_ELEMENT=Cannot find child element: {0}
-MESSAGECONTEXT_NOT_AVAILABLE=MessageContext not available
-OPERATION_DOES_NOT_HAVE_A_RETURN_VALUE=Operation does not have a return value: {0}
-CANNOT_OBTAIN_XML_TYPE=Cannot obtain xml type for: [xmlName={0},javaName={1}]
-MIME_TYPE_NOT_ALLOWED=Mime type {0} not allowed for parameter {1} allowed types are {2}
-JAVATYPE_IS_NOT_ASSIGNABLE=javaType [{0}] is not assignable from attachment content: {1}
-PARAMETER_NOT_ASSIGNABLE=Parameter {0} not assignable from {1}
-COULD_NOT_ADD_OUTPUT_PARAM=Could not add output param: {0}
-CANNOT_TRACE_SOAPMESSAGE=Cannot trace SOAPMessage
-UNSUPPORTED_MESSAGE_TYPE=Unsupported message type: {0}
-NO_SOAPMESSAGE_AVILABLE=No SOAPMessage avilable. Current message context carries {0}
-CANNOT_SET_VALUE_FOR_HANDLER_SCOPED_PROPERTY=Cannot set value for HANDLER scoped property: {0}
-CANNOT_SET_REMOVE_FOR_HANDLER_SCOPED_PROPERTY=Cannot set remove for HANDLER scoped property: {0}
-FAILED_TO_CLEANUP_ATTACHMENT_PART=Failed to cleanup attachment part
-CANNOT_GET_EPR=Cannot get EPR for BindingProvider instances using the XML/HTTP binding
-CANNOT_GET_EPR_FROM_EMD=Cannot get endpoint reference info from endpoint metadata!
-CANNOT_FIND_ENDPOINT_FOR_NAME=Cannot find endpoint for name: {0}
-OPERATION_NAME_NOT_SET=Operation name not set
-CANNOT_GET_OPERATIONMETADATA=Cannot get OperationMetaData for null
-CANNOT_OBTAIN_OPERATION_META_DATA_FOR=Cannot obtain operation meta data for: {0}
-TARGET_ENDPOINT_ADDRESS_NOT_SET=Target endpoint address not set
-EXCEPTION_WHILE_PERFORMING_INVOCATION=Exception caught while (preparing for) performing the invocation:
-RPC_LITERAL_OPERATION_PARAMS_IS_NULL=The RPC/Literal Operation [{0}] parameters can not be null
-RPC_LITERAL_OPERATION_RETURN_IS_NULL=THE_RPC/LITERAL_OPERATION [{0}] return value can not be null, it's WS-BP:2211 violation
-CANNOT_FIND_UNBOUND_HEADER=Cannot find unbound header: {0}
-CANNOT_CREATE_ATTACHMENT_PART=Cannot create attachment part
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -23,7 +23,6 @@
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
-import java.util.ResourceBundle;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
@@ -34,7 +33,7 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.attachment.MimeConstants;
@@ -58,7 +57,6 @@
*/
public final class MessageTrace
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(MessageTrace.class);
private static final Logger msgLog = Logger.getLogger(MessageTrace.class);
private static ServerConfig serverConfig = null;
private static boolean serverConfigInit = false;
@@ -127,7 +125,7 @@
}
catch (Exception ex)
{
- msgLog.error(BundleUtils.getMessage(bundle, "CANNOT_TRACE_SOAPMESSAGE"), ex);
+ msgLog.error(NativeMessages.MESSAGES.cannotTraceSOAPMessage(), ex);
}
}
else if (message instanceof byte[])
@@ -144,7 +142,7 @@
}
else
{
- msgLog.warn(BundleUtils.getMessage(bundle, "UNSUPPORTED_MESSAGE_TYPE", message));
+ msgLog.warn(NativeMessages.MESSAGES.unsupportedMessageType(message));
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,4 +0,0 @@
-COULD_NOT_OBTAIN_ACCESSOR=Could not obtain accessor for parameter: {0}
-FIELD_CAN_NOT_BE_STATIC=Field can not be static: {0}
-ERROR_ACCESSING_FIELD=Error accessing field: {0}: {1}
-JAXBCONTEXT_NOT_AVAILABLE=JAXBContext not available
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveFieldAccessorFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveFieldAccessorFactory.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveFieldAccessorFactory.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -23,18 +23,16 @@
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
-import java.util.ResourceBundle;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.umdm.WrappedParameter;
final class ReflectiveFieldAccessorFactory implements AccessorFactory
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ReflectiveFieldAccessorFactory.class);
- private final Class clazz;
+ private final Class<?> clazz;
- ReflectiveFieldAccessorFactory(Class clazz)
+ ReflectiveFieldAccessorFactory(Class<?> clazz)
{
this.clazz = clazz;
}
@@ -58,15 +56,13 @@
}
if (Modifier.isStatic(field.getModifiers()))
- throw new WSException(BundleUtils.getMessage(bundle, "FIELD_CAN_NOT_BE_STATIC", fieldName));
+ throw NativeMessages.MESSAGES.fieldCannotBeStatic(fieldName);
return new ReflectiveFieldAccessor(field);
}
catch (Throwable t)
{
- WSException ex = new WSException(BundleUtils.getMessage(bundle, "ERROR_ACCESSING_FIELD", new Object[]{ fieldName , t.getMessage()}));
- ex.setStackTrace(t.getStackTrace());
- throw ex;
+ throw new WSException(t);
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveMethodAccessorFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveMethodAccessorFactory.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/accessor/ReflectiveMethodAccessorFactory.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -28,9 +28,9 @@
final class ReflectiveMethodAccessorFactory implements AccessorFactory
{
- private final Class clazz;
+ private final Class<?> clazz;
- ReflectiveMethodAccessorFactory(Class clazz)
+ ReflectiveMethodAccessorFactory(Class<?> clazz)
{
this.clazz = clazz;
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,11 +0,0 @@
-CANNOT_OBTAIN_BINDING=Cannot obtain binding: {0}
-CANNOT_GET_EJB_LINK=Cannot obtain ejb-link from port component
-CANNOT_GET_EJB_META_DATA=Cannot obtain ejb meta data for: {0}
-SERVICE_PATH_CANNOT_BE_NULL=Service path cannot be null
-MALFORMED_URL_DETAIL=Malformed URL: uriScheme={0} host={1} port={2} servicePath={3}
-CANNOT_FIND_URL_PATTERN=Cannot find <url-pattern> for servlet-name: {0}
-MALFORMED_URL=Malformed URL: {0}
-CANNOT_FIND_PORT_IN_WSDL=Cannot find port in wsdl: {0}
-CANNOT_FIND_PORT=Cannot find port with name '{0}' in wsdl document
-CANNOT_OBTAIN_FAULT_TYPE=Cannot obtain fault type for element: {0}
-CANNOT_OBTAIN_JAVA_TYPE_MAPPING=Cannot obtain java type mapping for: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.metadata.builder;
+import static org.jboss.ws.NativeMessages.MESSAGES;
import static org.jboss.ws.common.integration.WSHelper.isJseEndpoint;
import java.io.IOException;
@@ -31,7 +32,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.management.ObjectName;
import javax.wsdl.Definition;
@@ -43,8 +43,8 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
@@ -83,7 +83,6 @@
*/
public abstract class MetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(MetaDataBuilder.class);
// provide logging
private final static Logger log = Logger.getLogger(MetaDataBuilder.class);
@@ -119,7 +118,7 @@
QName bindQName = wsdlEndpoint.getBinding();
WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(bindQName);
if (wsdlBinding == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_BINDING", bindQName));
+ throw MESSAGES.cannotObtainBinding(bindQName);
for (WSDLBindingOperation wsdlBindingOperation : wsdlBinding.getOperations())
{
@@ -203,7 +202,7 @@
public static String getServiceEndpointAddress(String uriScheme, String servicePath, int servicePort, ServerConfig config)
{
if (servicePath == null || servicePath.length() == 0)
- throw new WSException(BundleUtils.getMessage(bundle, "SERVICE_PATH_CANNOT_BE_NULL"));
+ throw MESSAGES.servicePathCannotBeNull();
if (servicePath.endsWith("/*"))
servicePath = servicePath.substring(0, servicePath.length() - 2);
@@ -253,7 +252,7 @@
}
catch (MalformedURLException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "MALFORMED_URL_DETAIL", new Object[]{ uriScheme , host , port , servicePath }), e);
+ throw new WSException(e);
}
}
@@ -270,7 +269,7 @@
String urlPattern = servletMappings.get(servletLink);
if (urlPattern == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_URL_PATTERN", servletLink));
+ throw MESSAGES.cannotFindURLPatternForServletName(servletLink);
List<JSESecurityMetaData> securityList = webMetaData.getSecurityMetaData();
for (JSESecurityMetaData currentSecurity : securityList)
@@ -342,7 +341,7 @@
}
catch (MalformedURLException e)
{
- log.warn(BundleUtils.getMessage(bundle, "MALFORMED_URL", orgAddress));
+ NativeLoggers.ROOT_LOGGER.malformedURL(orgAddress);
sepMetaData.setEndpointAddress(orgAddress);
}
}
@@ -351,7 +350,7 @@
}
if (endpointFound == false)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_PORT_IN_WSDL", portName));
+ throw MESSAGES.cannotFindPortInWsdl(portName);
}
private static boolean requiresRewrite(String orgAddress, String uriScheme, ServerConfig config)
@@ -389,11 +388,11 @@
if (!wsdlOneOneDefinition.getImports().isEmpty())
{
- Iterator imports = wsdlOneOneDefinition.getImports().values().iterator();
+ Iterator<?> imports = wsdlOneOneDefinition.getImports().values().iterator();
while (imports.hasNext())
{
- List l = (List)imports.next();
- Iterator importsByNS = l.iterator();
+ List<?> l = (List<?>)imports.next();
+ Iterator<?> importsByNS = l.iterator();
while (importsByNS.hasNext())
{
Import anImport = (Import)importsByNS.next();
@@ -405,7 +404,7 @@
}
}
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_FIND_PORT", portQName ));
+ throw MESSAGES.cannotFindPortInWsdl2(portQName);
}
/**
@@ -487,7 +486,7 @@
if (xmlType == null)
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_FAULT_TYPE", xmlName));
+ NativeLoggers.ROOT_LOGGER.cannotObtainFaultTypeForElement(xmlName);
xmlType = xmlName;
}
@@ -497,7 +496,7 @@
if (javaTypeName == null)
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA_TYPE_MAPPING", xmlType));
+ NativeLoggers.ROOT_LOGGER.cannotObtainJavaTypeMappingFor(xmlType);
javaTypeName = new UnqualifiedFaultException(xmlType).getClass().getName();
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -23,14 +23,13 @@
import java.io.IOException;
import java.net.URL;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ResourceLoaderAdapter;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
@@ -57,10 +56,6 @@
*/
public class JAXRPCClientMetaDataBuilder extends JAXRPCMetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXRPCClientMetaDataBuilder.class);
- // provide logging
- private final Logger log = Logger.getLogger(JAXRPCClientMetaDataBuilder.class);
-
/** Build from WSDL and jaxrpc-mapping.xml
*/
public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, URL mappingURL,
@@ -83,7 +78,7 @@
}
catch (Exception ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_BUILD_META_DATA", ex.getMessage()), ex);
+ throw new WSException(ex);
}
}
@@ -131,7 +126,7 @@
}
catch (Exception ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_BUILD_META_DATA", ex.getMessage()), ex);
+ throw new WSException(ex);
}
}
@@ -144,9 +139,6 @@
WSDLService wsdlService = null;
if (serviceQName == null)
{
- if (wsdlDefinitions.getServices().length != 1)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "EXPECTED_A_SINGLE_SERVICE_ELEMENT"));
-
wsdlService = wsdlDefinitions.getServices()[0];
serviceMetaData.setServiceName(wsdlService.getName());
}
@@ -155,7 +147,7 @@
wsdlService = wsdlDefinitions.getService(serviceQName);
}
if (wsdlService == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_WSDL_SERVICE", serviceQName));
+ throw NativeMessages.MESSAGES.cannotObtainWSDLService(serviceQName);
// Build type mapping meta data
setupTypesMetaData(serviceMetaData);
@@ -191,7 +183,7 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_SEI_MAPPING", portType));
+ NativeLoggers.ROOT_LOGGER.cannotObtainSEIMappingFor(portType.toString());
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,19 +21,18 @@
*/
package org.jboss.ws.metadata.builder.jaxrpc;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -85,7 +84,6 @@
*/
public abstract class JAXRPCMetaDataBuilder extends MetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXRPCMetaDataBuilder.class);
// provide logging
final Logger log = Logger.getLogger(JAXRPCMetaDataBuilder.class);
@@ -151,12 +149,8 @@
String opName = opQName.getLocalPart();
WSDLBindingOperation wsdlBindingOperation = wsdlOperation.getBindingOperation();
- if (wsdlBindingOperation == null)
+ if (wsdlBindingOperation != null)
{
- log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_LOCATE_BP", opQName));
- }
- else
- {
// Change operation according namespace defined on binding
// <soap:body use="encoded" namespace="http://MarshallTestW2J.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
String namespaceURI = wsdlBindingOperation.getNamespaceURI();
@@ -173,7 +167,7 @@
seiMethodMapping = seiMapping.getServiceEndpointMethodMappingByWsdlOperation(opName);
if (seiMethodMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_METHOD_MAPPING", opName));
+ throw MESSAGES.cannotObtainMethodMappingFor(opQName);
javaName = seiMethodMapping.getJavaMethodName();
}
@@ -233,8 +227,7 @@
}
else if (!optional)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_METHOD_PARAMETER_MAPPING", new Object[]{partName, seiMethodMapping.getWsdlOperation()}));
-
+ throw MESSAGES.cannotObtainMethodParameterMappingFor(partName, seiMethodMapping.getWsdlOperation());
}
}
@@ -249,12 +242,13 @@
if (packageName != null)
{
javaTypeName = packageName + "." + xmlType.getLocalPart();
- log.warn(BundleUtils.getMessage(bundle, "GUESS_JAVA_TYPE", new Object[]{ xmlType , javaTypeName }));
+ if (log.isDebugEnabled())
+ log.debug("Guess java type from package mapping: [xmlType=" + xmlType + " javaType=" + javaTypeName + "]");
}
}
if (javaTypeName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaTypeMappingFor(xmlType);
ParameterMetaData inMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
inMetaData.setPartName(partName);
@@ -329,12 +323,13 @@
if (packageName != null)
{
javaTypeName = packageName + "." + xmlType.getLocalPart();
- log.warn(BundleUtils.getMessage(bundle, "GUESS_JAVA_TYPE", new Object[]{ xmlType, javaTypeName}));
+ if (log.isDebugEnabled())
+ log.debug("Guess java type from package mapping: [xmlType=" + xmlType + " javaType=" + javaTypeName + "]");
}
}
if (javaTypeName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaTypeMappingFor(xmlType);
ParameterMetaData outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
outMetaData.setPartName(partName);
@@ -515,7 +510,7 @@
WSDLBindingOperation bindingOperation = wsdlOperation.getBindingOperation();
if (bindingOperation == null)
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_LOCATE_BP", opMetaData.getQName()));
+ throw MESSAGES.cannotLocateBindingOperationFor(opMetaData.getQName());
// RPC has one input
WSDLInterfaceOperationInput input = wsdlOperation.getInputs()[0];
@@ -563,7 +558,7 @@
}
else if (wsdlOperation.getPattern() != Constants.WSDL20_PATTERN_IN_ONLY)
{
- throw new WSException(BundleUtils.getMessage(bundle, "RPC_STYLE_WAS_MISSING_AN_OUTPUT"));
+ throw MESSAGES.rpcStyleMissingOutputAndNotAInOnlyMEP();
}
}
@@ -585,7 +580,7 @@
javaTypeName = typeMetaData.getJavaTypeName();
if (javaTypeName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaTypeMappingFor(xmlType);
// Check if we need to wrap the parameters
boolean isWrapped = isWrapped(seiMethodMapping, javaTypeName);
@@ -598,12 +593,12 @@
if (inMetaData.getOperationMetaData().isDocumentWrapped())
{
if (seiMethodMapping == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_WRAP_PARAMETERS"));
+ throw MESSAGES.cannotWrapParametersWithoutSEIMethodMapping();
ServiceEndpointInterfaceMapping seiMapping = seiMethodMapping.getServiceEndpointInterfaceMapping();
JavaXmlTypeMapping javaXmlTypeMapping = seiMapping.getJavaWsdlMapping().getTypeMappingForQName(xmlType);
if (javaXmlTypeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA/XML_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaXmlTypeMappingFor(xmlType);
Map<String, String> variableMap = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
for (MethodParamPartsMapping partMapping : seiMethodMapping.getMethodParamPartsMappings())
@@ -612,9 +607,6 @@
if (wsdlMessageMapping.isSoapHeader())
continue;
- if (wsdlMessageMapping == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "M2M_MAPPING_REQUIRED"));
-
String elementName = wsdlMessageMapping.getWsdlMessagePartName();
// Skip attachments
@@ -623,13 +615,13 @@
String variable = variableMap.get(elementName);
if (variable == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "COULD_NOT_DETERMINE_VARIABLE_NAME", elementName));
+ throw MESSAGES.couldNotDetermineVariableNameForElement(elementName);
WrappedParameter wrapped = new WrappedParameter(new QName(elementName), partMapping.getParamType(), variable, partMapping.getParamPosition());
String parameterMode = wsdlMessageMapping.getParameterMode();
if (parameterMode == null || parameterMode.length() < 2)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_PARAMETER_MODE", elementName));
+ throw MESSAGES.invalidParameterModeForElement(elementName);
if (!"OUT".equals(parameterMode))
wrappedParameters.add(wrapped);
@@ -735,7 +727,7 @@
javaTypeName = typesMetaData.getTypeMappingByXMLType(xmlType).getJavaTypeName();
if (javaTypeName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA/XML_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaXmlTypeMappingFor(xmlType);
ParameterMetaData outMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, javaTypeName);
@@ -743,7 +735,7 @@
if (opMetaData.isDocumentWrapped())
{
if (seiMethodMapping == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_WRAP_PARAMETERS"));
+ throw MESSAGES.cannotWrapParametersWithoutSEIMethodMapping();
WsdlReturnValueMapping returnValueMapping = seiMethodMapping.getWsdlReturnValueMapping();
if (returnValueMapping != null)
@@ -752,7 +744,7 @@
JavaWsdlMapping javaWsdlMapping = seiMapping.getJavaWsdlMapping();
JavaXmlTypeMapping javaXmlTypeMapping = javaWsdlMapping.getTypeMappingForQName(xmlType);
if (javaXmlTypeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVA/XML_TYPE_MAPPING", xmlType));
+ throw MESSAGES.cannotObtainJavaXmlTypeMappingFor(xmlType);
Map<String, String> map = createVariableMappingMap(javaXmlTypeMapping.getVariableMappings());
if (map.size() > 0)
@@ -760,7 +752,7 @@
String elementName = returnValueMapping.getWsdlMessagePartName();
String variable = map.get(elementName);
if (variable == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "COULD_NOT_DETERMINE_VARIABLE_NAME", elementName));
+ throw MESSAGES.couldNotDetermineVariableNameForElement(elementName);
String wrappedType = returnValueMapping.getMethodReturnValue();
QName element = new QName(elementName);
@@ -791,7 +783,7 @@
return wsdlPosition;
}
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_UPDATE_IN_PARAMETER", opOutput.getPartName()));
+ throw MESSAGES.couldNotUpdateInParameterAsIndicated(opOutput.getPartName());
}
// It's potentialy possible that an input parameter could exist with the same part name
else if ("OUT".equals(mode))
@@ -836,7 +828,7 @@
WSDLBindingOperation bindingOperation = wsdlOperation.getBindingOperation();
if (bindingOperation == null)
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_LOCATE_BP", bindingOperation));
+ throw MESSAGES.cannotLocateBindingOperationFor(wsdlOperation.getName());
List<WrappedParameter> wrappedParameters = new ArrayList<WrappedParameter>();
List<WrappedParameter> wrappedResponseParameters = new ArrayList<WrappedParameter>();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,15 +21,16 @@
*/
package org.jboss.ws.metadata.builder.jaxrpc;
-import java.util.ResourceBundle;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.util.Set;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
@@ -59,7 +60,6 @@
*/
public class JAXRPCServerMetaDataBuilder extends JAXRPCMetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXRPCServerMetaDataBuilder.class);
// provide logging
final Logger log = Logger.getLogger(JAXRPCServerMetaDataBuilder.class);
@@ -76,8 +76,7 @@
UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
wsMetaData.setDeploymentName(dep.getCanonicalName());
ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
- if(null == runtimeClassLoader)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "RUNTIME_LOADER_CANNOT_BE_NULL"));
+ assert(runtimeClassLoader != null);
wsMetaData.setClassLoader(runtimeClassLoader);
WebservicesMetaData jaxrpcMapping = dep.getAttachment(WebservicesMetaData.class);
@@ -100,7 +99,7 @@
serviceMetaData.setMappingLocation(dep.getResourceResolver().resolve(mappingFile));
JavaWsdlMapping javaWsdlMapping = serviceMetaData.getJavaWsdlMapping();
if (javaWsdlMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MAPPING_FILE_NOT_CONFIGURED"));
+ throw MESSAGES.mappingFileNotConfigured();
// Build type mapping meta data
setupTypesMetaData(serviceMetaData);
@@ -118,13 +117,12 @@
{
String nsURI = wsdlDefinitions.getTargetNamespace();
portName = new QName(nsURI, portName.getLocalPart());
- log.warn(BundleUtils.getMessage(bundle, "ADDING_WSDL_TNS", portName));
pcMetaData.setWsdlPort(portName);
}
WSDLEndpoint wsdlEndpoint = getWsdlEndpoint(wsdlDefinitions, portName);
if (wsdlEndpoint == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_PORT", portName));
+ throw MESSAGES.cannotFindPortInWsdl(portName);
// set service name
serviceMetaData.setServiceName(wsdlEndpoint.getWsdlService().getName());
@@ -155,7 +153,7 @@
// Copy <port-component> meta data
EJBMetaData bmd = apMetaData.getBeanByEjbName(linkName);
if (bmd == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_UNIFIEDBEANMETADATA", linkName));
+ throw MESSAGES.cannotObtainUnifiedBeanMetaData(linkName);
EJBSecurityMetaData smd = bmd.getSecurityMetaData();
if (smd != null)
@@ -193,7 +191,7 @@
ServiceEndpointInterfaceMapping seiMapping = javaWsdlMapping.getServiceEndpointInterfaceMapping(seiName);
if (seiMapping == null)
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_SEI_MAPPING", seiName));
+ NativeLoggers.ROOT_LOGGER.cannotObtainSEIMappingFor(seiName);
// Setup the endpoint operations
setupOperationsFromWSDL(sepMetaData, wsdlEndpoint, seiMapping);
@@ -221,7 +219,7 @@
}
catch (Exception ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_BUILD_META_DATA", ex.getMessage()), ex);
+ throw new WSException(ex);
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,24 +0,0 @@
-RUNTIME_LOADER_CANNOT_BE_NULL=Runtime loader cannot be null
-MAPPING_FILE_NOT_CONFIGURED=jaxrpc-mapping-file not configured from webservices.xml
-ADDING_WSDL_TNS=Adding wsdl targetNamespace to: {0}
-CANNOT_FIND_PORT=Cannot find port in wsdl: {0}
-CANNOT_OBTAIN_UNIFIEDBEANMETADATA=Cannot obtain UnifiedBeanMetaData for: {0}
-CANNOT_OBTAIN_SEI_MAPPING=Cannot obtain SEI mapping for: {0}
-
-CANNOT_BUILD_META_DATA=Cannot build meta data: {0}
-EXPECTED_A_SINGLE_SERVICE_ELEMENT=Expected a single service element
-CANNOT_OBTAIN_WSDL_SERVICE=Cannot obtain wsdl service: {0}
-
-COULD_NOT_LOCATE_BP=Could not locate binding operation for:{0}
-CANNOT_OBTAIN_METHOD_MAPPING=Cannot obtain method mapping for: {0}
-CANNOT_OBTAIN_METHOD_PARAMETER_MAPPING=Cannot obtain method parameter mapping for message part '{0}' in wsdl operation {1}
-GUESS_JAVA_TYPE=Guess java type from package mapping: [xmlType={0} javaType={1}]
-CANNOT_OBTAIN_JAVA_TYPE_MAPPING=Cannot obtain java type mapping for: {0}
-RPC_STYLE_WAS_MISSING_AN_OUTPUT=RPC style was missing an output, and was not an IN-ONLY MEP.
-CANNOT_WRAP_PARAMETERS=Cannot wrap parameters without SEI method mapping
-CANNOT_OBTAIN_JAVA/XML_TYPE_MAPPING=Cannot obtain java/xml type mapping for: {0}
-M2M_MAPPING_REQUIRED=wsdl-message-message mapping required for document/literal wrapped
-COULD_NOT_DETERMINE_VARIABLE_NAME=Could not determine variable name for element: {0}
-INVALID_PARAMETER_MODE=Invalid parameter mode for element: {0}
-COULD_NOT_UPDATE_IN_PARAMETER=Could not update IN parameter to be INOUT, as indicated in the mapping: {0}
-COULD_NOT_LOCATE_BINDING_OPERATION_FOR=Could not locate binding operation for:{0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/ExceptionMapping.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/ExceptionMapping.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/ExceptionMapping.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -45,7 +45,7 @@
// The required <wsdl-message> element
private QName wsdlMessage;
// The optional <constructor-parameter-order> element
- private ArrayList constructorParameterOrder = new ArrayList();
+ private ArrayList<String> constructorParameterOrder = new ArrayList<String>();
public ExceptionMapping(JavaWsdlMapping javaWsdlMapping)
{
@@ -101,7 +101,7 @@
if (constructorParameterOrder.size() > 0)
{
sb.append("<constructor-parameter-order>");
- for (Iterator i = constructorParameterOrder.iterator(); i.hasNext();)
+ for (Iterator<String> i = constructorParameterOrder.iterator(); i.hasNext();)
sb.append("<element-name>").append(i.next()).append("</element-name>");
sb.append("</constructor-parameter-order>");
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMapping.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMapping.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMapping.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -25,12 +25,10 @@
import java.util.ArrayList;
import java.util.Iterator;
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.ws.NativeLoggers;
/**
* XML mapping of the java-wsdl-mapping root element in jaxrpc-mapping.xml
@@ -40,12 +38,8 @@
*/
public class JavaWsdlMapping implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaWsdlMapping.class);
private static final long serialVersionUID = -142671631068024054L;
- // provide logging
- private static Logger log = Logger.getLogger(JavaWsdlMapping.class);
-
// One or more <package-mapping> elements
private List packageMappings = new ArrayList();
// Zero or more <java-xml-type-mapping> elements
@@ -145,7 +139,7 @@
}
if (typeMapping == null)
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_FIND_MAPPING", xmlType));
+ NativeLoggers.ROOT_LOGGER.cannotFindJAXRPCMappingForType(xmlType);
}
return typeMapping;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -24,12 +24,11 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.utils.ResourceURL;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.ObjectModelFactory;
@@ -46,7 +45,6 @@
*/
public class JavaWsdlMappingFactory implements ObjectModelFactory
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaWsdlMappingFactory.class);
// provide logging
private static Logger log = Logger.getLogger(JavaWsdlMappingFactory.class);
@@ -70,7 +68,7 @@
{
if (mappingURL == null)
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "URL_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("mappingURL");
}
// setup the XML binding Unmarshaller
@@ -83,7 +81,7 @@
}
catch (JBossXBException e)
{
- IOException ioex = new IOException(BundleUtils.getMessage(bundle, "CANNOT_PARSE", mappingURL));
+ IOException ioex = NativeMessages.MESSAGES.cannotParse(mappingURL);
Throwable cause = e.getCause();
if (cause != null)
ioex.initCause(cause);
@@ -263,7 +261,7 @@
}
if (qname == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ANONYMOUS_QNAME", value));
+ throw NativeMessages.MESSAGES.invalidAnonymousQName(value);
typeMapping.setAnonymousTypeQName(qname);
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,6 +0,0 @@
-CANNOT_FIND_MAPPING=Cannot find jaxrpc-mapping for type: {0}
-URL_CANNOT_BE_NULL=JAXRPC mapping URL cannot be null
-CANNOT_PARSE=Cannot parse: {0}
-INVALID_ANONYMOUS_QNAME=Invalid anonymous qname: {0}
-WSDLMESSAGEMAPPING_IS_NULL=wsdlMessageMapping is null
-INVALID_PARAMETER_MODE=Invalid parameter mode: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/MethodParamPartsMapping.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -22,10 +22,7 @@
package org.jboss.ws.metadata.jaxrpcmapping;
import java.io.Serializable;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-
/**
* XML mapping of the java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping/method-param-parts-mapping element.
*
@@ -34,7 +31,6 @@
*/
public class MethodParamPartsMapping implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(MethodParamPartsMapping.class);
private static final long serialVersionUID = -1351920471783503813L;
// The parent <service-endpoint-method-mapping> element
@@ -92,8 +88,6 @@
StringBuffer sb = new StringBuffer();
sb.append("<method-param-parts-mapping><param-position>").append(paramPosition).append("</param-position>");
sb.append("<param-type>").append(paramType).append("</param-type>");
- if(wsdlMessageMapping == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "WSDLMESSAGEMAPPING_IS_NULL"));
sb.append(wsdlMessageMapping.serialize());
sb.append("</method-param-parts-mapping>");
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/WsdlMessageMapping.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/WsdlMessageMapping.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/jaxrpcmapping/WsdlMessageMapping.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -22,11 +22,10 @@
package org.jboss.ws.metadata.jaxrpcmapping;
import java.io.Serializable;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* Created by IntelliJ IDEA.
@@ -36,7 +35,6 @@
*/
public class WsdlMessageMapping implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WsdlMessageMapping.class);
private static final long serialVersionUID = -3212852147033081838L;
// The parent <method-param-parts-mapping> element
@@ -68,7 +66,7 @@
public void setParameterMode(String parameterMode)
{
if ("IN".equals(parameterMode) == false && "OUT".equals(parameterMode) == false && "INOUT".equals(parameterMode) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_PARAMETER_MODE", parameterMode));
+ throw NativeMessages.MESSAGES.invalidParameterMode(parameterMode);
this.parameterMode = parameterMode;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointConfigMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointConfigMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointConfigMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -40,9 +39,6 @@
*/
public class EndpointConfigMetaData
{
-
- private static Logger log = Logger.getLogger(EndpointConfigMetaData.class);
-
private final EndpointMetaData epMetaData;
// The optional handlers
private List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
@@ -96,8 +92,6 @@
void configHandlerMetaData()
{
- log.debug("Configure EndpointMetaData");
-
List<HandlerMetaData> sepHandlers = getHandlerMetaData(HandlerType.ENDPOINT);
clearHandlers();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.metadata.umdm;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
@@ -28,15 +30,14 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -59,7 +60,6 @@
*/
public abstract class EndpointMetaData extends ExtensibleMetaData implements InitalizableMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointMetaData.class);
// provide logging
private static Logger log = Logger.getLogger(EndpointMetaData.class);
@@ -85,7 +85,7 @@
// The endpoint interface name
private String seiName;
// The endpoint interface
- private Class seiClass;
+ private Class<?> seiClass;
// The optional authentication method
private String authMethod;
// The SOAPBinding style
@@ -141,7 +141,7 @@
public void setBindingId(String bindingId)
{
if (SUPPORTED_BINDINGS.contains(bindingId) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "UNSUPPORTED_BINDING", bindingId));
+ throw MESSAGES.unsupportedBinding(bindingId);
this.bindingId = bindingId;
}
@@ -160,7 +160,7 @@
if (wsMetaData.isEagerInitialized())
{
if (UnifiedMetaData.isFinalRelease() == false)
- log.warn(BundleUtils.getMessage(bundle, "SET_SEI_NAME_AFTER_EAGER_INIT"));
+ NativeLoggers.ROOT_LOGGER.loadingSettingSEIAfterEagerInit();
// reinitialize
initializeInternal();
@@ -177,9 +177,9 @@
* Load the service endpoint interface.
* It should only be cached during eager initialization.
*/
- public Class getServiceEndpointInterface()
+ public Class<?> getServiceEndpointInterface()
{
- Class tmpClass = seiClass;
+ Class<?> tmpClass = seiClass;
if (tmpClass == null && seiName != null)
{
try
@@ -188,13 +188,13 @@
tmpClass = classLoader.loadClass(seiName);
if (serviceMetaData.getUnifiedMetaData().isEagerInitialized())
{
- log.warn(BundleUtils.getMessage(bundle, "LOADING_SEI_AFTER_EAGER_INIT"));
+ NativeLoggers.ROOT_LOGGER.loadingSettingSEIAfterEagerInit();
seiClass = tmpClass;
}
}
catch (ClassNotFoundException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_SEI", seiName), ex);
+ throw new WSException(ex);
}
}
return tmpClass;
@@ -214,7 +214,7 @@
public void setEncodingStyle(Use value)
{
if (value != null && use != null && !use.equals(value))
- throw new WSException(BundleUtils.getMessage(bundle, "MIXED_STYLES_NOT_SUPPORTED"));
+ throw MESSAGES.conflictingEncodingStyles(value, use);
log.trace("setEncodingStyle: " + value);
this.use = value;
@@ -234,7 +234,7 @@
public void setStyle(Style value)
{
if (value != null && style != null && !style.equals(value))
- throw new WSException(BundleUtils.getMessage(bundle, "MIXED_STYLES_NOT_SUPPORTED"));
+ throw MESSAGES.conflictingEncodingStyles(value, style);
if (log.isTraceEnabled())
log.trace("setStyle: " + value);
@@ -253,7 +253,7 @@
public void setWrappedParameterStyle(final Boolean value)
{
if (value != null && wrappedParameterStyle != null && !wrappedParameterStyle.equals(value))
- throw new WSException(BundleUtils.getMessage(bundle, "MIXED_SOAP_PARAMETER_STYLES_NOT_SUPPORTED"));
+ throw MESSAGES.conflictingSOAPParameterStyles(value, wrappedParameterStyle);
this.wrappedParameterStyle = value;
}
@@ -288,7 +288,7 @@
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_UNIQUELY_INDENTIFY_OP", xmlName));
+ throw MESSAGES.cannotUniquelyIdentifyOp(xmlName);
}
}
}
@@ -315,7 +315,7 @@
}
else
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_UNIQUELY_INDENTIFY_OP", xmlName));
+ throw MESSAGES.cannotUniquelyIdentifyOp(xmlName);
}
}
}
@@ -329,7 +329,6 @@
if (opMetaDataCache.size() == 0)
{
// This can happen when the SEI mapping was not found
- log.warn(BundleUtils.getMessage(bundle, "ACCESS_TO_EMPTY_OP_META_DATA_CACHE"));
initializeInternal();
}
@@ -451,7 +450,7 @@
{
TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
List<TypeMappingMetaData> typeMappings = serviceMetaData.getTypesMetaData().getTypeMappings();
- List<Class> registeredTypes = new ArrayList<Class>(typeMappings.size());
+ List<Class<?>> registeredTypes = new ArrayList<Class<?>>(typeMappings.size());
for (TypeMappingMetaData tmMetaData : typeMappings)
{
String javaTypeName = tmMetaData.getJavaTypeName();
@@ -462,7 +461,7 @@
// TODO: Clarification. In which cases is the type already registered?
boolean registered = false;
- for (Class current : types)
+ for (Class<?> current : types)
{
if (current.getName().equals(javaTypeName))
{
@@ -477,7 +476,7 @@
try
{
ClassLoader classLoader = getClassLoader();
- Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
+ Class<?> javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
if (JavaUtils.isPrimitive(javaTypeName))
javaType = JavaUtils.getWrapperType(javaType);
@@ -495,7 +494,7 @@
}
catch (ClassNotFoundException e)
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_LOAD_CLASS", new Object[]{ xmlType, javaTypeName}));
+ NativeLoggers.ROOT_LOGGER.cannotLoadClassForType(xmlType, javaTypeName, e);
}
}
}
@@ -505,7 +504,7 @@
private void eagerInitializeAccessors()
{
// Collect the list of all used types
- List<Class> types = new ArrayList<Class>();
+ List<Class<?>> types = new ArrayList<Class<?>>();
for (OperationMetaData opMetaData : operations)
{
for (ParameterMetaData paramMetaData : opMetaData.getParameters())
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,17 +21,18 @@
*/
package org.jboss.ws.metadata.umdm;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.JavaUtils;
/**
@@ -43,7 +44,6 @@
*/
public class FaultMetaData implements InitalizableMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(FaultMetaData.class);
// provide logging
private final Logger log = Logger.getLogger(FaultMetaData.class);
@@ -54,16 +54,16 @@
private QName xmlType;
private String javaTypeName;
private String faultBeanName;
- private Class javaType;
- private Class faultBean;
+ private Class<?> javaType;
+ private Class<?> faultBean;
private Method faultInfoMethod;
- private Constructor serviceExceptionConstructor;
+ private Constructor<?> serviceExceptionConstructor;
private Method[] serviceExceptionGetters;
private WrappedParameter[] faultBeanProperties;
- private Class[] propertyTypes;
+ private Class<?>[] propertyTypes;
public FaultMetaData(OperationMetaData operation, QName xmlName, QName xmlType, String javaTypeName)
{
@@ -74,9 +74,9 @@
public FaultMetaData(OperationMetaData operation, QName xmlName, String javaTypeName)
{
if (xmlName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_XMLNAME_ARGUMENT"));
+ throw MESSAGES.illegalNullArgument("xmlName");
if (javaTypeName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_JAVATYPENAME_ARGUMENT", xmlName));
+ throw MESSAGES.illegalNullArgument("javaTypeName");
this.opMetaData = operation;
this.xmlName = xmlName;
@@ -101,7 +101,7 @@
public void setXmlType(QName xmlType)
{
if (xmlType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_XMLTYPE_ARGUMENT", xmlName));
+ throw MESSAGES.illegalNullArgument("xmlType");
this.xmlType = xmlType;
}
@@ -119,7 +119,7 @@
/** Load the java type.
* It should only be cached during eager initialization.
*/
- public Class getJavaType()
+ public Class<?> getJavaType()
{
if (javaType != null)
return javaType;
@@ -130,20 +130,20 @@
try
{
ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- Class exceptionType = JavaUtils.loadJavaType(javaTypeName, loader);
+ Class<?> exceptionType = JavaUtils.loadJavaType(javaTypeName, loader);
if (Exception.class.isAssignableFrom(exceptionType) == false)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "NOT_ASSIGNABLE_TO_EXCEPTION", exceptionType));
+ throw MESSAGES.notAssignableToException(exceptionType);
if (opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
{
- log.warn(BundleUtils.getMessage(bundle, "LOADING_JAVA_TYPE"));
+ NativeLoggers.ROOT_LOGGER.loadingJavaTypeAfterEagerInit();
javaType = exceptionType;
}
return exceptionType;
}
catch (ClassNotFoundException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_JAVA_TYPE", javaTypeName), ex);
+ throw new WSException(ex);
}
}
@@ -184,7 +184,7 @@
}
catch (ClassNotFoundException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_FAULT_BEAN", faultBeanName), ex);
+ throw new WSException(ex);
}
}
return tmpFaultBean;
@@ -200,10 +200,10 @@
// Initialize the cache
javaType = getJavaType();
if (javaType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_JAVA_TYPE", javaTypeName));
+ throw MESSAGES.cannotLoad(javaTypeName);
if (JavaUtils.isAssignableFrom(Exception.class, javaType) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "FAULT_JAVA_TYPE_NOT_EXCEPTION", javaTypeName));
+ throw MESSAGES.notAnException(javaTypeName);
}
public Object toFaultBean(Exception serviceException)
@@ -227,7 +227,7 @@
}
catch (InstantiationException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "FAULT_BEAN_CLASS_IS_NOT_INSTANTIABLE"), e);
+ throw new WSException(e);
}
// copy the properties from the service exception to the fault bean
@@ -270,8 +270,7 @@
else
{
if (serviceExceptionConstructor == null)
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_INSTANTIATE_SERVICE_EXCEPTION",
- new Object[]{ javaType.getSimpleName(), Arrays.toString(propertyTypes)}));
+ throw MESSAGES.couldNotInstanciateServiceException(javaType.getSimpleName(), Arrays.toString(propertyTypes));
// extract the properties from the fault bean
int propertyCount = faultBeanProperties.length;
@@ -287,7 +286,7 @@
}
catch (InstantiationException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "EXCEPTION_IS_NOT_INSTANTIABLE"), e);
+ throw new WSException(e);
}
catch (IllegalAccessException e)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -25,14 +25,12 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
@@ -44,10 +42,6 @@
*/
public abstract class HandlerMetaData implements InitalizableMetaData, Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HandlerMetaData.class);
- // provide logging
- private final Logger log = Logger.getLogger(HandlerMetaData.class);
-
private transient EndpointMetaData epMetaData;
// The required <handler-name> element
@@ -61,7 +55,7 @@
// The optional <init-param> elements
private List<UnifiedInitParamMetaData> initParams = new ArrayList<UnifiedInitParamMetaData>();
// The cached handler class
- private Class handlerClass;
+ private Class<?> handlerClass;
public HandlerMetaData(HandlerType type)
{
@@ -98,12 +92,12 @@
return handlerClassName;
}
- public Class getHandlerClass()
+ public Class<?> getHandlerClass()
{
if (handlerClassName == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "HANDLER_CLASS_NAME_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.handlerClassNameCannotBeNull();
- Class localClass = handlerClass;
+ Class<?> localClass = handlerClass;
if (localClass == null)
{
try
@@ -113,7 +107,7 @@
}
catch (ClassNotFoundException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_HANDLER", handlerClassName), ex);
+ throw new WSException(ex);
}
}
return localClass;
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/Message.properties 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/Message.properties 2012-10-11 14:38:55 UTC (rev 16859)
@@ -1,61 +0,0 @@
-INVALID_NULL_XMLNAME_ARGUMENT=Invalid null xmlName argument
-INVALID_NULL_XMLTYPE=Invalid null xmlType
-SET_JAVA_TYPE_NAME_AFTER_EAGER_INIT=Set java type name after eager initialization
-CANNOT_LOAD_JAVA_TYPE=Cannot load java type: {0}
-INVALID_MODE=Invalid mode: {0}
-INVALID_MIME_TYPE=Invalid mime type: {0}
-WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED=Autogeneration of wrapper beans not supported with JAXRPC
-CLASSLOADER_NOT_AVAILABLE=ClassLoader not available
-AMBIGUOUS_TYPE_MAPPPING=Ambiguous type mappping for: {0}
-CANNOT_OBTAIN_JAVATYPENAME=Cannot obtain javaTypeName for xmlType: {0}
-UNSUPPORTED_BINDING=Unsupported binding: {0}
-SET_SEI_NAME_AFTER_EAGER_INIT=Set SEI name after eager initialization
-LOADING_SEI_AFTER_EAGER_INIT=Loading SEI after eager initialization
-CANNOT_LOAD_SEI=Cannot load service endpoint interface: {0}
-MIXED_STYLES_NOT_SUPPORTED=Mixed encoding styles not supported
-MIXED_SOAP_PARAMETER_STYLES_NOT_SUPPORTED=Mixed SOAP parameter styles not supported
-CANNOT_UNIQUELY_INDENTIFY_OP=Cannot uniquely indentify operation: {0}
-ACCESS_TO_EMPTY_OP_META_DATA_CACHE=Access to empty operation meta data cache, reinitializing
-CANNOT_LOAD_CLASS=Cannot load class for type: {0} {1}
-CONFIG_NAME_CANNOT_BE_NULL=Config name cannot be null
-INVALID_NULL_XMLTYPE=Invalid null xmlType
-INVALID_NULL_JAVATYPENAME=Invalid null javaTypeName
-INVALID_QNAME_SCOPE=Invalid qname scope: {0}
-INVALID_NULL_QNAME_ARGUMENT=Invalid null qname argument
-INVALID_NULL_JAVANAME_ARGUMENT=Invalid null javaName argument, for: {0}
-LOADING_JAVA_METHOD=Loading java method after eager initialization
-CANNOT_FIND_JAVA_METHOD=Cannot find java method: {0}
-ONEWAY_CANNOT_HAVE_RETURN=OneWay operations cannot have a return parameter
-ONEWAY_CANNOT_HAVE_CHECKEDEX=OneWay operations cannot have checked exceptions
-ONEWAY_CANNOT_HAVE_INOUT=OneWay operations cannot have INOUT or OUT parameters
-DOC_LIT_BARE_REQUIRE=The body of a document/literal bare message requires at most 1 input and at most 1 output (or 0 if oneway). method: {0} in: {1} out: {2}
-MULTIPLE_POSSIBLE_ENDPOINTS_IMPLEMENTING_SEI=Multiple possible endpoints implementing SEI: {0}
-ENDPOINTMETADATA_NAME_MUST_BE_UNIQUE=EndpointMetaData name must be unique: {0}
-CANNOT_PARSE_MAPPING=Cannot parse jaxrpc-mapping.xml
-CANNOT_FIND_WSDL=Cannot find wsdl: {0}
-NO_TYPE_MAPPING=No type mapping for encoding style: {0}
-CONFLICTING_ENCODING_STYLES=Conflicting encoding styles not supported
-REQUIRES_A_SECURITY_HANDLER=WS-Security requires a security handler to be configured
-NOT_WSDL_TNS=Requested namespace is not WSDL target namespace: {0}
-INVALID_NULL_XMLNAME_ARGUMENT=Invalid null xmlName argument
-INVALID_NULL_JAVATYPENAME_ARGUMENT=Invalid null javaTypeName argument, for: {0}
-INVALID_NULL_XMLTYPE_ARGUMENT=Invalid null xmlType argument, for: {0}
-NOT_ASSIGNABLE_TO_EXCEPTION=Is not assignable to exception: {0}
-LOADING_JAVA_TYPE=Loading java type after eager initialization
-CANNOT_LOAD_JAVA_TYPE=Cannot load java type: {0}
-CANNOT_LOAD_FAULT_BEAN=Cannot load fault bean: {0}
-FAULT_JAVA_TYPE_NOT_EXCEPTION=Fault java type is not a java.lang.Exception: {0}
-XMLTYPE_MISSING=@XmlType missing from fault bean: {0}
-PROPERTY_NOT_FOUND_IN_BEAN=Property '{0}' not found in fault bean '{1}'
-PROPERTY_NOT_FOUND_IN_EXCEPTION=Property '{0}' not found in service exception '{1}
-FAULT_BEAN_CLASS_IS_NOT_INSTANTIABLE=Fault bean class is not instantiable
-COULD_NOT_INSTANTIATE_SERVICE_EXCEPTION=Could not instantiate service exception ({0}), since neither a faultInfo nor sorted constructor is present: {1}
-EXCEPTION_IS_NOT_INSTANTIABLE=Service exception is not instantiable
-HANDLER_CLASS_NAME_CANNOT_BE_NULL=Handler class name cannot be null
-CANNOT_LOAD_HANDLER=Cannot load handler: {0}
-REQUIRES_SECURITY_CONFIGURATION=WS-Security requires security configuration
-CONTEXT_ROOT_START_WITH=context root should start with '/'
-URL_PATTERN_START_WITH=URL pattern should start with '/'
-ENDPOINT_NOT_AVAILABLE=Endpoint not available
-VFS_ROOT_CANNOT_BE_NULL=VFS root cannot be null
-CLASS_LOADER_NOT_AVAILABLE=Class loader not available
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,19 +21,19 @@
*/
package org.jboss.ws.metadata.umdm;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.soap.utils.Style;
import org.jboss.ws.core.soap.utils.Use;
@@ -48,7 +48,6 @@
*/
public class OperationMetaData extends ExtensibleMetaData implements InitalizableMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(OperationMetaData.class);
// provide logging
private final Logger log = Logger.getLogger(OperationMetaData.class);
@@ -78,9 +77,9 @@
this.javaName = javaName;
if (qname == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_QNAME_ARGUMENT"));
+ throw MESSAGES.illegalNullArgument("qname");
if (javaName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_JAVANAME_ARGUMENT", qname));
+ throw MESSAGES.illegalNullArgument("javaName");
String nsURI = qname.getNamespaceURI();
String localPart = qname.getLocalPart();
@@ -155,7 +154,7 @@
public Method getJavaMethod()
{
Method tmpMethod = javaMethod;
- Class seiClass = epMetaData.getServiceEndpointInterface();
+ Class<?> seiClass = epMetaData.getServiceEndpointInterface();
if (tmpMethod == null && seiClass != null)
{
for (Method method : seiClass.getMethods())
@@ -168,7 +167,7 @@
if (wsMetaData.isEagerInitialized())
{
if (UnifiedMetaData.isFinalRelease() == false)
- log.warn(BundleUtils.getMessage(bundle, "LOADING_JAVA_METHOD"), new IllegalStateException());
+ NativeLoggers.ROOT_LOGGER.loadingJavaMethodAfterEagerInit();
javaMethod = method;
}
@@ -178,7 +177,7 @@
}
if (tmpMethod == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_FIND_JAVA_METHOD", javaName));
+ throw MESSAGES.cannotFindJavaMethod(javaName);
}
return tmpMethod;
}
@@ -388,15 +387,15 @@
if (oneWay)
{
if (returnParam != null)
- throw new WSException(BundleUtils.getMessage(bundle, "ONEWAY_CANNOT_HAVE_RETURN"));
+ throw MESSAGES.onewayOperationCannotHaveReturn();
if (faults.size() > 0)
- throw new WSException(BundleUtils.getMessage(bundle, "ONEWAY_CANNOT_HAVE_CHECKEDEX"));
+ throw MESSAGES.onewayOperationCannotHaveCheckedExc();
for (ParameterMetaData paramMetaData : parameters)
{
if (paramMetaData.getMode() != ParameterMode.IN)
- throw new WSException(BundleUtils.getMessage(bundle, "ONEWAY_CANNOT_HAVE_INOUT"));
+ throw MESSAGES.onewayOperationCannotHaveInOutPars();
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.ResourceBundle;
import java.util.Set;
import java.util.StringTokenizer;
@@ -33,8 +32,9 @@
import javax.xml.rpc.ParameterMode;
import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
@@ -51,7 +51,6 @@
*/
public class ParameterMetaData implements InitalizableMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ParameterMetaData.class);
// provide logging
private final Logger log = Logger.getLogger(ParameterMetaData.class);
@@ -62,7 +61,7 @@
private String partName;
private QName xmlType;
private String javaTypeName;
- private Class javaType;
+ private Class<?> javaType;
private ParameterMode mode;
private Set<String> mimeTypes;
private boolean inHeader;
@@ -91,7 +90,7 @@
public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, String javaTypeName)
{
if (xmlName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_XMLNAME_ARGUMENT"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xmlName");
// Remove the prefixes
if (xmlName.getNamespaceURI().length() > 0)
@@ -104,14 +103,14 @@
this.partName = xmlName.getLocalPart();
}
- private static boolean matchParameter(Method method, int index, Class expectedType, Set<Integer> matches, boolean exact, boolean holder)
+ private static boolean matchParameter(Method method, int index, Class<?> expectedType, Set<Integer> matches, boolean exact, boolean holder)
{
- Class returnType = method.getReturnType();
+ Class<?> returnType = method.getReturnType();
if (index == -1 && matchTypes(returnType, expectedType, exact, false))
return true;
- Class[] classParameters = method.getParameterTypes();
+ Class<?>[] classParameters = method.getParameterTypes();
if (index < 0 || index >= classParameters.length)
return false;
@@ -136,13 +135,13 @@
return false;
}
- private static boolean matchTypes(java.lang.reflect.Type actualType, Class expectedType, boolean exact, boolean holder)
+ private static boolean matchTypes(java.lang.reflect.Type actualType, Class<?> expectedType, boolean exact, boolean holder)
{
if (holder && HolderUtils.isHolderType(actualType) == false)
return false;
java.lang.reflect.Type valueType = (holder ? HolderUtils.getValueType(actualType) : actualType);
- Class valueClass = JavaUtils.erasure(valueType);
+ Class<?> valueClass = JavaUtils.erasure(valueType);
return matchTypesInternal(valueClass, expectedType, exact);
}
@@ -150,20 +149,20 @@
// This duplication is needed because Class does not implement Type in 1.4,
// which makes retrotranslation not possible. This takes advantage of overloading to
// prevent the problem.
- private static boolean matchTypes(Class actualType, Class expectedType, boolean exact, boolean holder)
+ private static boolean matchTypes(Class<?> actualType, Class<?> expectedType, boolean exact, boolean holder)
{
if (holder && HolderUtils.isHolderType(actualType) == false)
return false;
- Class valueClass = (holder ? HolderUtils.getValueType(actualType) : actualType);
+ Class<?> valueClass = (holder ? HolderUtils.getValueType(actualType) : actualType);
return matchTypesInternal(valueClass, expectedType, exact);
}
- private static boolean matchTypesInternal(Class valueClass, Class expectedType, boolean exact)
+ private static boolean matchTypesInternal(Class<?> valueClass, Class<?> expectedType, boolean exact)
{
// FIXME - Why do we need this hack? The method signature should _ALWAYS_ match, else we will get ambiguous or incorrect results
- List<Class> anyTypes = new ArrayList<Class>();
+ List<Class<?>> anyTypes = new ArrayList<Class<?>>();
anyTypes.add(javax.xml.soap.SOAPElement.class);
anyTypes.add(org.w3c.dom.Element.class);
@@ -199,7 +198,7 @@
public void setXmlType(QName xmlType)
{
if (xmlType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_XMLTYPE"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xmlType");
// Remove potential prefix
if (xmlType.getNamespaceURI().length() > 0)
@@ -226,14 +225,14 @@
// Warn if this is called after eager initialization
UnifiedMetaData wsMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
if (wsMetaData.isEagerInitialized() && UnifiedMetaData.isFinalRelease() == false)
- log.warn(BundleUtils.getMessage(bundle, "SET_JAVA_TYPE_NAME_AFTER_EAGER_INIT"), new IllegalStateException());
+ NativeLoggers.ROOT_LOGGER.setJavaTypeAfterEagerInit(typeName);
javaTypeName = typeName;
javaType = null;
}
- public Class loadWrapperBean()
+ public Class<?> loadWrapperBean()
{
- Class wrapperBean = null;
+ Class<?> wrapperBean = null;
try
{
ClassLoader loader = getClassLoader();
@@ -249,9 +248,9 @@
/** Load the java type.
* It should only be cached during eager initialization.
*/
- public Class getJavaType()
+ public Class<?> getJavaType()
{
- Class tmpJavaType = javaType;
+ Class<?> tmpJavaType = javaType;
if (tmpJavaType == null && javaTypeName != null)
{
try
@@ -268,7 +267,7 @@
}
catch (ClassNotFoundException ex)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_JAVA_TYPE", javaTypeName), ex);
+ throw new WSException(ex);
}
}
return tmpJavaType;
@@ -288,7 +287,7 @@
else if ("OUT".equals(mode))
setMode(ParameterMode.OUT);
else
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_MODE", mode));
+ throw NativeMessages.MESSAGES.invalidMode(mode);
}
public void setMode(ParameterMode mode)
@@ -375,7 +374,7 @@
StringBuilder mimeName = new StringBuilder(xmlType.getLocalPart());
int pos = mimeName.indexOf("_");
if (pos == -1)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_MIME_TYPE", xmlType));
+ throw NativeMessages.MESSAGES.invalidMimeType(xmlType);
mimeName.setCharAt(pos, '/');
return mimeName.toString();
@@ -435,20 +434,20 @@
{
if (loadWrapperBean() == null)
{
- throw new WSException(BundleUtils.getMessage(bundle, "WRAPPER_BEANS_AUTOGEN_NOT_SUPPORTED"));
+ throw NativeMessages.MESSAGES.jaxrpcWrapperBeanAutogenNotSupported();
}
}
javaType = getJavaType();
if (javaType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_JAVA_TYPE", javaTypeName));
+ throw NativeMessages.MESSAGES.cannotLoad(javaTypeName);
}
private ClassLoader getClassLoader()
{
ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
if (loader == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CLASSLOADER_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.classloaderNotAvailable();
return loader;
}
@@ -456,7 +455,7 @@
{
ClassLoader loader = getOperationMetaData().getEndpointMetaData().getClassLoader();
List<WrappedParameter> wrappedParameters = getWrappedParameters();
- Class wrapperType = getJavaType();
+ Class<?> wrapperType = getJavaType();
// Standard type
if (wrappedParameters == null)
@@ -469,7 +468,7 @@
try
{
- Class type = (typeName != null) ? JavaUtils.loadJavaType(typeName, loader) : ParameterWrapping.getWrappedType(wrapped.getVariable(), wrapperType);
+ Class<?> type = (typeName != null) ? JavaUtils.loadJavaType(typeName, loader) : ParameterWrapping.getWrappedType(wrapped.getVariable(), wrapperType);
if (type == null)
return false;
if (!matchParameter(method, wrapped.getIndex(), type, matches, exact, wrapped.isHolder()))
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -21,13 +21,10 @@
*/
package org.jboss.ws.metadata.umdm;
-import java.util.ResourceBundle;
-
import javax.management.ObjectName;
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -40,9 +37,6 @@
*/
public class ServerEndpointMetaData extends EndpointMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServerEndpointMetaData.class);
- protected static final Logger log = Logger.getLogger(ServerEndpointMetaData.class);
-
public static final String SEPID_DOMAIN = "jboss.ws";
public static final String SEPID_PROPERTY_CONTEXT = "context";
public static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
@@ -131,7 +125,7 @@
public void setContextRoot(String contextRoot)
{
if (contextRoot != null && !(contextRoot.startsWith("/")))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CONTEXT_ROOT_START_WITH"));
+ throw NativeMessages.MESSAGES.contextRootShouldStartsWith(contextRoot);
this.contextRoot = contextRoot;
}
@@ -144,7 +138,7 @@
public void setURLPattern(String urlPattern)
{
if (urlPattern != null && !urlPattern.startsWith("/"))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "URL_PATTERN_START_WITH"));
+ throw NativeMessages.MESSAGES.urlPatternShouldStartsWith(urlPattern);
this.urlPattern = urlPattern;
}
@@ -179,7 +173,7 @@
public void setEndpointAddress(String endpointAddress)
{
if (endpoint == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.endpointNotAvailable();
endpoint.setAddress(endpointAddress);
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -26,19 +26,17 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import javax.xml.rpc.encoding.TypeMappingRegistry;
-import org.jboss.logging.Logger;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.SchemaBindingBuilder;
@@ -61,10 +59,6 @@
*/
public class ServiceMetaData implements InitalizableMetaData, Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ServiceMetaData.class);
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceMetaData.class);
-
// The parent meta data.
private UnifiedMetaData wsMetaData;
@@ -205,7 +199,7 @@
if (epMetaData != null)
{
// The CTS uses Service.getPort(Class) with multiple endpoints implementing the same SEI
- log.warn(BundleUtils.getMessage(bundle, "MULTIPLE_POSSIBLE_ENDPOINTS_IMPLEMENTING_SEI", seiName));
+ NativeLoggers.ROOT_LOGGER.multiplePossibleEndpointImplementingSEI(seiName);
}
epMetaData = epmd;
}
@@ -220,7 +214,7 @@
// This happends when we have multiple port components in sharing the same wsdl port
// The EndpointMetaData name is the wsdl port, so we cannot have multiple meta data for the same port.
if (endpoints.get(portName) != null)
- throw new WSException(BundleUtils.getMessage(bundle, "ENDPOINTMETADATA_NAME_MUST_BE_UNIQUE", portName));
+ throw NativeMessages.MESSAGES.endpointMetadataMustBeUnique(portName);
endpoints.put(portName, epMetaData);
}
@@ -251,7 +245,7 @@
}
catch (IOException e)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_PARSE_MAPPING"), e);
+ throw new WSException(e);
}
}
}
@@ -308,7 +302,7 @@
}
catch (IOException ex)
{
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_FIND_WSDL", wsdlFile));
+ throw new IllegalStateException(ex);
}
}
}
@@ -320,7 +314,7 @@
Use encStyle = getEncodingStyle();
TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle.toURI());
if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "NO_TYPE_MAPPING", encStyle));
+ throw NativeMessages.MESSAGES.noTypeMapping(encStyle);
return typeMapping;
}
@@ -339,7 +333,7 @@
}
else if (encStyle.equals(epMetaData.getEncodingStyle()) == false)
{
- throw new WSException(BundleUtils.getMessage(bundle, "CONFLICTING_ENCODING_STYLES"));
+ throw NativeMessages.MESSAGES.conflictingEncodingStyles(encStyle, epMetaData.getEncodingStyle());
}
}
}
@@ -403,7 +397,7 @@
public void assertTargetNamespace(String targetNS)
{
if (getServiceName().getNamespaceURI().equals(targetNS) == false)
- throw new WSException(BundleUtils.getMessage(bundle, "NOT_WSDL_TNS", targetNS));
+ throw NativeMessages.MESSAGES.notWsdlTargetNamespace(targetNS);
}
public String toString()
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypeMappingMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypeMappingMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypeMappingMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -23,11 +23,10 @@
import java.util.Arrays;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
@@ -38,7 +37,6 @@
*/
public class TypeMappingMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TypeMappingMetaData.class);
// The parent meta data.
private TypesMetaData typesMetaData;
@@ -55,9 +53,9 @@
public TypeMappingMetaData(TypesMetaData typesMetaData, QName xmlType, String javaTypeName)
{
if (xmlType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_XMLTYPE"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xmlType");
if (javaTypeName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_JAVATYPENAME"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("javaTypeName");
this.typesMetaData = typesMetaData;
this.javaTypeName = javaTypeName;
@@ -88,7 +86,7 @@
public void setQNameScope(String qnameScope)
{
if (allowedScopes.contains(qnameScope) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_QNAME_SCOPE", qnameScope));
+ throw NativeMessages.MESSAGES.invalidQNameScope(qnameScope);
this.qnameScope = qnameScope;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -23,15 +23,14 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
@@ -43,7 +42,6 @@
*/
public class TypesMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(TypesMetaData.class);
// provide logging
private static final Logger log = Logger.getLogger(TypesMetaData.class);
@@ -111,7 +109,7 @@
if (tmMetaData != null)
{
log.error(tmMetaData + "\n" + aux);
- throw new WSException(BundleUtils.getMessage(bundle, "AMBIGUOUS_TYPE_MAPPPING", xmlType));
+ throw NativeMessages.MESSAGES.ambiguousTypeMapping(xmlType);
}
tmMetaData = aux;
}
@@ -162,7 +160,7 @@
}
else
{
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_JAVATYPENAME", xmlType));
+ NativeLoggers.ROOT_LOGGER.cannotObtainJavaTypeName(xmlType);
}
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java 2012-10-11 10:07:17 UTC (rev 16858)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/UnifiedMetaData.java 2012-10-11 14:38:55 UTC (rev 16859)
@@ -25,11 +25,9 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.StringTokenizer;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
@@ -50,10 +48,6 @@
*/
public class UnifiedMetaData implements InitalizableMetaData
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(UnifiedMetaData.class);
- // provide logging
- private static Logger log = Logger.getLogger(UnifiedMetaData.class);
-
// The canonical deployment name
private String deploymentName;
// The modules class loader
@@ -87,7 +81,7 @@
public UnifiedMetaData(UnifiedVirtualFile vfsRoot, ClassLoader classLoader)
{
if (vfsRoot == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "VFS_ROOT_CANNOT_BE_NULL"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("VFS root");
this.vfsRoot = vfsRoot;
this.classLoader = classLoader;
@@ -96,7 +90,7 @@
public ClassLoader getClassLoader()
{
if (classLoader == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CLASS_LOADER_NOT_AVAILABLE"));
+ throw NativeMessages.MESSAGES.classloaderNotAvailable();
return classLoader;
}
@@ -196,7 +190,6 @@
{
if (eagerInitialized == false)
{
- log.debug("Eagerly initialize the meta data model");
for (ServiceMetaData service : services)
{
service.eagerInitialize();
13 years, 3 months
JBossWS SVN: r16858 - in stack/cxf/branches/jbossws-cxf-4.0.x: modules/addons and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 06:07:17 -0400 (Thu, 11 Oct 2012)
New Revision: 16858
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/endorsed/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests/pom.xml
stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml
Log:
prepare for next dev. cycle
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/addons/transports/http/httpserver/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-addons</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/client/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/dist/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/endorsed/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/endorsed/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/endorsed/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/resources/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/server/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-spring-tests/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/shared-tests/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-testsuite</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml 2012-10-11 10:04:19 UTC (rev 16857)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml 2012-10-11 10:07:17 UTC (rev 16858)
@@ -32,7 +32,7 @@
<description>JBossWS CXF stack</description>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -43,9 +43,9 @@
<!-- Source Control Management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf-4....</developerConnection>
- <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/tags/jbossws-cxf-4.0.6.GA</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/cxf/branches/jbossws...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/cxf/branches/jbossws-cx...</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/cxf/branches/jbossws-cxf-4...</url>
</scm>
<!-- Modules -->
13 years, 3 months