JBossWS SVN: r16847 - stack/cxf/branches/jbossws-cxf-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 04:38:31 -0400 (Thu, 11 Oct 2012)
New Revision: 16847
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
Log:
Excluding WS-Security tests recently added to JBossWS CXF trunk
Blocked revisions 16700-16701,16704,16706-16709,16712-16715 via svnmerge
.......
r16700 | alessio.soldano(a)jboss.com | 2012-09-06 18:56:10 +0200 (Thu, 06 Sep 2012) | 2 lines
[JBWS-2710] Adding WS-SecureConversation testcase
.......
r16701 | alessio.soldano(a)jboss.com | 2012-09-07 17:05:43 +0200 (Fri, 07 Sep 2012) | 2 lines
[JBWS-3405] Adding WS-SecurityPolicy Examples 1.0 (2.2.x) testcases
.......
r16704 | alessio.soldano(a)jboss.com | 2012-09-10 14:58:10 +0200 (Mon, 10 Sep 2012) | 2 lines
[JBWS-3405] Adding WS-SecurityPolicy Examples 1.0 (most of 2.1.x) testcases
.......
r16706 | alessio.soldano(a)jboss.com | 2012-09-11 13:47:10 +0200 (Tue, 11 Sep 2012) | 2 lines
[JBWS-3405] Excluding 21x tests on AS 7.1.0 due to missing https configuration
.......
r16707 | alessio.soldano(a)jboss.com | 2012-09-11 17:34:47 +0200 (Tue, 11 Sep 2012) | 2 lines
[JBWS-3405][JBWS-3446] Adding client.keystore and modifying truststore to allow for SSL mutual authentication scenarios (https client auth on server side)
.......
r16708 | alessio.soldano(a)jboss.com | 2012-09-11 18:04:36 +0200 (Tue, 11 Sep 2012) | 2 lines
[JBWS-3405][JBWS-3446] copying files into shared testsuite too
.......
r16709 | alessio.soldano(a)jboss.com | 2012-09-11 18:35:26 +0200 (Tue, 11 Sep 2012) | 2 lines
[JBWS-3405] Adding some WS-SecurityPolicy Examples 1.0 2.3.x testcases (SAML 1.1 Bearer, Sender-Vouches, Holder-of-Key)
.......
r16712 | alessio.soldano(a)jboss.com | 2012-09-12 12:57:03 +0200 (Wed, 12 Sep 2012) | 2 lines
[JBWS-3405] excluding test on AS 7.1.0
.......
r16713 | alessio.soldano(a)jboss.com | 2012-09-12 16:04:33 +0200 (Wed, 12 Sep 2012) | 2 lines
[JBWS-3405] Adding testcases for 2.3.1.4 and 2.3.1.5 scenarios of WS-SecurityPolicy Example 1.0 + minor fixes
.......
r16714 | alessio.soldano(a)jboss.com | 2012-09-12 16:55:23 +0200 (Wed, 12 Sep 2012) | 2 lines
[JBWS-3405] Adding testcases for 2.3.2.1, 2.3.2.2, 2.3.2.3 and 2.3.2.4 scenarios of WS-SecurityPolicy Examples 1.0
.......
r16715 | alessio.soldano(a)jboss.com | 2012-09-12 18:03:29 +0200 (Wed, 12 Sep 2012) | 2 lines
Minor update to comments
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-blocked
- https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
+ https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
13 years, 3 months
JBossWS SVN: r16846 - stack/cxf/branches/jbossws-cxf-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 04:29:48 -0400 (Thu, 11 Oct 2012)
New Revision: 16846
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
Log:
[JBWS-2932] do not backport http auth tests from JBossWS CXF trunk
Blocked revisions 16679-16680,16683-16684,16699 via svnmerge
.......
r16679 | jim.ma | 2012-08-30 04:04:38 +0200 (Thu, 30 Aug 2012) | 1 line
[JBWS-2932]:add http basic auth and digest access test
.......
r16680 | jim.ma | 2012-08-30 09:19:30 +0200 (Thu, 30 Aug 2012) | 1 line
Minor change : modify the test name
.......
r16683 | alessio.soldano(a)jboss.com | 2012-08-30 11:33:06 +0200 (Thu, 30 Aug 2012) | 2 lines
[JBWS-2932] Renaming package http to httpauth
.......
r16684 | alessio.soldano(a)jboss.com | 2012-08-30 11:50:40 +0200 (Thu, 30 Aug 2012) | 2 lines
[JBWS-2932] Adding negative testcases + removing unrequired module dependency to Apache CXF impl
.......
r16699 | alessio.soldano(a)jboss.com | 2012-09-06 11:51:51 +0200 (Thu, 06 Sep 2012) | 2 lines
Minor change to change misleading path name
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-blocked
- https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
+ https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
13 years, 3 months
JBossWS SVN: r16845 - stack/cxf/branches/jbossws-cxf-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 04:25:46 -0400 (Thu, 11 Oct 2012)
New Revision: 16845
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
Log:
[JBWS-3500] do not backport @SchemaValidation test from trunk
Blocked revisions 16625,16685-16687,16695 via svnmerge
.......
r16625 | jim.ma | 2012-08-16 05:27:50 +0200 (Thu, 16 Aug 2012) | 1 line
[JBWS-3500]:Add test to verify if @SchemaValidation works
.......
r16685 | alessio.soldano(a)jboss.com | 2012-08-30 14:24:00 +0200 (Thu, 30 Aug 2012) | 2 lines
[JBWS-3500] Enhaching test
.......
r16686 | alessio.soldano(a)jboss.com | 2012-08-30 15:07:13 +0200 (Thu, 30 Aug 2012) | 2 lines
[JBWS-3500] Adding testcase for client side schema validation
.......
r16687 | alessio.soldano(a)jboss.com | 2012-08-30 18:28:22 +0200 (Thu, 30 Aug 2012) | 2 lines
[JBWS-3529] Adding testcase on using client and endpoint default configurations' properties, e.g. to control default schema validation
.......
r16695 | alessio.soldano(a)jboss.com | 2012-09-04 18:28:07 +0200 (Tue, 04 Sep 2012) | 2 lines
[JBWS-3500] Yet another test, but using client configuration
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-blocked
- https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
+ https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:15645-15648,15650,156...
13 years, 3 months
JBossWS SVN: r16844 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws: metadata/wsdl and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-10-11 04:18:16 -0400 (Thu, 11 Oct 2012)
New Revision: 16844
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/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/metadata/wsdl/Extendable.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLBinding.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLEndpoint.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLFeature.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLProperty.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLService.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/XSModelTypes.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.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 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeLoggers.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -110,4 +110,20 @@
@Message(id = 25063, value = "WSDL parsing, unprocessed extension element: %s")
void unprocessedWSDLExtensionElement(QName el);
+ @LogMessage(level = WARN)
+ @Message(id = 25084, value = "Multiple WSDL bindings reference the same interface: %s")
+ void multipleWSDLBindingRefs(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25085, value = "Multiple binding operations reference: %s")
+ void multipleBindingOperationRefs(QName qname);
+
+ @LogMessage(level = WARN)
+ @Message(id = 25086, value = "Cannot obtain binding operation for ref: %s")
+ void cannotObtainBindingOperationForRef(QName qname);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 25097, value = "Cannot parse XSModel string: %s")
+ void cannotParseXSModelString(String s, @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 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -30,10 +30,13 @@
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xs.XSElementDeclaration;
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
import org.jboss.ws.metadata.wsdl.WSDLException;
+import org.jboss.ws.metadata.wsdl.WSDLTypes;
import org.jboss.wsf.spi.deployment.Deployment;
/**
@@ -202,4 +205,88 @@
@Message(id = 25067, value = "Unsupported WSDL version: %s")
WSException unsupportedWSDLVersion(String version);
+ @Message(id = 25068, value = "Cannot obtain XSTypeDefinition for: %s")
+ WSException cannotObtainXSTypeDef(QName q);
+
+ @Message(id = 25069, value = "Illegal null argument: %s")
+ IllegalArgumentException illegalNullArgument(Object argument);
+
+ @Message(id = 25070, value = "String passed is null")
+ WSException stringPassedIsNull();
+
+ @Message(id = 25071, value = "Illegal null or array arg: %s")
+ IllegalArgumentException illegalNullOrArrayArgument(Class<?> clazz);
+
+ @Message(id = 25072, value = "QName passed is null")
+ IllegalArgumentException qNamePassedIsNull();
+
+ @Message(id = 25073, value = "Formatted String is not of format prefix:localpart: %s")
+ IllegalArgumentException formattedStringNotInFormatPrefixLocalPart(String s);
+
+ @Message(id = 25074, value = "WSDLTypes is not an XSModelTypes: %s")
+ WSException wsdlTypesNotAnXSModelTypes(WSDLTypes wt);
+
+ @Message(id = 25075, value = "Only Request-Only and Request-Response MEPs are allowed, WSDLInterfaceOperation = %s")
+ WSException reqOnlyAndReqResMEPsOnlySupported(QName opName);
+
+ @Message(id = 25076, value = "Illegal property URI: %s")
+ IllegalArgumentException illegalPropertyURI(String uri);
+
+ @Message(id = 25077, value = "Attempt to map multiple operation inputs to: %s")
+ WSException attempToMapMultipleInputs(QName q);
+
+ @Message(id = 25078, value = "Attempt to map multiple operation outputs to: %s")
+ WSException attempToMapMultipleOutputs(QName q);
+
+ @Message(id = 25079, value = "Cannot obtain xmlType for element: %s")
+ WSException cannotObtainXmlType(QName q);
+
+ @Message(id = 25080, value = "Illegal feature URI: %s")
+ IllegalArgumentException illegalFeatureURI(String uri);
+
+ @Message(id = 25081, value = "Cannot obtain the binding: %s")
+ WSException cannotObtainBinding(QName q);
+
+ @Message(id = 25082, value = "Cannot obtain the interface associated with this endpoint: %s")
+ WSException cannotObtainInterface(QName q);
+
+ @Message(id = 25083, value = "The prefix %s cannot be bound to any namespace other than its usual namespace, trying to bind to %s")
+ IllegalArgumentException prefixCannotBeBoundTryingBindingTo(String prefix, String to);
+
+ @Message(id = 25087, value = "Cannot get interface for name: %s")
+ WSException cannotGetInterfaceForName(QName q);
+
+ @Message(id = 25088, value = "Empty union type not expected")
+ WSException emptyUnionTypeNotExpected();
+
+ @Message(id = 25089, value = "Absent variety is not supported in simple types")
+ WSException absentVariety();
+
+ @Message(id = 25090, value = "Expected base type to be a simple type")
+ WSException baseTypeNotSimple();
+
+ @Message(id = 25091, value = "xmlName has a null %s")
+ IllegalArgumentException xmlNameHasNull(String prop);
+
+ @Message(id = 25092, value = "Cannot parse schema: %s")
+ WSException cannotParseSchema(String location);
+
+ @Message(id = 25093, value = "Target Namespace of xsmodel is null")
+ WSException nullTargetNsXSModel();
+
+ @Message(id = 25094, value = "%s is not a global element")
+ IllegalArgumentException notAGlobalElement(XSElementDeclaration el);
+
+ @Message(id = 25095, value = "Type unidentified")
+ WSException typeUnidentified();
+
+ @Message(id = 25096, value = "objectType should be simple type or complex type")
+ IllegalArgumentException objectTypeShouldBeSimpleOrComplex();
+
+ @Message(id = 25098, value = "Parser should stop: %s")
+ XNIException parserShouldStop(String traceMex, @Cause Exception cause);
+
+ @Message(id = 25099, value = "Parser should stop, the key value is %s")
+ XNIException parserShouldStopKeyValueIs(String keyValue, @Cause Exception cause);
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Extendable.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Extendable.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Extendable.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -43,8 +43,8 @@
// provide logging
private Logger log = Logger.getLogger(getClass());
- private Map features = new LinkedHashMap();
- private Map properties = new LinkedHashMap();
+ private Map<String, WSDLFeature> features = new LinkedHashMap<String, WSDLFeature>();
+ private Map<String, WSDLProperty> properties = new LinkedHashMap<String, WSDLProperty>();
private Map<String,List<WSDLExtensibilityElement>> extElements = new LinkedHashMap<String,List<WSDLExtensibilityElement>>();
private List<WSDLExtensibilityElement> notUnderstoodExtElements = new LinkedList<WSDLExtensibilityElement>();
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Message.properties 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/Message.properties 2012-10-11 08:18:16 UTC (rev 16844)
@@ -1,29 +0,0 @@
-CANNOT_GET_INTERFACE=Cannot get interface for name: {0}
-MULTIPLE_BINDING_OP_REFERENCE=Multiple binding operations reference: {0}
-CANNOT_OBTAIN_BINDING_OPERATION=Cannot obtain binding operation for ref: {0}
-
-ILLEGAL_PROPERTY_URI=Illegal property URI: {0}
-
-CANNOT_OBTAIN_XSTYPEDEF=Cannot obtain XSTypeDefinition for: {0}
-CANNOT_OBTAIN_XMLTYPE=Cannot obtain xmlType for element: {0}
-
-MAP_MULTIPLE_INPUTS=Attempt to map multiple operation inputs to: {0}
-MAP_MULTIPLE_OUTPUTS=Attempt to map multiple operation outputs to: {0}
-
-CAN_NOT_BE_BPOUND=The prefix {0} cannot be bound to any namespace other than its usual namespace,trying to bind to {1}
-ILLEGAL_NULL_ARGUMENT:NAMESPACEURI=Illegal Null Argument:namespaceURI
-INVALID_DEFAULT_NAMESPACE=Invalid default namespace: {0}
-MULTIPLE_BINDINGS_REF=Multiple WSDL bindings referrence the same interface: {0}
-
-CANNOT_OBTAIN_BINDING=Cannot obtain the binding: {0}
-CANNOT_OBTAIN_INTF=Cannot obtain the interface associated with this endpoint: {0}
-
-ILLEGAL_FEATURE_URI=Illegal feature URI: {0}
-ILLEGAL_NULL_ARGUMENT=Illegal null argument:{0}
-STRING_PASSED_IS_NULL=String passed is null
-ILLEGAL_NULL_OR_ARRAY_ARG=Illegal null or array arg: {0}
-STRING_PASSED_IS_NULL=String passed to WSDLUtils.getMixedCase is null
-QNAME_PASSED_IS_NULL= QName passed is null
-INVALID_FORMATTED_STRING=Formatted String is not of format prefix:localpart
-NOT_AN_XSMODELTYPES=WSDLTypes is not an XSModelTypes
-ONLY_MEPS_ARE_ALLOWED=Only Request-Only and Request-Response MEPs are allowed
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLBinding.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLBinding.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLBinding.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -23,13 +23,11 @@
import java.io.Serializable;
import java.util.ArrayList;
-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.NativeLoggers;
+import org.jboss.ws.NativeMessages;
/**
* A Binding component describes a concrete message format and transmission protocol which may be used
@@ -42,12 +40,8 @@
*/
public class WSDLBinding extends Extendable implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLBinding.class);
private static final long serialVersionUID = -7699953670233209811L;
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLBinding.class);
-
// The parent WSDL definitions element.
private final WSDLDefinitions wsdlDefinitions;
@@ -91,7 +85,6 @@
public void setInterfaceName(QName interfaceName)
{
- log.trace("setInterfaceName: " + name);
this.interfaceName = interfaceName;
}
@@ -99,7 +92,7 @@
{
WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(interfaceName);
if (wsdlInterface == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_GET_INTERFACE", interfaceName));
+ throw NativeMessages.MESSAGES.cannotGetInterfaceForName(interfaceName);
return wsdlInterface;
}
@@ -140,13 +133,13 @@
if (aux.getRef().equals(qname))
{
if (wsdlBindingOperation != null)
- log.warn(BundleUtils.getMessage(bundle, "MULTIPLE_BINDING_OP_REFERENCE", qname));
+ NativeLoggers.ROOT_LOGGER.multipleBindingOperationRefs(qname);
wsdlBindingOperation = aux;
}
}
if (wsdlBindingOperation == null)
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_BINDING_OPERATION", qname));
+ NativeLoggers.ROOT_LOGGER.cannotObtainBindingOperationForRef(qname);
return wsdlBindingOperation;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLDefinitions.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,19 +21,20 @@
*/
package org.jboss.ws.metadata.wsdl;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.wsdl.Definition;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeLoggers;
import org.jboss.ws.common.Constants;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Document;
@@ -49,7 +50,6 @@
*/
public class WSDLDefinitions extends Extendable implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLDefinitions.class);
private static final long serialVersionUID = 1643422922694990226L;
// provide logging
@@ -123,8 +123,7 @@
}
else if (Constants.PREFIX_XML.equalsIgnoreCase(prefix))
{
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CAN_NOT_BE_BPOUND",
- new Object[]{Constants.PREFIX_XML, nsURI}));
+ throw MESSAGES.prefixCannotBeBoundTryingBindingTo(Constants.PREFIX_XML, nsURI);
}
String pre = namespaces.getPrefix(nsURI);
@@ -161,13 +160,13 @@
}
/** Get an iterator for registered namespace URIs */
- public Iterator getRegisteredNamespaceURIs()
+ public Iterator<String> getRegisteredNamespaceURIs()
{
return namespaces.getRegisteredURIs();
}
/** Get an iterator for registered prefixs */
- public Iterator getRegisteredPrefix()
+ public Iterator<String> getRegisteredPrefix()
{
return namespaces.getRegisteredPrefixes();
}
@@ -180,7 +179,7 @@
public void setTargetNamespace(String namespaceURI)
{
if(namespaceURI == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "namespaceURI"));
+ throw MESSAGES.illegalNullArgument("namespaceURI");
log.trace("setTargetNamespace: " + namespaceURI);
this.targetNamespace = namespaceURI;
@@ -194,7 +193,7 @@
public void setWsdlNamespace(String namespaceURI)
{
if (Constants.NS_WSDL11.equals(namespaceURI) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_DEFAULT_NAMESPACE", namespaceURI));
+ throw MESSAGES.invalidDefaultWSDLNamespace(namespaceURI);
this.wsdlNamespace = namespaceURI;
}
@@ -271,7 +270,7 @@
if (aux.getInterfaceName().equals(qname))
{
if (wsdlBinding != null)
- log.warn(BundleUtils.getMessage(bundle, "MULTIPLE_BINDINGS_REF", qname));
+ NativeLoggers.ROOT_LOGGER.multipleWSDLBindingRefs(qname);
wsdlBinding = aux;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLEndpoint.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLEndpoint.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLEndpoint.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,13 +21,10 @@
*/
package org.jboss.ws.metadata.wsdl;
-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;
/**
* An Endpoint component defines the particulars of a specific endpoint at which a given service is available.
@@ -39,7 +36,6 @@
*/
public class WSDLEndpoint extends Extendable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLEndpoint.class);
private static final long serialVersionUID = 4991302339046047865L;
// provide logging
@@ -85,7 +81,7 @@
{
WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(binding);
if (wsdlBinding == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_BINDING", binding));
+ throw NativeMessages.MESSAGES.cannotObtainBinding(binding);
if (wsdlBinding.getInterfaceName() != null)
{
@@ -95,7 +91,7 @@
}
if (wsdlInterface == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_INTF", name));
+ throw NativeMessages.MESSAGES.cannotObtainInterface(name);
return wsdlInterface;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLFeature.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLFeature.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLFeature.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -22,9 +22,8 @@
package org.jboss.ws.metadata.wsdl;
import java.io.Serializable;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* A feature component describes an abstract piece of functionality typically associated with the exchange of
@@ -39,7 +38,6 @@
*/
public class WSDLFeature implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLFeature.class);
private static final long serialVersionUID = 8096857958254222743L;
/** A REQUIRED uri attribute information item */
@@ -50,7 +48,7 @@
public WSDLFeature(String uri)
{
if (uri == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_FEATURE_URI", uri));
+ throw NativeMessages.MESSAGES.illegalFeatureURI(uri);
this.uri = uri;
}
@@ -58,7 +56,7 @@
public WSDLFeature(String uri, boolean required)
{
if (uri == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_FEATURE_URI", uri));
+ throw NativeMessages.MESSAGES.illegalFeatureURI(uri);
this.uri = uri;
this.required = required;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceMessageReference.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -23,13 +23,11 @@
import java.util.Collection;
import java.util.LinkedHashMap;
-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.Constants;
/**
@@ -43,7 +41,6 @@
*/
public abstract class WSDLInterfaceMessageReference extends Extendable implements Comparable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLInterfaceMessageReference.class);
// provide logging
protected Logger log = Logger.getLogger(getClass());
@@ -87,7 +84,8 @@
public WSDLInterfaceMessageReference(WSDLInterfaceOperation wsdlOperation)
{
- log.trace("New part for wsdlOperation: " + wsdlOperation.getName());
+ if (log.isTraceEnabled())
+ log.trace("New part for wsdlOperation: " + wsdlOperation.getName());
this.wsdlOperation = wsdlOperation;
}
@@ -113,7 +111,8 @@
public void setElement(QName element)
{
- log.trace("setElement: " + element);
+ if (log.isTraceEnabled())
+ log.trace("setElement: " + element);
this.element = element;
}
@@ -145,7 +144,7 @@
}
if (xmlType == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_XMLTYPE", element));
+ throw NativeMessages.MESSAGES.cannotObtainXmlType(element);
return xmlType;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterfaceOperation.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -25,12 +25,10 @@
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
@@ -47,7 +45,6 @@
*/
public class WSDLInterfaceOperation extends Extendable implements Comparable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLInterfaceOperation.class);
private static final long serialVersionUID = -5014918078197942626L;
// The parent interface
@@ -145,7 +142,7 @@
{
QName xmlName = input.getElement();
if (inputs.get(xmlName) != null)
- throw new WSException(BundleUtils.getMessage(bundle, "MAP_MULTIPLE_INPUTS", xmlName));
+ throw NativeMessages.MESSAGES.attempToMapMultipleInputs(xmlName);
inputs.put(xmlName, input);
}
@@ -183,7 +180,7 @@
{
QName xmlName = output.getElement();
if (outputs.get(xmlName) != null)
- throw new WSException(BundleUtils.getMessage(bundle, "MAP_MULTIPLE_OUTPUTS", xmlName));
+ throw NativeMessages.MESSAGES.attempToMapMultipleOutputs(xmlName);
outputs.put(xmlName, output);
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLProperty.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLProperty.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLProperty.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -22,11 +22,10 @@
package org.jboss.ws.metadata.wsdl;
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;
/**
* A "property" in the Features and Properties architecture represents a named runtime value which affects
@@ -42,7 +41,6 @@
*/
public class WSDLProperty implements Serializable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLProperty.class);
private static final long serialVersionUID = -7528676719881753461L;
/** A REQUIRED uri attribute information item */
@@ -56,30 +54,19 @@
* #value if the {value} property is not empty.*/
private QName constraint;
- private QName qnameValue;
-
public WSDLProperty(String uri, String value)
{
if (uri == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_PROPERTY_URI", uri));
+ throw NativeMessages.MESSAGES.illegalPropertyURI(uri);
this.uri = uri;
this.value = value;
}
- public WSDLProperty(String uri, QName value)
- {
- if (uri == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_PROPERTY_URI", uri));
-
- this.uri = uri;
- this.qnameValue = value;
- }
-
public WSDLProperty(String uri, boolean required, String value, QName constraint)
{
if (uri == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_PROPERTY_URI", uri));
+ throw NativeMessages.MESSAGES.illegalPropertyURI(uri);
this.uri = uri;
this.required = required;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLService.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLService.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLService.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -26,8 +26,6 @@
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-
/**
* A Service component describes a set of endpoints (see 2.14 Endpoint [p.62] ) at which a particular
* deployed implementation of the service is provided. The endpoints thus are in effect alternate places at
@@ -41,9 +39,6 @@
{
private static final long serialVersionUID = 1274166611190648479L;
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLService.class);
-
// The parent WSDL definitions element.
private final WSDLDefinitions wsdlDefinitions;
@@ -97,7 +92,7 @@
*/
public WSDLEndpoint getEndpoint(QName portName)
{
- Iterator it = endpoints.iterator();
+ Iterator<WSDLEndpoint> it = endpoints.iterator();
while (it.hasNext())
{
WSDLEndpoint wsdlEndpoint = (WSDLEndpoint)it.next();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLTypes.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -25,8 +25,6 @@
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-
/**
* WSDL types.
*
@@ -38,9 +36,6 @@
{
private static final long serialVersionUID = 7919937323521372194L;
- // provide logging
- static private final Logger log = Logger.getLogger(WSDLTypes.class);
-
private WSDLDefinitions wsdlDefinitions;
private String namespace;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLUtils.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,6 +21,8 @@
*/
package org.jboss.ws.metadata.wsdl;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
@@ -35,7 +37,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Stack;
import java.util.StringTokenizer;
@@ -67,7 +68,6 @@
import org.apache.xerces.xs.XSComplexTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
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;
@@ -84,18 +84,17 @@
public class WSDLUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLUtils.class);
private String newline = "\n";
private static WSDLUtils instance = new WSDLUtils();
- private List wrapperlist = null;
- private List primlist = null;
+ private List<String> wrapperlist = null;
+ private List<String> primlist = null;
- private final Map primitiveMap = new HashMap();
+ private final Map<String, String> primitiveMap = new HashMap<String, String>();
- private final static Map<String, Class> schemaBasicTypes = new HashMap<String, Class>();
- private final static Map<Class, Class> holderTypes = new HashMap<Class, Class>();
- private final static Map<Class, Class> reverseHolderTypes = new HashMap<Class, Class>();
+ private final static Map<String, Class<?>> schemaBasicTypes = new HashMap<String, Class<?>>();
+ private final static Map<Class<?>, Class<?>> holderTypes = new HashMap<Class<?>, Class<?>>();
+ private final static Map<Class<?>, Class<?>> reverseHolderTypes = new HashMap<Class<?>, Class<?>>();
// Skip these methods when generating wsdl operations
private List<String> ignoredMethods;
@@ -236,10 +235,10 @@
* @param cls
* @return true if class belongs to java.* or javax.* package
*/
- public boolean checkIgnoreClass(Class cls)
+ public boolean checkIgnoreClass(Class<?> cls)
{
if (cls == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "cls"));
+ throw MESSAGES.illegalNullArgument("cls");
//if (cls.isArray()) cls = cls.getComponentType();
if (!cls.isArray())
{
@@ -308,9 +307,9 @@
public File createPackage(String path, String packageName)
{
if (packageName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "packageName"));
+ throw MESSAGES.illegalNullArgument("packageName");
if (path == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "path"));
+ throw MESSAGES.illegalNullArgument("path");
String pac = packageName.replace('.', '/');
File dir = new File(path + "/" + pac);
dir.mkdirs();
@@ -327,9 +326,9 @@
public File createPhysicalFile(File loc, String fname) throws IOException
{
if (loc == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "loc"));
+ throw MESSAGES.illegalNullArgument("loc");
if (fname == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "fname"));
+ throw MESSAGES.illegalNullArgument("fname");
File javaFile = new File(loc.getAbsolutePath() + "/" + fname + ".java");
//Delete the javaFile if already exists
if (javaFile.exists())
@@ -348,7 +347,7 @@
* @param importList Strings representing imports
* @return
*/
- public StringBuilder createClassBasicStructure(String pkgname, String fname, XSTypeDefinition type, List importList, String baseName)
+ public StringBuilder createClassBasicStructure(String pkgname, String fname, XSTypeDefinition type, List<?> importList, String baseName)
{
StringBuilder buf = new StringBuilder();
writeJbossHeader(buf);
@@ -358,7 +357,7 @@
buf.append(newline);
if (importList != null)
{
- Iterator iter = importList.iterator();
+ Iterator<?> iter = importList.iterator();
while (iter.hasNext())
{
buf.append("import " + (String)iter.next() + ";");
@@ -402,7 +401,7 @@
* @param name Field name to check
* @return true - if public field exists, false-otherwise
*/
- public boolean doesPublicFieldExist(Class javaType, String name)
+ public boolean doesPublicFieldExist(Class<?> javaType, String name)
{
Field fld = null;
try
@@ -431,7 +430,7 @@
public String firstLetterUpperCase(String fname)
{
if (fname == null || fname.length() == 0)
- throw new WSException(BundleUtils.getMessage(bundle, "STRING_PASSED_IS_NULL"));
+ throw MESSAGES.stringPassedIsNull();
//Ensure that the first character is uppercase
final char firstChar = fname.charAt(0);
if (Character.isLowerCase(firstChar))
@@ -448,10 +447,10 @@
* @param arr
* @return dimension of an array
*/
- public int getArrayDimension(Class arr)
+ public int getArrayDimension(Class<?> arr)
{
if (arr == null || arr.isArray() == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_OR_ARRAY_ARG", arr));
+ throw MESSAGES.illegalNullOrArrayArgument(arr);
int counter = 0;
while (arr.isArray())
{
@@ -467,7 +466,7 @@
* @param cls
* @return Jaxrpc Holder object if exists
*/
- public Class getHolder(Class cls)
+ public Class<?> getHolder(Class<?> cls)
{
return holderTypes.get(cls);
}
@@ -478,7 +477,7 @@
* @param cls The jaxrpc holder type
* @return Jaxrpc Holder object if exists
*/
- public Class getJavaTypeForHolder(Class cls)
+ public Class<?> getJavaTypeForHolder(Class<?> cls)
{
if (Holder.class.isAssignableFrom(cls))
return HolderUtils.getValueType(cls);
@@ -493,7 +492,7 @@
* @return
*/
- public String getMessagePartForArray(Class javaType)
+ public String getMessagePartForArray(Class<?> javaType)
{
StringBuilder sb = new StringBuilder();
while (javaType.isArray())
@@ -513,13 +512,13 @@
* @return just the classname
*/
- public static String getJustClassName(Class cls)
+ public static String getJustClassName(Class<?> cls)
{
if (cls == null)
return null;
if (cls.isArray())
{
- Class c = cls.getComponentType();
+ Class<?> c = cls.getComponentType();
return getJustClassName(c.getName());
}
@@ -545,9 +544,9 @@
* From the list of fields defined by this class (not superclasses)
* get the fields that are relevant (public)
*/
- public Field[] getPublicFields(Class cls)
+ public Field[] getPublicFields(Class<?> cls)
{
- ArrayList list = new ArrayList();
+ ArrayList<Field> list = new ArrayList<Field>();
Field[] fld = cls.getDeclaredFields();
for (int i = 0; i < fld.length; i++)
@@ -573,7 +572,7 @@
*/
public Method[] getPublicProtectedMethods(Method[] methods)
{
- ArrayList list = new ArrayList();
+ ArrayList<Method> list = new ArrayList<Method>();
int len = methods.length;
for (int i = 0; i < len; i++)
@@ -596,12 +595,12 @@
* @param xmlType
* @return
*/
- public Class getJavaType(QName xmlType)
+ public Class<?> getJavaType(QName xmlType)
{
if (xmlType == null)
return null;
String localPart = xmlType.getLocalPart();
- return (Class)schemaBasicTypes.get(localPart);
+ return schemaBasicTypes.get(localPart);
}
/**
@@ -612,7 +611,7 @@
public String getMixedCase(String str)
{
if (str == null || str.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "STRING_PASSED_IS_NULL"));
+ throw MESSAGES.stringPassedIsNull();
if (str.length() == 1)
return str.toUpperCase();
@@ -629,7 +628,7 @@
public String getFormattedString(QName qn)
{
if (qn == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "QNAME_PASSED_IS_NULL"));
+ throw MESSAGES.qNamePassedIsNull();
StringBuilder sb = new StringBuilder();
String prefix = qn.getPrefix();
String localpart = qn.getLocalPart();
@@ -651,7 +650,7 @@
QName qn = null;
int ind = formattedStr.lastIndexOf(':');
if (ind < 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_FORMATTED_STRING"));
+ throw MESSAGES.formattedStringNotInFormatPrefixLocalPart(formattedStr);
String prefix = formattedStr.substring(0, ind);
String nsuri = null;
if (Constants.PREFIX_XSD.equals(prefix))
@@ -683,7 +682,7 @@
return pkgname;
}
- public static String getTypeNamespace(Class javaType)
+ public static String getTypeNamespace(Class<?> javaType)
{
return getTypeNamespace(JavaUtils.getPackageName(javaType));
}
@@ -741,13 +740,13 @@
if (types instanceof XSModelTypes)
return ((XSModelTypes)types).getSchemaModel();
- throw new WSException(BundleUtils.getMessage(bundle, "NOT_AN_XSMODELTYPES"));
+ throw MESSAGES.wsdlTypesNotAnXSModelTypes(types);
}
public static void addSchemaModel(WSDLTypes types, String namespace, JBossXSModel model)
{
if (!(types instanceof XSModelTypes))
- throw new WSException(BundleUtils.getMessage(bundle, "NOT_AN_XSMODELTYPESs"));
+ throw MESSAGES.wsdlTypesNotAnXSModelTypes(types);
XSModelTypes modelTypes = (XSModelTypes)types;
modelTypes.addSchemaModel(namespace, model);
@@ -759,7 +758,7 @@
* @param cls a Class object
* @return true: A Standard jaxrpc holder
*/
- public boolean isStandardHolder(Class cls)
+ public boolean isStandardHolder(Class<?> cls)
{
if (Holder.class.isAssignableFrom(cls) == false)
return false; //Not even a holder
@@ -846,7 +845,7 @@
return outputs[0];
}
- throw new WSException(BundleUtils.getMessage(bundle, "ONLY_MEPS_ARE_ALLOWED"));
+ throw MESSAGES.reqOnlyAndReqResMEPsOnlySupported(operation.getName());
}
public static WSDLInterfaceOperationInput getWsdl11Input(WSDLInterfaceOperation operation)
@@ -863,6 +862,6 @@
return inputs[0];
}
- throw new WSException(BundleUtils.getMessage(bundle, "ONLY_MEPS_ARE_ALLOWED"));
+ throw MESSAGES.reqOnlyAndReqResMEPsOnlySupported(operation.getName());
}
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/XSModelTypes.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/XSModelTypes.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/XSModelTypes.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,15 +21,11 @@
*/
package org.jboss.ws.metadata.wsdl;
-import java.util.ResourceBundle;
-
import javax.xml.namespace.QName;
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.NativeMessages;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
/**
@@ -39,9 +35,6 @@
*/
public class XSModelTypes extends WSDLTypes
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(XSModelTypes.class);
- private static final Logger log = Logger.getLogger(XSModelTypes.class);
-
private JBossXSModel schemaModel;
public XSModelTypes()
@@ -62,7 +55,6 @@
{
if(nsURI == null)
{
- log.trace("nsURI passed to addSchemaModel is null. Replacing Schema Model");
schemaModel = schema;
}
else
@@ -90,7 +82,7 @@
{
XSTypeDefinition xstype = xsel.getTypeDefinition();
if (xstype == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_XSTYPEDEF", xmlName));
+ throw NativeMessages.MESSAGES.cannotObtainXSTypeDef(xmlName);
if (xstype.getAnonymous() == false)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -46,8 +46,6 @@
private XSParticle xspart;
private XSObjectList annots;
- private String prefix;
-
private List<XSAttributeUse> attList = new ArrayList<XSAttributeUse>();
//Content Type
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
-import java.util.ResourceBundle;
-
import org.apache.xerces.xs.ShortList;
import org.apache.xerces.xs.XSAnnotation;
import org.apache.xerces.xs.XSComplexTypeDefinition;
@@ -32,7 +30,7 @@
import org.apache.xerces.xs.XSNamedMap;
import org.apache.xerces.xs.XSObjectList;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* Represents an XS Element Declaration
@@ -41,7 +39,6 @@
*/
public class JBossXSElementDeclaration extends JBossXSObject implements XSElementDeclaration
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXSElementDeclaration.class);
protected String targetNamespace = null;
protected JBossXSTypeDefinition xstype = null;
protected boolean nillable = false;
@@ -77,7 +74,7 @@
public JBossXSElementDeclaration(XSElementDeclaration xe)
{
if (xe == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT","xe"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xe");
xsed = xe;
name = xe.getName();
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -68,7 +68,9 @@
*/
public XMLInputSource resolveEntity(XMLResourceIdentifier resId) throws XNIException, IOException
{
- log.trace("Resolve entity: " + resId);
+ final boolean trace = log.isTraceEnabled();
+ if (trace)
+ log.trace("Resolve entity: " + resId);
// First try the JBossEntityResolver
String publicId = resId.getPublicId();
@@ -86,7 +88,8 @@
}
catch (Exception ex)
{
- log.trace(ex);
+ if (trace)
+ log.trace(ex);
}
try
@@ -94,26 +97,30 @@
String expandedSysId = resId.getExpandedSystemId();
if (expandedSysId != null)
{
- log.trace("Use ExpandedSystemId: " + expandedSysId);
+ if (trace)
+ log.trace("Use ExpandedSystemId: " + expandedSysId);
return getXMLInputSource(new URL(expandedSysId), resId);
}
}
catch (IOException e)
{
- log.trace(e);
+ if (trace)
+ log.trace(e);
}
try
{
if (systemId != null)
{
- log.trace("Use LiteralSystemId: " + systemId);
+ if (trace)
+ log.trace("Use LiteralSystemId: " + systemId);
return getXMLInputSource(new URL(systemId), resId);
}
}
catch (IOException e)
{
- log.trace(e);
+ if (trace)
+ log.trace(e);
}
// in case of a DOCTYPE declaration ew refer to systemId
@@ -128,7 +135,8 @@
URL url = schemaLocationByNamespace.get(namespaceURI);
if (url != null)
{
- log.trace("Use SchemaLocationByNamespace: " + url);
+ if (trace)
+ log.trace("Use SchemaLocationByNamespace: " + url);
return getXMLInputSource(url, resId);
}
@@ -139,20 +147,24 @@
}
catch (SAXException e)
{
- log.trace(e);
+ if (trace)
+ log.trace(e);
}
try
{
- log.trace("Use NamespaceURI: " + namespaceURI);
+ if (trace)
+ log.trace("Use NamespaceURI: " + namespaceURI);
return getXMLInputSource(new URL(namespaceURI), resId);
}
catch (IOException e)
{
- log.trace(e);
+ if (trace)
+ log.trace(e);
}
- log.trace("Cannot obtain XMLInputSource for: " + resId);
+ if (trace)
+ log.trace("Cannot obtain XMLInputSource for: " + resId);
return null;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,13 +21,11 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
-import java.util.ResourceBundle;
-
import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.parser.XMLErrorHandler;
import org.apache.xerces.xni.parser.XMLParseException;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* Error Handler for the Xerces schema parser default implementation
@@ -36,7 +34,6 @@
*/
public class JBossXSErrorHandler implements XMLErrorHandler
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXSErrorHandler.class);
private static final Logger log = Logger.getLogger(JBossXSErrorHandler.class);
/**
@@ -61,7 +58,7 @@
public void error(String domain, String key, XMLParseException xexp) throws XNIException
{
if ("src-include.2.1".equals(key))
- throw new XNIException(BundleUtils.getMessage(bundle, "PARSER_SHOULD_STOP", "the key value is src-include.2.1"), xexp);
+ throw NativeMessages.MESSAGES.parserShouldStopKeyValueIs("src-include.2.1", xexp);
String errorMsg = getFormattedString(domain, key, xexp);
log.error(errorMsg);
@@ -79,7 +76,7 @@
{
String errorMsg = getFormattedString(domain, key, xexp);
log.error(errorMsg);
- throw new XNIException(BundleUtils.getMessage(bundle, "PARSER_SHOULD_STOP", errorMsg), xexp);
+ throw NativeMessages.MESSAGES.parserShouldStop(errorMsg, xexp);
}
/**
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -32,7 +32,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.Set;
import org.apache.xerces.xs.StringList;
@@ -55,8 +54,8 @@
import org.apache.xerces.xs.XSTerm;
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.DOMWriter;
@@ -72,10 +71,8 @@
public class JBossXSModel implements XSModel, Cloneable
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXSModel.class);
// provide logging
private static final Logger log = Logger.getLogger(JBossXSModel.class);
-
private AnonymousMapper anonymousMapper = new AnonymousMapper();
private boolean qualifiedElements = false;
@@ -315,7 +312,7 @@
}
else
{
- log.trace("Cannot assign XSAnnotation to null namespace");
+ Logger.getLogger(JBossXSModel.class).trace("Cannot assign XSAnnotation to null namespace");
}
}
@@ -331,8 +328,6 @@
{
//Add type to the namespace item
String ns = xst.getNamespace();
- if (ns == null)
- throw new WSException(BundleUtils.getMessage(bundle, "ILLEGAL_NAMESPACE"));
JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
jbnm.addXSTypeDefinition(xst);
@@ -453,7 +448,7 @@
}
catch (IOException e)
{
- log.error(BundleUtils.getMessage(bundle, "CANNOT_PARSE_XSMODEL", xsModelString), e);
+ NativeLoggers.ROOT_LOGGER.cannotParseXSModelString(xsModelString, e);
}
}
@@ -510,7 +505,7 @@
private JBossXSNamespaceItem createNamespaceItemIfNotExistent(String ns)
{
if (ns == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "ns"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("ns");
JBossXSNamespaceItem jbnm = nsimap.get(ns);
if (jbnm == null)
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -28,7 +28,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.TreeSet;
import org.apache.xerces.xs.StringList;
@@ -45,8 +44,7 @@
import org.apache.xerces.xs.XSObjectList;
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
-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.xb.binding.NamespaceRegistry;
@@ -57,10 +55,6 @@
*/
public class JBossXSNamespaceItem implements XSNamespaceItem
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXSNamespaceItem.class);
- // provide logging
- private static final Logger log = Logger.getLogger(JBossXSNamespaceItem.class);
-
private String schemaNamespace = null;
private List<String> docLocations = null;
@@ -258,7 +252,7 @@
public void addXSAnnotation(XSAnnotation xa)
{
if(xa == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xa"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xa");
anns.put(xa.getName(),xa);
}
@@ -268,7 +262,7 @@
public void addXSAttributeDeclaration(XSAttributeDeclaration att)
{
if(att == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "att"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("att");
attrs.put(att.getName(),att);
}
@@ -279,7 +273,7 @@
public void addXSElementDeclaration(XSElementDeclaration el)
{
if(el == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "el"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("el");
elements.put(el.getName(),el);
}
@@ -290,10 +284,9 @@
public void addXSTypeDefinition(XSTypeDefinition xsType)
{
if(xsType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsType"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xsType");
String xsTypeName = xsType.getName();
- log.trace("addXSTypeDefinition: " + xsTypeName);
types.put(xsTypeName,xsType);
}
@@ -458,7 +451,7 @@
private Collection getTypes(Collection col, short objectType)
{
if(objectType != XSTypeDefinition.SIMPLE_TYPE && objectType != XSTypeDefinition.COMPLEX_TYPE)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "OBJECTTYPE_SHOULD_BE_SIMPLE_TYPE_OR_COMPLEX_TYPE"));
+ throw NativeMessages.MESSAGES.objectTypeShouldBeSimpleOrComplex();
Collection values = new ArrayList();
for(Object obj : col)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,11 +21,8 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
-import java.util.ResourceBundle;
-
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
/**
* @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
@@ -33,7 +30,6 @@
*/
public class JBossXSTypeDefinition extends JBossXSObject implements XSTypeDefinition
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JBossXSTypeDefinition.class);
private static final long serialVersionUID = -3317350531846406564L;
protected boolean anonymous = false;
@@ -74,7 +70,7 @@
*/
public short getTypeCategory()
{
- throw new WSException(BundleUtils.getMessage(bundle, "TYPE_UNIDENTIFIED"));
+ throw NativeMessages.MESSAGES.typeUnidentified();
}
/**
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/Message.properties 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/Message.properties 2012-10-11 08:18:16 UTC (rev 16844)
@@ -1,8 +0,0 @@
-TYPE_UNIDENTIFIED=Type unidentified
-OBJECTTYPE_SHOULD_BE_SIMPLE_TYPE_OR_COMPLEX_TYPE=objectType should be simple type or complex type
-ILLEGAL_NAMESPACE=Illegal namespace
-TARGETNAMESPACE_CANNOT_BE=targetNamespace cannot be {0}
-NOT_A_GLOBAL_ELEMENT=Element is not a global element
-ILLEGAL_NULL_ARGUMENT=Illegal Null Argument:{0}
-PARSER_SHOULD_STOP=Parser should stop: {0}
-CANNOT_PARSE_XSMODEL=Cannot parse xsModelString: {0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/WSSchemaUtils.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,11 +21,12 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.IOException;
import java.io.Writer;
import java.util.Arrays;
import java.util.List;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -46,8 +47,6 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
@@ -61,7 +60,6 @@
public class WSSchemaUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSSchemaUtils.class);
private static final String xsNS = Constants.NS_SCHEMA_XSD;
private static SchemaUtils utils = SchemaUtils.getInstance();
@@ -93,9 +91,9 @@
List<String> knownNamespaces = Arrays.asList(nsarr);
boolean isCustom = false;
if (xsNS.equals(targetNS))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsNS"));
+ throw MESSAGES.illegalNullArgument("xsNS");
if (checkNS == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "checkNS"));
+ throw MESSAGES.illegalNullArgument("checkNS");
if (knownNamespaces.contains(checkNS) == false && targetNS.equals(checkNS) == false)
isCustom = true;
return isCustom;
@@ -246,7 +244,7 @@
if (xsmodel == null)
return true;
if (namespace == null)
- throw new WSException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "Target Namespace of xsmodel"));
+ throw MESSAGES.illegalNullArgument("Target Namespace of xsmodel");
XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION, namespace);
XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, namespace);
@@ -314,7 +312,7 @@
{
XSTypeDefinition xst = xsel.getTypeDefinition();
if (xst == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "Type xst"));
+ throw MESSAGES.illegalNullArgument("Type xst");
boolean isGlobalRef = (xsel.getScope() == XSConstants.SCOPE_GLOBAL);
boolean isAnonType = xst.getAnonymous();
@@ -370,7 +368,7 @@
{
XSTypeDefinition xst = decl.getTypeDefinition();
if (xst == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "Type xst"));
+ throw MESSAGES.illegalNullArgument("Type xst");
boolean isGlobalRef = (decl.getScope() == XSConstants.SCOPE_GLOBAL);
boolean isAnonType = xst.getAnonymous();
@@ -418,7 +416,7 @@
{
boolean isAnonType = false;
if (XSConstants.SCOPE_GLOBAL != xsel.getScope())
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NOT_A_GLOBAL_ELEMENT"));
+ throw MESSAGES.notAGlobalElement(xsel);
StringBuilder buf = new StringBuilder();
String elname = xsel.getName();
@@ -695,9 +693,9 @@
public void copyXSModel(XSModel xsmodel, JBossXSModel jb)
{
if (xsmodel == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsmodel"));
+ throw MESSAGES.illegalNullArgument("xsmodel");
if (jb == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "jb"));
+ throw MESSAGES.illegalNullArgument("jb");
//Copy all the Namespace Items
jb.setXSNamespaceItemList(xsmodel.getNamespaceItems());
//Copy all the elements
@@ -744,10 +742,10 @@
private String getPrefix(String namespace)
{
if (namespaceRegistry == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", namespaceRegistry));
+ throw MESSAGES.illegalNullArgument(namespaceRegistry);
if (namespace == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "namespace"));
+ throw MESSAGES.illegalNullArgument("namespace");
// XML Namespace can only legally be assigned the XML prefix
if (namespace.equals(Constants.NS_XML))
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/Message.properties 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/Message.properties 2012-10-11 08:18:16 UTC (rev 16844)
@@ -1,8 +0,0 @@
-EMPTY_UNION_TYPE=Empty union type not expected
-ABSENT_VARIETY=Absent variety is not supported in simple types
-BASE_TYPE_NOT_SIMPLE=Expected base type to be a simple type
-XMLNAME_HAS_NULL=xmlName has a null {0}
-CANNOT_PARSE_SCHEMA=Cannot parse schema: {0}
-TARGET_NAMESPACE_OF_XSMODEL_IS_NULL=Target Namespace of xsmodel is null
-INVALID_NULL_TNS=Invalid null target namespace
-ILLEGAL_NULL_ARGUMENT=Illegal Null Argument:{0}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -21,13 +21,14 @@
*/
package org.jboss.ws.metadata.wsdl.xsd;
+import static org.jboss.ws.NativeMessages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
import javax.xml.namespace.QName;
@@ -49,8 +50,6 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
@@ -70,12 +69,11 @@
*/
public class SchemaUtils
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(SchemaUtils.class);
private static SchemaUtils ourInstance = new SchemaUtils();
protected static final String xsNS = Constants.NS_SCHEMA_XSD;
- private static Map<Class, QName> toolsTypeMappingOverride = new HashMap<Class, QName>();
+ private static Map<Class<?>, QName> toolsTypeMappingOverride = new HashMap<Class<?>, QName>();
static
{
@@ -147,7 +145,7 @@
public static QName handleSimpleType(XSSimpleTypeDefinition simple)
{
if (simple == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "XSSimpleTypeDefinition"));
+ throw MESSAGES.illegalNullArgument("XSSimpleTypeDefinition");
//Check if the type of SimpleType is a plain xsd type
if (Constants.NS_SCHEMA_XSD.equals(simple.getNamespace()))
@@ -161,9 +159,9 @@
XSObjectList list = simple.getMemberTypes();
if (list.getLength() > 0)
return handleSimpleType((XSSimpleTypeDefinition)list.item(0));
- throw new WSException(BundleUtils.getMessage(bundle, "EMPTY_UNION_TYPE"));
+ throw MESSAGES.emptyUnionTypeNotExpected();
case XSSimpleTypeDefinition.VARIETY_ABSENT:
- throw new WSException(BundleUtils.getMessage(bundle, "ABSENT_VARIETY"));
+ throw MESSAGES.absentVariety();
}
XSTypeDefinition base = simple.getBaseType();
@@ -171,7 +169,7 @@
base = base.getBaseType();
if (!(base instanceof XSSimpleTypeDefinition))
- throw new WSException(BundleUtils.getMessage(bundle, "BASE_TYPE_NOT_SIMPLE"));
+ throw MESSAGES.baseTypeNotSimple();
return new QName(base.getNamespace(), base.getName());
}
@@ -239,16 +237,16 @@
public boolean hasGlobalElement(QName xmlName, XSModel xsmodel)
{
if (xmlName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xmlName"));
+ throw MESSAGES.illegalNullArgument("xmlName");
if (xsmodel == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsmodel"));
+ throw MESSAGES.illegalNullArgument("xsmodel");
boolean bool = false;
String name = xmlName.getLocalPart();
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL", "name"));
+ throw MESSAGES.xmlNameHasNull("name");
String ns = xmlName.getNamespaceURI();
if (ns == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL", "namespace"));
+ throw MESSAGES.xmlNameHasNull("namespace");
if (xsmodel.getElementDeclaration(name, ns) != null)
bool = true;
return bool;
@@ -263,7 +261,7 @@
public boolean hasComplexTypeDefinition(QName xmlType, URL xsdLocation)
{
if (xsdLocation == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsdLocation"));
+ throw MESSAGES.illegalNullArgument("xsdLocation");
XSModel xsmodel = parseSchema(xsdLocation);
return this.hasComplexTypeDefinition(xmlType, xsmodel);
}
@@ -277,17 +275,17 @@
public boolean hasGlobalElement(QName xmlName, URL xsdLocation)
{
if (xmlName == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xmlName"));
+ throw MESSAGES.illegalNullArgument("xmlName");
if (xsdLocation == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsdLocation"));
+ throw MESSAGES.illegalNullArgument("xsdLocation");
XSModel xsmodel = parseSchema(xsdLocation);
boolean bool = false;
String name = xmlName.getLocalPart();
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL","name"));
+ throw MESSAGES.xmlNameHasNull("name");
String ns = xmlName.getNamespaceURI();
if (ns == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL", "namespace"));
+ throw MESSAGES.xmlNameHasNull("namespace");
if (xsmodel.getElementDeclaration(name, ns) != null)
bool = true;
return bool;
@@ -302,16 +300,16 @@
public boolean hasComplexTypeDefinition(QName xmlType, XSModel xsmodel)
{
if (xmlType == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xmlType"));
+ throw MESSAGES.illegalNullArgument("xmlType");
if (xsmodel == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsdmodel"));
+ throw MESSAGES.illegalNullArgument("xsdmodel");
boolean bool = false;
String name = xmlType.getLocalPart();
if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL", "name"));
+ throw MESSAGES.xmlNameHasNull("name");
String ns = xmlType.getNamespaceURI();
if (ns == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_HAS_NULL","namespace"));
+ throw MESSAGES.xmlNameHasNull("namespace");
if (xsmodel.getTypeDefinition(name, ns) != null)
bool = true;
return bool;
@@ -427,7 +425,7 @@
XSLoader xsloader = getXSLoader();
XSModel xsModel = xsloader.loadURI(schemaLoc);
if (xsModel == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_PARSE_SCHEMA", schemaLoc));
+ throw MESSAGES.cannotParseSchema(schemaLoc);
return xsModel;
}
@@ -456,7 +454,7 @@
return true;
String targetNS = getTargetNamespace(xsmodel);
if (targetNS == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TARGET_NAMESPACE_OF_XSMODEL_IS_NULL"));
+ throw MESSAGES.nullTargetNsXSModel();
XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION, targetNS);
XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, targetNS);
@@ -479,7 +477,7 @@
if (xsmodel == null)
return true;
if (namespace == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TARGET_NAMESPACE_OF_XSMODEL_IS_NULL"));
+ throw MESSAGES.nullTargetNsXSModel();
XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION, namespace);
XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION, namespace);
@@ -514,7 +512,7 @@
public static File getSchemaTempFile(String targetNS) throws IOException
{
if (targetNS.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_NULL_TNS"));
+ throw MESSAGES.illegalNullArgument("target namespace");
String fname = targetNS;
if (fname.indexOf("://") > 0)
@@ -524,7 +522,7 @@
try
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();File tmpDir = serverConfig.getServerTempDir();
+ ServerConfig serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
tmpdir = serverConfig.getServerTempDir();
tmpdir = new File(tmpdir.getCanonicalPath() + "/jbossws");
tmpdir.mkdirs();
@@ -549,7 +547,7 @@
public static String getTargetNamespace(XSModel xsmodel)
{
if (xsmodel == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsmodel"));
+ throw MESSAGES.illegalNullArgument("xsmodel");
String targetNS = null;
StringList slist = xsmodel.getNamespaces();
int len = slist != null ? slist.getLength() : 0;
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-10-11 08:01:05 UTC (rev 16843)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/XSDWriter.java 2012-10-11 08:18:16 UTC (rev 16844)
@@ -28,11 +28,10 @@
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
-import java.util.ResourceBundle;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils;
@@ -43,7 +42,6 @@
*/
public class XSDWriter
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(XSDWriter.class);
// provide logging
protected static final Logger log = Logger.getLogger(XSDWriter.class);
@@ -56,7 +54,7 @@
public void writeXSD(Writer writer, XSModel xsmodel, WSDLDefinitions wsdl)
{
if (xsmodel == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "xsmodel"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("xsmodel");
this.wsdl = wsdl;
@@ -74,7 +72,7 @@
throws IOException
{
if(ns == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "ns"));
+ throw NativeMessages.MESSAGES.illegalNullArgument("ns");
String xsdString = "";
if(xsmodel instanceof JBossXSModel)
{
13 years, 3 months
JBossWS SVN: r16843 - stack/cxf/branches/jbossws-cxf-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 04:01:05 -0400 (Thu, 11 Oct 2012)
New Revision: 16843
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml
Log:
upgrade to latest components
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/pom.xml 2012-10-11 08:01:05 UTC (rev 16843)
@@ -62,11 +62,11 @@
<jbossws.api.version>1.0.0.GA</jbossws.api.version>
<jbossws.spi.version>2.0.4.GA</jbossws.spi.version>
<jbossws.common.version>2.0.4.GA</jbossws.common.version>
- <jbossws.common.tools.version>1.0.2-SNAPSHOT</jbossws.common.tools.version>
+ <jbossws.common.tools.version>1.0.2.GA</jbossws.common.tools.version>
<jbossws.shared.testsuite.version>4.0.7.GA</jbossws.shared.testsuite.version>
<jboss712.version>7.1.3.Final-SNAPSHOT</jboss712.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
- <cxf.version>2.4.9-patch-01-SNAPSHOT</cxf.version>
+ <cxf.version>2.4.9.jbossorg-1</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.4.0</cxf.xjcplugins.version>
<fastinfoset.api.version>1.2.7</fastinfoset.api.version>
13 years, 3 months
JBossWS SVN: r16842 - in stack/native/branches/jbossws-native-4.0.x: modules/core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 03:54:00 -0400 (Thu, 11 Oct 2012)
New Revision: 16842
Modified:
stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
prepare for next dev. cycle
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-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:52:32 UTC (rev 16841)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:54:00 UTC (rev 16842)
@@ -31,7 +31,7 @@
<packaging>pom</packaging>
<description>JBossWS Native stack</description>
- <version>4.0.6.GA</version>
+ <version>4.0.7-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -42,9 +42,9 @@
<!-- Source Control Management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/native/tags/jbossws-...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/native/tags/jbossws-nat...</developerConnection>
- <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/native/tags/jbossws-native...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/native/branches/jbos...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws...</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/native/branches/jbossws-na...</url>
</scm>
<!-- Modules -->
13 years, 3 months
JBossWS SVN: r16841 - stack/native/tags.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 03:52:32 -0400 (Thu, 11 Oct 2012)
New Revision: 16841
Added:
stack/native/tags/jbossws-native-4.0.6.GA/
Log:
[JBPAPP-10113] tagged JBossWS Native 4.0.6.GA
13 years, 3 months
JBossWS SVN: r16840 - in stack/native/branches/jbossws-native-4.0.x: modules/core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 03:50:51 -0400 (Thu, 11 Oct 2012)
New Revision: 16840
Modified:
stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
[JBPAPP-10113] prepare for tagging JBossWS Native 4.0.6.GA
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-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/services/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:50:51 UTC (rev 16840)
@@ -31,7 +31,7 @@
<packaging>pom</packaging>
<description>JBossWS Native stack</description>
- <version>4.0.6-SNAPSHOT</version>
+ <version>4.0.6.GA</version>
<!-- Parent -->
<parent>
@@ -42,9 +42,9 @@
<!-- Source Control Management -->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/native/branches/jbos...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/native/branches/jbossws...</developerConnection>
- <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/native/branches/jbossws-na...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/stack/native/tags/jbossws-...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/stack/native/tags/jbossws-nat...</developerConnection>
+ <url>http://fisheye.jboss.com/viewrep/JBossWS/stack/native/tags/jbossws-native...</url>
</scm>
<!-- Modules -->
13 years, 3 months
JBossWS SVN: r16839 - stack/native/branches/jbossws-native-4.0.x.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 03:29:33 -0400 (Thu, 11 Oct 2012)
New Revision: 16839
Modified:
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
use latest available components
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:07:59 UTC (rev 16838)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-10-11 07:29:33 UTC (rev 16839)
@@ -59,8 +59,8 @@
<jbossws.api.version>1.0.0.GA</jbossws.api.version>
<jbossws.spi.version>2.0.4.GA</jbossws.spi.version>
<jbossws.common.version>2.0.4.GA</jbossws.common.version>
- <jbossws.common.tools.version>1.0.1.GA</jbossws.common.tools.version>
- <jbossws.shared.testsuite.version>4.0.6.GA</jbossws.shared.testsuite.version>
+ <jbossws.common.tools.version>1.0.2.GA</jbossws.common.tools.version>
+ <jbossws.shared.testsuite.version>4.0.7.GA</jbossws.shared.testsuite.version>
<jboss712.version>7.1.3.Final-SNAPSHOT</jboss712.version>
<javassist.version>3.15.0-GA</javassist.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
13 years, 3 months
JBossWS SVN: r16838 - in stack/native/branches/jbossws-native-4.0.x: modules/core/src/main/java/org/jboss/ws/core and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-10-11 03:07:59 -0400 (Thu, 11 Oct 2012)
New Revision: 16838
Added:
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1386/Message.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws414/St.java
Log:
Merged revisions 16761,16774-16775 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16761 | alessio.soldano(a)jboss.com | 2012-09-25 18:50:32 +0200 (Tue, 25 Sep 2012) | 2 lines
Fix tests failing with log level DEBUG or TRACE for whole org.jboss.ws category
.......
r16774 | alessio.soldano(a)jboss.com | 2012-09-27 12:14:40 +0200 (Thu, 27 Sep 2012) | 2 lines
[JBWS-3486] Adding support for BufferedStreamSource sources in DeserializerSupport
.......
r16775 | alessio.soldano(a)jboss.com | 2012-09-27 16:10:02 +0200 (Thu, 27 Sep 2012) | 2 lines
[JBWS-3486] Allow dealing with SAAJ RI SOAP messages that might from client side and/or from user handlers; TRACE log level required to test this
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065,16073-16078,16081-16085,16091-16095,16103-16105,16157-16160,16165,16169-16171,16182,16202-16225,16228-16246,16263,16268,16390,16635
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065,16073-16078,16081-16085,16091-16095,16103-16105,16157-16160,16165,16169-16171,16182,16202-16225,16228-16246,16263,16268,16390,16635,16761,16774-16775
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java 2012-10-11 06:50:39 UTC (rev 16837)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/MessageTrace.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -22,30 +22,46 @@
package org.jboss.ws.core;
import java.io.ByteArrayInputStream;
+import java.io.StringWriter;
import java.util.ResourceBundle;
import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMWriter;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.core.soap.utils.SOAPElementWriter;
import org.jboss.ws.core.soap.utils.XMLFragment;
+import org.jboss.ws.core.utils.CachedOutputStream;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
/**
- * Trace incomming/outgoing messages
+ * Trace incoming/outgoing messages
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
+ *
* @since 04-Apr-2007
*/
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;
private MessageTrace()
{
@@ -60,14 +76,56 @@
{
try
{
- SOAPEnvelope soapEnv = ((SOAPMessage)message).getSOAPPart().getEnvelope();
- if (soapEnv != null)
+ if (message instanceof SOAPMessageImpl) {
+ SOAPEnvelope soapEnv = ((SOAPMessage)message).getSOAPPart().getEnvelope();
+ if (soapEnv != null)
+ {
+ String envStr = SOAPElementWriter.writeElement(soapEnv, true);
+ msgLog.trace(messagePrefix + "\n" + envStr);
+ }
+ }
+ else
{
- String envStr = SOAPElementWriter.writeElement(soapEnv, true);
- msgLog.trace(messagePrefix + "\n" + envStr);
+ SOAPMessage soapMessage = (SOAPMessage) message;
+ String encoding = (String)soapMessage.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
+ if (encoding == null)
+ {
+ encoding = "UTF-8";
+ }
+
+ CachedOutputStream os = null;
+ try
+ {
+ os = new CachedOutputStream();
+ os.setThreshold(64*1024);
+ os.holdTempFile();
+ ServerConfig sc = getServerConfig();
+ if (sc != null) {
+ os.setOutputDir(sc.getServerTempDir());
+ }
+ soapMessage.writeTo(os);
+ os.flush();
+ if (os.getTempFile() != null)
+ {
+ msgLog.trace("SOAP Message saved to tmp file: " + os.getTempFile().getAbsolutePath());
+ }
+ else
+ {
+ StringBuilder sb = new StringBuilder();
+ write(sb, os, encoding, soapMessage.getMimeHeaders().getHeader(MimeConstants.CONTENT_TYPE)[0]);
+ msgLog.trace(messagePrefix + "\n" + sb.toString());
+ }
+ }
+ finally
+ {
+ if (os != null)
+ {
+ os.close();
+ }
+ }
}
}
- catch (SOAPException ex)
+ catch (Exception ex)
{
msgLog.error(BundleUtils.getMessage(bundle, "CANNOT_TRACE_SOAPMESSAGE"), ex);
}
@@ -89,4 +147,51 @@
msgLog.warn(BundleUtils.getMessage(bundle, "UNSUPPORTED_MESSAGE_TYPE", message));
}
}
+
+ private static void write(StringBuilder builder, CachedOutputStream cos, String encoding, String contentType) throws Exception
+ {
+ if ((contentType != null && contentType.indexOf("xml") >= 0 && contentType.toLowerCase().indexOf("multipart/related") < 0) && cos.size() > 0)
+ {
+ TransformerFactory tf = TransformerFactory.newInstance();
+ try {
+ tf.setAttribute("indent-number", 2);
+ } catch (Throwable t) {} //ignore
+ Transformer serializer = tf.newTransformer();
+ serializer.setOutputProperty(OutputKeys.INDENT, "yes");
+ serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
+
+ StringWriter swriter = new StringWriter();
+ serializer.transform(new StreamSource(cos.getInputStream()), new StreamResult(swriter));
+ builder.append(swriter.toString());
+ }
+ else
+ {
+ if (encoding == null || encoding.trim().length() == 0)
+ {
+ cos.writeCacheTo(builder, "UTF-8");
+ }
+ else
+ {
+ cos.writeCacheTo(builder, encoding);
+ }
+
+ }
+ }
+
+ private static synchronized ServerConfig getServerConfig()
+ {
+ if (!serverConfigInit)
+ {
+ try {
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ serverConfig = spiProvider.getSPI(ServerConfigFactory.class, cl).getServerConfig();
+ } catch (Exception e) {
+ //ignore
+ } finally {
+ serverConfigInit = true;
+ }
+ }
+ return serverConfig;
+ }
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2012-10-11 06:50:39 UTC (rev 16837)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -33,6 +33,7 @@
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.DOMWriter;
import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.util.xml.BufferedStreamSource;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -73,7 +74,14 @@
Node node = ((DOMSource)source).getNode();
xmlFragment = DOMWriter.printNode(node, false);
}
- else throw new UnsupportedOperationException();
+ else if (source instanceof BufferedStreamSource)
+ {
+ xmlFragment = ((BufferedStreamSource)source).toString();
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
return xmlFragment;
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2012-10-11 06:50:39 UTC (rev 16837)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -39,11 +39,13 @@
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.MessageContext;
-import javax.xml.soap.SOAPPart;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.core.MessageTrace;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.soap.utils.SOAPElementWriter;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -289,16 +291,14 @@
if (log.isTraceEnabled())
{
- SOAPPart soapPart = jaxrpcContext.getSOAPMessage().getSOAPPart();
- lastMessageTrace = traceSOAPPart("BEFORE handleRequest - " + currHandler, soapPart, lastMessageTrace);
+ lastMessageTrace = traceSOAPPart("BEFORE handleRequest - " + currHandler, jaxrpcContext.getSOAPMessage(), lastMessageTrace);
}
doNext = currHandler.handleRequest(msgContext);
if (log.isTraceEnabled())
{
- SOAPPart soapPart = jaxrpcContext.getSOAPMessage().getSOAPPart();
- lastMessageTrace = traceSOAPPart("AFTER handleRequest - " + currHandler, soapPart, lastMessageTrace);
+ lastMessageTrace = traceSOAPPart("AFTER handleRequest - " + currHandler, jaxrpcContext.getSOAPMessage(), lastMessageTrace);
}
}
}
@@ -368,16 +368,14 @@
if (log.isTraceEnabled())
{
- SOAPPart soapPart = jaxrpcContext.getSOAPMessage().getSOAPPart();
- lastMessageTrace = traceSOAPPart("BEFORE handleResponse - " + currHandler, soapPart, lastMessageTrace);
+ lastMessageTrace = traceSOAPPart("BEFORE handleResponse - " + currHandler, jaxrpcContext.getSOAPMessage(), lastMessageTrace);
}
doNext = currHandler.handleResponse(msgContext);
if (log.isTraceEnabled())
{
- SOAPPart soapPart = jaxrpcContext.getSOAPMessage().getSOAPPart();
- lastMessageTrace = traceSOAPPart("AFTER handleResponse - " + currHandler, soapPart, lastMessageTrace);
+ lastMessageTrace = traceSOAPPart("AFTER handleResponse - " + currHandler, jaxrpcContext.getSOAPMessage(), lastMessageTrace);
}
}
}
@@ -449,22 +447,28 @@
/** Trace the SOAPPart, do nothing if the String representation is equal to the last one.
*/
- protected String traceSOAPPart(String logMsg, SOAPPart soapPart, String lastMessageTrace)
+ protected String traceSOAPPart(String logMsg, SOAPMessage message, String lastMessageTrace)
{
try
{
- SOAPEnvelopeImpl soapEnv = (SOAPEnvelopeImpl)soapPart.getEnvelope();
- String envStr = SOAPElementWriter.writeElement(soapEnv, true);
- if (envStr.equals(lastMessageTrace))
- {
- log.trace(logMsg + ": unchanged");
+ SOAPEnvelope se = message.getSOAPPart().getEnvelope();
+ if (se instanceof SOAPEnvelopeImpl) {
+ SOAPEnvelopeImpl soapEnv = (SOAPEnvelopeImpl)se;
+ String envStr = SOAPElementWriter.writeElement(soapEnv, true);
+ if (envStr.equals(lastMessageTrace))
+ {
+ log.trace(logMsg + ": unchanged");
+ }
+ else
+ {
+ log.trace(logMsg + "\n" + envStr);
+ lastMessageTrace = envStr;
+ }
+ return lastMessageTrace;
+ } else {
+ MessageTrace.traceMessage(logMsg, message);
+ return null;
}
- else
- {
- log.trace(logMsg + "\n" + envStr);
- lastMessageTrace = envStr;
- }
- return lastMessageTrace;
}
catch (Exception ex)
{
Copied: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java (from rev 16775, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java)
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java (rev 0)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -0,0 +1,539 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PipedInputStream;
+import java.io.PipedOutputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+public class CachedOutputStream extends OutputStream
+{
+ private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
+ private static final File DEFAULT_TEMP_DIR;
+ private static int defaultThreshold;
+ private static long defaultMaxSize;
+ static
+ {
+ String s = getSystemProperty("java.io.tmpdir");
+ if (s != null)
+ {
+ File f = new File(s);
+ if (f.exists() && f.isDirectory())
+ {
+ DEFAULT_TEMP_DIR = f;
+ }
+ else
+ {
+ DEFAULT_TEMP_DIR = null;
+ }
+ }
+ else
+ {
+ DEFAULT_TEMP_DIR = null;
+ }
+ setDefaultThreshold(-1);
+ setDefaultMaxSize(-1);
+ }
+
+ protected boolean outputLocked;
+ protected OutputStream currentStream;
+ private long threshold = defaultThreshold;
+ private long maxSize = defaultMaxSize;
+ private long totalLength;
+ private boolean inmem;
+ private boolean tempFileFailed;
+ private File tempFile;
+ private File outputDir = DEFAULT_TEMP_DIR;
+ private boolean allowDeleteOfFile = true;
+ private List<Object> streamList = new ArrayList<Object>();
+
+ public CachedOutputStream(PipedInputStream stream) throws IOException
+ {
+ currentStream = new PipedOutputStream(stream);
+ inmem = true;
+ }
+
+ public CachedOutputStream()
+ {
+ currentStream = new LoadingByteArrayOutputStream(2048);
+ inmem = true;
+ }
+
+ public CachedOutputStream(long threshold)
+ {
+ this.threshold = threshold;
+ currentStream = new LoadingByteArrayOutputStream(2048);
+ inmem = true;
+ }
+
+ public void holdTempFile()
+ {
+ allowDeleteOfFile = false;
+ }
+
+ public void releaseTempFileHold()
+ {
+ allowDeleteOfFile = true;
+ }
+
+ public void flush() throws IOException
+ {
+ currentStream.flush();
+ }
+
+ /**
+ * Locks the output stream to prevent additional writes, but maintains
+ * a pointer to it so an InputStream can be obtained
+ * @throws IOException
+ */
+ public void lockOutputStream() throws IOException
+ {
+ if (outputLocked)
+ {
+ return;
+ }
+ currentStream.flush();
+ outputLocked = true;
+ streamList.remove(currentStream);
+ }
+
+ public void close() throws IOException
+ {
+ currentStream.flush();
+ outputLocked = true;
+ currentStream.close();
+ maybeDeleteTempFile(currentStream);
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof CachedOutputStream)
+ {
+ return currentStream.equals(((CachedOutputStream) obj).currentStream);
+ }
+ return currentStream.equals(obj);
+ }
+
+ public long size()
+ {
+ return totalLength;
+ }
+
+ public byte[] getBytes() throws IOException
+ {
+ flush();
+ if (inmem)
+ {
+ if (currentStream instanceof ByteArrayOutputStream)
+ {
+ return ((ByteArrayOutputStream) currentStream).toByteArray();
+ }
+ else
+ {
+ throw new IOException("Unknown format of currentStream");
+ }
+ }
+ else
+ {
+ FileInputStream fin = new FileInputStream(tempFile);
+ return readBytesFromStream(fin);
+ }
+ }
+
+ public void writeCacheTo(StringBuilder out, String charsetName) throws IOException
+ {
+ flush();
+ if (inmem)
+ {
+ if (currentStream instanceof ByteArrayOutputStream)
+ {
+ byte[] bytes = ((ByteArrayOutputStream) currentStream).toByteArray();
+ out.append(new String(bytes, charsetName));
+ }
+ else
+ {
+ throw new IOException("Unknown format of currentStream");
+ }
+ }
+ else
+ {
+ FileInputStream fin = new FileInputStream(tempFile);
+ byte bytes[] = new byte[1024];
+ int x = fin.read(bytes);
+ while (x != -1)
+ {
+ out.append(new String(bytes, 0, x, charsetName));
+ x = fin.read(bytes);
+ }
+ fin.close();
+ }
+ }
+
+ /**
+ * @return the underlying output stream
+ */
+ public OutputStream getOut()
+ {
+ return currentStream;
+ }
+
+ public int hashCode()
+ {
+ return currentStream.hashCode();
+ }
+
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder().append("[").append(CachedOutputStream.class.getName()).append(" Content: ");
+ try
+ {
+ writeCacheTo(builder, "UTF-8");
+ }
+ catch (IOException e)
+ {
+ //ignore
+ }
+ return builder.append("]").toString();
+ }
+
+ protected void onWrite() throws IOException
+ {
+
+ }
+
+ private void enforceLimits() throws IOException
+ {
+ if (maxSize > 0 && totalLength > maxSize)
+ {
+ throw new IOException();
+ }
+ if (inmem && totalLength > threshold && currentStream instanceof ByteArrayOutputStream)
+ {
+ createFileOutputStream();
+ }
+ }
+
+ public void write(byte[] b, int off, int len) throws IOException
+ {
+ if (!outputLocked)
+ {
+ onWrite();
+ this.totalLength += len;
+ enforceLimits();
+ currentStream.write(b, off, len);
+ }
+ }
+
+ public void write(byte[] b) throws IOException
+ {
+ if (!outputLocked)
+ {
+ onWrite();
+ this.totalLength += b.length;
+ enforceLimits();
+ currentStream.write(b);
+ }
+ }
+
+ public void write(int b) throws IOException
+ {
+ if (!outputLocked)
+ {
+ onWrite();
+ this.totalLength++;
+ enforceLimits();
+ currentStream.write(b);
+ }
+ }
+
+ private void createFileOutputStream() throws IOException
+ {
+ if (tempFileFailed)
+ {
+ return;
+ }
+ ByteArrayOutputStream bout = (ByteArrayOutputStream) currentStream;
+ try
+ {
+ tempFile = File.createTempFile("jbossws-cached-output-stream-", ".tmp", outputDir);
+ currentStream = new BufferedOutputStream(new FileOutputStream(tempFile));
+ bout.writeTo(currentStream);
+ inmem = false;
+ streamList.add(currentStream);
+ }
+ catch (Exception ex)
+ {
+ tempFileFailed = true;
+ if (currentStream != bout)
+ {
+ currentStream.close();
+ }
+ deleteTempFile();
+ inmem = true;
+ currentStream = bout;
+ }
+ }
+
+ public File getTempFile()
+ {
+ return tempFile != null && tempFile.exists() ? tempFile : null;
+ }
+
+ public InputStream getInputStream() throws IOException
+ {
+ flush();
+ if (inmem)
+ {
+ if (currentStream instanceof LoadingByteArrayOutputStream)
+ {
+ return ((LoadingByteArrayOutputStream) currentStream).createInputStream();
+ }
+ else if (currentStream instanceof ByteArrayOutputStream)
+ {
+ return new ByteArrayInputStream(((ByteArrayOutputStream) currentStream).toByteArray());
+ }
+ else if (currentStream instanceof PipedOutputStream)
+ {
+ return new PipedInputStream((PipedOutputStream) currentStream);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ else
+ {
+ try
+ {
+ FileInputStream fileInputStream = new FileInputStream(tempFile)
+ {
+ boolean closed;
+
+ public void close() throws IOException
+ {
+ if (!closed)
+ {
+ super.close();
+ maybeDeleteTempFile(this);
+ }
+ closed = true;
+ }
+ };
+ streamList.add(fileInputStream);
+ return fileInputStream;
+ }
+ catch (FileNotFoundException e)
+ {
+ throw new IOException("Cached file was deleted, " + e.toString());
+ }
+ }
+ }
+
+ private synchronized void deleteTempFile()
+ {
+ if (tempFile != null)
+ {
+ File file = tempFile;
+ tempFile = null;
+ delete(file);
+ }
+ }
+
+ private void maybeDeleteTempFile(Object stream)
+ {
+ streamList.remove(stream);
+ if (!inmem && tempFile != null && streamList.isEmpty() && allowDeleteOfFile)
+ {
+ if (currentStream != null)
+ {
+ try
+ {
+ currentStream.close();
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+ }
+ deleteTempFile();
+ currentStream = new LoadingByteArrayOutputStream(1024);
+ inmem = true;
+ }
+ }
+
+ public void setOutputDir(File outputDir) throws IOException
+ {
+ this.outputDir = outputDir;
+ }
+
+ public void setThreshold(long threshold)
+ {
+ this.threshold = threshold;
+ }
+
+ public void setMaxSize(long maxSize)
+ {
+ this.maxSize = maxSize;
+ }
+
+ public static void setDefaultMaxSize(long l)
+ {
+ defaultMaxSize = l;
+ }
+
+ public static void setDefaultThreshold(int i)
+ {
+ if (i < 0)
+ {
+ i = 64 * 1024;
+ }
+ defaultThreshold = i;
+ }
+
+ private static byte[] readBytesFromStream(InputStream in) throws IOException
+ {
+ int i = in.available();
+ if (i < DEFAULT_BUFFER_SIZE)
+ {
+ i = DEFAULT_BUFFER_SIZE;
+ }
+ ByteArrayOutputStream bos = new ByteArrayOutputStream(i);
+ copy(in, bos, DEFAULT_BUFFER_SIZE);
+ in.close();
+ return bos.toByteArray();
+ }
+
+ private static int copy(final InputStream input, final OutputStream output, int bufferSize) throws IOException
+ {
+ int avail = input.available();
+ if (avail > 262144)
+ {
+ avail = 262144;
+ }
+ if (avail > bufferSize)
+ {
+ bufferSize = avail;
+ }
+ final byte[] buffer = new byte[bufferSize];
+ int n = 0;
+ n = input.read(buffer);
+ int total = 0;
+ while (-1 != n)
+ {
+ if (n == 0)
+ {
+ throw new IOException("0 bytes read in violation of InputStream.read(byte[])");
+ }
+ output.write(buffer, 0, n);
+ total += n;
+ n = input.read(buffer);
+ }
+ return total;
+ }
+
+ private static void delete(File f)
+ {
+ if (!f.delete())
+ {
+ if (isWindows())
+ {
+ System.gc();
+ }
+ try
+ {
+ Thread.sleep(10);
+ }
+ catch (InterruptedException ex)
+ {
+ // Ignore Exception
+ }
+ if (!f.delete())
+ {
+ f.deleteOnExit();
+ }
+ }
+ }
+
+ private static boolean isWindows()
+ {
+ String osName = getSystemProperty("os.name").toLowerCase(Locale.US);
+ return osName.indexOf("windows") > -1;
+ }
+
+ private static String getSystemProperty(final String name)
+ {
+ PrivilegedAction<String> action = new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return System.getProperty(name);
+ }
+ };
+ return AccessController.doPrivileged(action);
+ }
+
+ private static class LoadingByteArrayOutputStream extends ByteArrayOutputStream
+ {
+ public LoadingByteArrayOutputStream(int i)
+ {
+ super(i);
+ }
+
+ public ByteArrayInputStream createInputStream()
+ {
+ return new ByteArrayInputStream(buf, 0, count)
+ {
+ public String toString()
+ {
+ return new String(buf, 0, count);
+ }
+ };
+ }
+
+ public byte[] toByteArray()
+ {
+ if (count != buf.length)
+ {
+ buf = super.toByteArray();
+ }
+ return buf;
+ }
+ }
+}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1386/Message.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1386/Message.java 2012-10-11 06:50:39 UTC (rev 16837)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1386/Message.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -71,6 +71,6 @@
public String toString()
{
- return "[name=" + name + ",data=" + new String(data) + "]";
+ return "[name=" + name + ",data=" + ((data != null && data.length > 0) ? new String(data) : "null") + "]";
}
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws414/St.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws414/St.java 2012-10-11 06:50:39 UTC (rev 16837)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws414/St.java 2012-10-11 07:07:59 UTC (rev 16838)
@@ -55,6 +55,6 @@
public String toString()
{
- return ref.toString();
+ return ref != null ? ref.toString() : "null";
}
}
13 years, 3 months