JBossWS SVN: r3590 - branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/invocation.
by jbossws-commits@lists.jboss.org
Author: palin
Date: 2007-06-15 04:01:11 -0400 (Fri, 15 Jun 2007)
New Revision: 3590
Modified:
branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
Log:
Fix contextPath comparison (contextPath beginning with /)
Modified: branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
===================================================================
--- branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-06-15 07:54:32 UTC (rev 3589)
+++ branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java 2007-06-15 08:01:11 UTC (rev 3590)
@@ -89,6 +89,8 @@
{
String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (propContext.startsWith("/"))
+ propContext = propContext.substring(1);
if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
{
endpoint = epRegistry.getEndpoint(sepId);
18 years, 10 months
JBossWS SVN: r3589 - in branches/maeste_palin/integration: sunri/ant-import and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: palin
Date: 2007-06-15 03:54:32 -0400 (Fri, 15 Jun 2007)
New Revision: 3589
Modified:
branches/maeste_palin/integration/sunri/ant-import/build-testsuite.xml
branches/maeste_palin/integration/sunri/ant-import/build-thirdparty.xml
branches/maeste_palin/integration/sunri/version.properties
branches/maeste_palin/integration/xfire/ant-import/build-testsuite.xml
branches/maeste_palin/integration/xfire/ant-import/build-thirdparty.xml
Log:
Added wsdl4j.jar library required for integration tests
Modified: branches/maeste_palin/integration/sunri/ant-import/build-testsuite.xml
===================================================================
--- branches/maeste_palin/integration/sunri/ant-import/build-testsuite.xml 2007-06-15 07:48:14 UTC (rev 3588)
+++ branches/maeste_palin/integration/sunri/ant-import/build-testsuite.xml 2007-06-15 07:54:32 UTC (rev 3589)
@@ -42,6 +42,7 @@
<pathelement location="${int.sunri.dir}/thirdparty/stax-ex.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/streambuffer.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/wstx.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty/wsdl4j.jar"/>
</path>
<path id="tests.extra.classpath">
Modified: branches/maeste_palin/integration/sunri/ant-import/build-thirdparty.xml
===================================================================
--- branches/maeste_palin/integration/sunri/ant-import/build-thirdparty.xml 2007-06-15 07:48:14 UTC (rev 3588)
+++ branches/maeste_palin/integration/sunri/ant-import/build-thirdparty.xml 2007-06-15 07:54:32 UTC (rev 3589)
@@ -65,7 +65,8 @@
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-ri-src.jar" dest="${thirdparty.dir}/jaxws-ri-src.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/woodstox/${woodstox}/lib/wstx.jar" dest="${thirdparty.dir}/wstx.jar" usetimestamp="true" verbose="true"/>
-
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+
<checksum file="${int.sunri.dir}/version.properties" fileext=".md5"/>
</target>
Modified: branches/maeste_palin/integration/sunri/version.properties
===================================================================
--- branches/maeste_palin/integration/sunri/version.properties 2007-06-15 07:48:14 UTC (rev 3588)
+++ branches/maeste_palin/integration/sunri/version.properties 2007-06-15 07:54:32 UTC (rev 3589)
@@ -7,4 +7,4 @@
jboss-security-spi=2.0.0.Beta
sun-jaxws=2.1.1
sun-servlet=2.5
-
+ibm-wsdl4j=1.6.2
Modified: branches/maeste_palin/integration/xfire/ant-import/build-testsuite.xml
===================================================================
--- branches/maeste_palin/integration/xfire/ant-import/build-testsuite.xml 2007-06-15 07:48:14 UTC (rev 3588)
+++ branches/maeste_palin/integration/xfire/ant-import/build-testsuite.xml 2007-06-15 07:54:32 UTC (rev 3589)
@@ -48,6 +48,7 @@
<pathelement location="${int.sunri.dir}/thirdparty/stax-ex.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/streambuffer.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/wstx.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty/wsdl4j.jar"/>
</path>
<path id="xfire.classpath">
Modified: branches/maeste_palin/integration/xfire/ant-import/build-thirdparty.xml
===================================================================
--- branches/maeste_palin/integration/xfire/ant-import/build-thirdparty.xml 2007-06-15 07:48:14 UTC (rev 3588)
+++ branches/maeste_palin/integration/xfire/ant-import/build-thirdparty.xml 2007-06-15 07:54:32 UTC (rev 3589)
@@ -61,6 +61,7 @@
<get src="${jboss.repository}/xfire/${xfire}/lib/xfire-all.jar" dest="${thirdparty.dir}/xfire-all.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/xfire/${xfire}/lib/xfire-distribution-sources.jar" dest="${thirdparty.dir}/xfire-distribution-sources.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/xfire/${xfire}/lib/xfire-jsr181-api.jar" dest="${thirdparty.dir}/xfire-jsr181-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
<checksum file="${int.xfire.dir}/version.properties" fileext=".md5"/>
</target>
18 years, 10 months
JBossWS SVN: r3588 - branches/maeste_palin/integration/xfire/ant-import.
by jbossws-commits@lists.jboss.org
Author: palin
Date: 2007-06-15 03:48:14 -0400 (Fri, 15 Jun 2007)
New Revision: 3588
Modified:
branches/maeste_palin/integration/xfire/ant-import/build-deploy.xml
Log:
Fix xfire build, spiscripts attribute doesn't exist any more
Modified: branches/maeste_palin/integration/xfire/ant-import/build-deploy.xml
===================================================================
--- branches/maeste_palin/integration/xfire/ant-import/build-deploy.xml 2007-06-14 19:38:53 UTC (rev 3587)
+++ branches/maeste_palin/integration/xfire/ant-import/build-deploy.xml 2007-06-15 07:48:14 UTC (rev 3588)
@@ -32,7 +32,6 @@
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
- spiscripts="${spi.dir}/etc"
thirdpartylibs="${spi.dir}/thirdparty"
jbosshome="${jboss50.home}"/>
</target>
@@ -55,7 +54,6 @@
<macro-deploy-spi
spilibs="${spi.dir}/output/lib"
- spiscripts="${spi.dir}/etc"
thirdpartylibs="${spi.dir}/thirdparty"
jbosshome="${jboss42.home}"/>
</target>
18 years, 10 months
JBossWS SVN: r3587 - branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/marshall.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 15:38:53 -0400 (Thu, 14 Jun 2007)
New Revision: 3587
Modified:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallDocLitTestCase.java
Log:
[JBWS-1281] Marshalling exception with xsi:nil='1' but without xsi:type
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallDocLitTestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallDocLitTestCase.java 2007-06-14 19:06:30 UTC (rev 3586)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallDocLitTestCase.java 2007-06-14 19:38:53 UTC (rev 3587)
@@ -287,6 +287,14 @@
return port.javaBeanTest(param);
}
+ // [JBWS-1281] Marshalling exception with xsi:nil='1' but without xsi:type
+ public void testJBWS1281() throws Exception
+ {
+ JavaBean reqBean = new JavaBean();
+ JavaBean resBean = port.javaBeanTest(reqBean);
+ assertEquals(reqBean, resBean);
+ }
+
public JavaBean[] javaBeanArrayTest(JavaBean[] params) throws Exception
{
return port.javaBeanArrayTest(params);
18 years, 10 months
JBossWS SVN: r3586 - in branches/jbossws-2.0/jbossws-core/src/main: java/org/jboss/ws/metadata/wsse and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 15:06:30 -0400 (Thu, 14 Jun 2007)
New Revision: 3586
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
branches/jbossws-2.0/jbossws-core/src/main/resources/schema/jboss-ws-security_1_0.xsd
Log:
[JBWS-1594] Support certificate password different from keystore
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2007-06-14 18:38:23 UTC (rev 3585)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2007-06-14 19:06:30 UTC (rev 3586)
@@ -45,6 +45,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.List;
import java.util.StringTokenizer;
@@ -54,8 +55,8 @@
* <code>SecurityStore</code> holds and loads the keystore and truststore required for encyption and signing.
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- * @author <a href="mailto:jason.greene@jboss.com">Magesh Kumar B</a>
- * @version $Revision$
+ * @author Magesh Kumar B
+ * @author Thomas.Diesler(a)jboss.com
*/
public class SecurityStore
{
@@ -69,22 +70,26 @@
private String trustStorePassword;
+ private HashMap<String, String> keyPasswords;
+
public SecurityStore() throws WSSecurityException
{
- this(null, null, null, null, null, null);
+ this(null, null, null, null, null, null, null);
}
- public SecurityStore(URL keyStoreURL, String keyStoreType, String keyStorePassword) throws WSSecurityException
+ public SecurityStore(URL keyStoreURL, String keyStoreType, String keyStorePassword, HashMap<String, String> keyPasswords) throws WSSecurityException
{
loadKeyStore(keyStoreURL, keyStoreType, keyStorePassword);
loadTrustStore(keyStoreURL, keyStoreType, keyStorePassword);
+ this.keyPasswords = keyPasswords;
}
- public SecurityStore(URL keyStoreURL, String keyStoreType, String keyStorePassword, URL trustStoreURL, String trustStoreType, String trustStorePassword)
+ public SecurityStore(URL keyStoreURL, String keyStoreType, String keyStorePassword, HashMap<String, String> keyPasswords, URL trustStoreURL, String trustStoreType, String trustStorePassword)
throws WSSecurityException
{
loadKeyStore(keyStoreURL, keyStoreType, keyStorePassword);
loadTrustStore(trustStoreURL, trustStoreType, trustStorePassword);
+ this.keyPasswords = keyPasswords;
}
private void loadKeyStore(URL keyStoreURL, String keyStoreType, String keyStorePassword) throws WSSecurityException
@@ -405,7 +410,10 @@
PrivateKey key;
try
{
- key = (PrivateKey)keyStore.getKey(alias, decryptPassword(keyStorePassword).toCharArray());
+ String password = keyStorePassword;
+ if (keyPasswords != null && keyPasswords.containsKey(alias))
+ password = keyPasswords.get(alias);
+ key = (PrivateKey)keyStore.getKey(alias, decryptPassword(password).toCharArray());
}
catch (Exception e)
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-06-14 18:38:23 UTC (rev 3585)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-06-14 19:06:30 UTC (rev 3586)
@@ -138,7 +138,7 @@
try
{
- SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getTrustStoreURL(),
+ SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
config.getTrustStoreType(), config.getTrustStorePassword());
SecurityDecoder decoder = new SecurityDecoder(securityStore);
@@ -289,7 +289,7 @@
try
{
- SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getTrustStoreURL(),
+ SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords() , config.getTrustStoreURL(),
config.getTrustStoreType(), config.getTrustStorePassword());
SecurityEncoder encoder = new SecurityEncoder(operations, securityStore);
encoder.encode(soapMessage.getSOAPPart());
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2007-06-14 18:38:23 UTC (rev 3585)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityConfiguration.java 2007-06-14 19:06:30 UTC (rev 3586)
@@ -45,6 +45,7 @@
private URL trustStoreURL;
private String trustStoreType;
private String trustStorePassword;
+ private HashMap<String, String> keyPasswords = new HashMap<String, String>();
public WSSecurityConfiguration()
{
@@ -154,4 +155,14 @@
{
this.trustStoreFile = trustStoreFile;
}
+
+ public HashMap<String, String> getKeyPasswords()
+ {
+ return keyPasswords;
+ }
+
+ public void setKeyPasswords(HashMap<String, String> keyPasswords)
+ {
+ this.keyPasswords = keyPasswords;
+ }
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-06-14 18:38:23 UTC (rev 3585)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2007-06-14 19:06:30 UTC (rev 3586)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.metadata.wsse;
import java.io.IOException;
@@ -88,7 +88,7 @@
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- WSSecurityConfiguration configuration = (WSSecurityConfiguration) unmarshaller.unmarshal(is, this, null);
+ WSSecurityConfiguration configuration = (WSSecurityConfiguration)unmarshaller.unmarshal(is, this, null);
return configuration;
}
catch (JBossXBException e)
@@ -105,28 +105,27 @@
}
}
-
public WSSecurityConfiguration parse(String xmlString) throws JBossXBException
{
if (xmlString == null)
throw new IllegalArgumentException("Security config xml String cannot be null");
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- WSSecurityConfiguration configuration = (WSSecurityConfiguration) unmarshaller.unmarshal(xmlString, this, null);
+ WSSecurityConfiguration configuration = (WSSecurityConfiguration)unmarshaller.unmarshal(xmlString, this, null);
return configuration;
-
+
}
-
+
public WSSecurityConfiguration parse(StringReader strReader) throws JBossXBException
{
if (strReader == null)
throw new IllegalArgumentException("Security InputStream cannot be null");
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- WSSecurityConfiguration configuration = (WSSecurityConfiguration) unmarshaller.unmarshal(strReader, this, null);
+ WSSecurityConfiguration configuration = (WSSecurityConfiguration)unmarshaller.unmarshal(strReader, this, null);
return configuration;
}
-
+
/**
* This method is called on the factory by the object model builder when the
* parsing starts.
@@ -141,18 +140,17 @@
return root;
}
- public void setValue(WSSecurityConfiguration configuration, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
+ public void setValue(WSSecurityConfiguration configuration, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
log.trace("setValue: [obj=" + configuration + ",value=" + value + "]");
- String method = (String) options.get(localName);
+ String method = (String)options.get(localName);
if (method == null)
return;
// Dispatch to propper initializer
try
{
- WSSecurityConfiguration.class.getMethod(method, new Class[] {String.class}).invoke(configuration, new Object[]{value});
+ WSSecurityConfiguration.class.getMethod(method, new Class[] { String.class }).invoke(configuration, new Object[] { value });
}
catch (Exception e)
{
@@ -163,14 +161,19 @@
/**
* Called when parsing of a new element started.
*/
- public Object newChild(WSSecurityConfiguration configuration, UnmarshallingContext navigator, String namespaceURI,
- String localName, Attributes attrs)
+ public Object newChild(WSSecurityConfiguration configuration, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
log.trace("newChild: " + localName);
if ("config".equals(localName))
{
return new Config();
}
+ if ("key-passwords".equals(localName))
+ {
+ HashMap pwds = new HashMap();
+ configuration.setKeyPasswords(pwds);
+ return pwds;
+ }
if ("port".equals(localName))
{
return new Port(attrs.getValue("", "name"));
@@ -179,10 +182,24 @@
}
/**
+ * Called when parsing the contents of the <key-password> tag.
+ */
+ public Object newChild(HashMap passwords, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("key-password".equals(localName))
+ {
+ String alias = attrs.getValue("", "alias");
+ String pwd = attrs.getValue("", "password");
+ passwords.put(alias, pwd);
+ }
+ return null;
+ }
+
+ /**
* Called when parsing character is complete.
*/
- public void addChild(WSSecurityConfiguration configuration, Config defaultConfig, UnmarshallingContext navigator,
- String namespaceURI, String localName)
+ public void addChild(WSSecurityConfiguration configuration, Config defaultConfig, UnmarshallingContext navigator, String namespaceURI, String localName)
{
log.trace("addChild: [obj=" + configuration + ",child=" + defaultConfig + "]");
configuration.setDefaultConfig(defaultConfig);
@@ -191,8 +208,7 @@
/**
* Called when parsing character is complete.
*/
- public void addChild(WSSecurityConfiguration configuration, Port port, UnmarshallingContext navigator, String namespaceURI,
- String localName)
+ public void addChild(WSSecurityConfiguration configuration, Port port, UnmarshallingContext navigator, String namespaceURI, String localName)
{
log.trace("addChild: [obj=" + configuration + ",child=" + port + "]");
configuration.addPort(port);
@@ -210,7 +226,7 @@
Boolean include = new Boolean(true);
String timestamp = attrs.getValue("", "includeTimestamp");
if (timestamp != null)
- include = (Boolean) SimpleTypeBindings.unmarshal(timestamp, SimpleTypeBindings.XS_BOOLEAN_NAME, null);
+ include = (Boolean)SimpleTypeBindings.unmarshal(timestamp, SimpleTypeBindings.XS_BOOLEAN_NAME, null);
return new Sign(attrs.getValue("", "type"), attrs.getValue("", "alias"), include.booleanValue());
}
@@ -279,7 +295,6 @@
config.setRequires(requires);
}
-
private Object handleTargets(Object object, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
log.trace("newChild: " + localName);
@@ -456,8 +471,7 @@
/**
* Called when parsing of a new element started.
*/
- public Object newChild(Operation operation, UnmarshallingContext navigator, String namespaceURI, String localName,
- Attributes attrs)
+ public Object newChild(Operation operation, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
log.trace("newChild: " + localName);
if ("config".equals(localName))
Modified: branches/jbossws-2.0/jbossws-core/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2007-06-14 18:38:23 UTC (rev 3585)
+++ branches/jbossws-2.0/jbossws-core/src/main/resources/schema/jboss-ws-security_1_0.xsd 2007-06-14 19:06:30 UTC (rev 3586)
@@ -33,6 +33,11 @@
<xs:documentation>This specifies the trust store's password.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="key-passwords" type="passwordsType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The passwords for the private keys in the keystore. Only required if the passwords are different from that of the keystore.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
<xs:element name="config" type="configType" minOccurs="0">
<xs:annotation>
<xs:documentation>The default security configuration that is applied to all operations on all ports. This is only used if there is no port/operation config.</xs:documentation>
@@ -46,6 +51,27 @@
</xs:sequence>
</xs:complexType>
</xs:element>
+ <xs:complexType name="passwordsType">
+ <xs:sequence>
+ <xs:element name="key-password" type="passwordType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>The password for a private key in the keystore. Necessary only if the password is different from that of the keystore.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="passwordType">
+ <xs:attribute name="alias" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation>The name of the private key.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="password" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>The password of this private key. If not specified, the keystore password will be used.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
<xs:complexType name="configType" mixed="true">
<xs:all>
<xs:element name="timestamp" type="timestampType" minOccurs="0">
18 years, 10 months
JBossWS SVN: r3585 - in branches/jbossws-2.0: jbossws-core and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 14:38:23 -0400 (Thu, 14 Jun 2007)
New Revision: 3585
Added:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.java
branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/
branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/
branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/web.xml
Modified:
branches/jbossws-2.0/build/version.properties
branches/jbossws-2.0/jbossws-core/.classpath
branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
Log:
[JBWS-1611] SOAPAction is not sent in dispath requests
Modified: branches/jbossws-2.0/build/version.properties
===================================================================
--- branches/jbossws-2.0/build/version.properties 2007-06-14 15:10:57 UTC (rev 3584)
+++ branches/jbossws-2.0/build/version.properties 2007-06-14 18:38:23 UTC (rev 3585)
@@ -22,7 +22,7 @@
jboss-common-logging-spi=2.0.2.GA
jboss-javaee=5.0.0-SNAPSHOT
jboss-jaxr=1.2.0.GA
-jboss-jbossxb=2.0.0.CR2
+jboss-jbossxb=1.0.0.GA
jboss-microcontainer=2.0.0.Beta3
junit=3.8.1
stax-api=1.0
Modified: branches/jbossws-2.0/jbossws-core/.classpath
===================================================================
--- branches/jbossws-2.0/jbossws-core/.classpath 2007-06-14 15:10:57 UTC (rev 3584)
+++ branches/jbossws-2.0/jbossws-core/.classpath 2007-06-14 18:38:23 UTC (rev 3585)
@@ -17,7 +17,7 @@
<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-remoting.jar" sourcepath="thirdparty/jboss-remoting-src.jar"/>
<classpathentry kind="lib" path="thirdparty/jbosssx-client.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss-xml-binding.jar" sourcepath="thirdparty/jboss-xml-binding-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/mail.jar"/>
<classpathentry kind="lib" path="thirdparty/servlet-api.jar"/>
<classpathentry kind="lib" path="thirdparty/stax-api.jar"/>
Modified: branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-14 15:10:57 UTC (rev 3584)
+++ branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-14 18:38:23 UTC (rev 3585)
@@ -264,6 +264,13 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1611 -->
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1611.war" webxml="${tests.output.dir}/resources/jaxws/jbws1611/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-jbws1666 -->
<war destfile="${tests.output.dir}/libs/jaxws-jbws1666.war" webxml="${tests.output.dir}/resources/jaxws/jbws1666/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-06-14 15:10:57 UTC (rev 3584)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-06-14 18:38:23 UTC (rev 3585)
@@ -29,6 +29,7 @@
import java.util.concurrent.Future;
import javax.xml.bind.JAXBContext;
+import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
import javax.xml.ws.AsyncHandler;
@@ -111,6 +112,31 @@
{
MessageAbstraction reqMsg = getRequestMessage(obj);
String targetAddress = epMetaData.getEndpointAddress();
+
+ // R2744 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
+ // with a quoted value equal to the value of the soapAction attribute of
+ // soapbind:operation, if present in the corresponding WSDL description.
+
+ // R2745 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
+ // with a quoted empty string value, if in the corresponding WSDL description,
+ // the soapAction attribute of soapbind:operation is either not present, or
+ // present with an empty string as its value.
+ String bindingID = bindingProvider.getBinding().getBindingID();
+ if (bindingID.indexOf("soap") > 0)
+ {
+ String soapAction = null;
+ Map<String, Object> reqContext = getRequestContext();
+ Boolean useSOAPAction = (Boolean)reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
+ if (Boolean.TRUE.equals(useSOAPAction))
+ {
+ soapAction = (String)reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);
+ if (soapAction == null)
+ throw new IllegalStateException("Cannot obtain: " + BindingProvider.SOAPACTION_URI_PROPERTY);
+ }
+ MimeHeaders mimeHeaders = reqMsg.getMimeHeaders();
+ mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction : "");
+ }
+
MessageAbstraction resMsg = getRemotingConnection().invoke(reqMsg, targetAddress, false);
Object retObj = getReturnObject(resMsg);
return retObj;
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java 2007-06-14 18:38:23 UTC (rev 3585)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1611;
+
+import java.io.StringReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.wsf.spi.utils.DOMUtils;
+import org.jboss.wsf.spi.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * [JBWS-1611] SOAPAction is not sent in dispath requests
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1611
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Jun-2007
+ */
+public class JBWS1611TestCase extends JBossWSTest
+{
+ private static final String targetNS = "http://jbws1611.jaxws.ws.test.jboss.org/";
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1611TestCase.class, "jaxws-jbws1611.war");
+ }
+
+ public void testWebService() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1611?wsdl");
+ QName serviceName = new QName(targetNS, "PingEndpointService");
+ QName portName = new QName(targetNS, "PingEndpointPort");
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD);
+
+ dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, true);
+ dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, "uri:placeBuyOrder");
+
+ String payload = "<ns1:ping xmlns:ns1='" + targetNS + "'/>";
+ Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
+
+ Element docElement = DOMUtils.sourceToElement(retObj);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
+ String retPayload = DOMWriter.printNode(retElement, false);
+ assertEquals("<return>"uri:placeBuyOrder"</return>", retPayload);
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/JBWS1611TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.java 2007-06-14 18:38:23 UTC (rev 3585)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1611;
+
+import javax.annotation.Resource;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "PingEndpoint", serviceName = "PingEndpointService")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class PingEndpointImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(PingEndpointImpl.class);
+
+ @Resource
+ WebServiceContext wsctx;
+
+ @WebMethod
+ public String ping()
+ {
+ HttpServletRequest req = (HttpServletRequest)wsctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
+ String soapAction = req.getHeader("SOAPAction");
+ log.info("ping: " + soapAction);
+ return soapAction;
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1611/PingEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/web.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/web.xml (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/web.xml 2007-06-14 18:38:23 UTC (rev 3585)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1611.PingEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1611/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 10 months
JBossWS SVN: r3584 - branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 11:10:57 -0400 (Thu, 14 Jun 2007)
New Revision: 3584
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java
Log:
[JBWS-1620] - Incorrect handling of MIME boundaries in MultipartRelatedDecoder
Thanks Janos Biro
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java 2007-06-14 14:51:01 UTC (rev 3583)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java 2007-06-14 15:10:57 UTC (rev 3584)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.PushbackInputStream;
import java.io.UnsupportedEncodingException;
import java.util.Collection;
import java.util.Enumeration;
@@ -89,6 +90,7 @@
String boundaryParameter = contentType.getParameter("boundary");
String start = contentType.getParameter("start");
byte[] boundary;
+ byte[] crlf;
if (boundaryParameter == null)
throw new IllegalArgumentException("multipart/related content type did not contain a boundary");
@@ -100,13 +102,19 @@
boundary = ("--" + boundaryParameter).getBytes("US-ASCII");
else
boundary = ("\r\n--" + boundaryParameter).getBytes("US-ASCII");
+
+ crlf = ("\r\n").getBytes("US-ASCII");
}
catch (UnsupportedEncodingException e)
{
throw new WSException("US-ASCII not supported, this should never happen");
}
+
+ // [JBWS-1620] - Incorrect handling of MIME boundaries in MultipartRelatedDecoder
+ PushbackInputStream pushBackStream = new PushbackInputStream(stream,2);
+ pushBackStream.unread(crlf);
- BoundaryDelimitedInputStream delimitedStream = new BoundaryDelimitedInputStream(stream, boundary);
+ BoundaryDelimitedInputStream delimitedStream = new BoundaryDelimitedInputStream(pushBackStream, boundary);
// Eat first inner stream since its empty
byte[] buffer = new byte[256];
18 years, 10 months
JBossWS SVN: r3583 - branches/jbossws-2.0/integration/native/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 10:51:01 -0400 (Thu, 14 Jun 2007)
New Revision: 3583
Modified:
branches/jbossws-2.0/integration/native/ant-import/build-testsuite.xml
Log:
Add wsdl4j.jar
Modified: branches/jbossws-2.0/integration/native/ant-import/build-testsuite.xml
===================================================================
--- branches/jbossws-2.0/integration/native/ant-import/build-testsuite.xml 2007-06-14 14:43:46 UTC (rev 3582)
+++ branches/jbossws-2.0/integration/native/ant-import/build-testsuite.xml 2007-06-14 14:51:01 UTC (rev 3583)
@@ -40,6 +40,7 @@
<path id="tests.extra.classpath">
<pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
<pathelement location="${core.dir}/thirdparty/policy.jar"/>
+ <pathelement location="${core.dir}/thirdparty/wsdl4j.jar"/>
</path>
</target>
18 years, 10 months
JBossWS SVN: r3582 - in branches/jbossws-2.0: jbossws-core and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-14 10:43:46 -0400 (Thu, 14 Jun 2007)
New Revision: 3582
Added:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java
branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1666/
Removed:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointService.java
Modified:
branches/jbossws-2.0/build/etc/default.mf
branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
branches/jbossws-2.0/jbossws-core/build.xml
branches/jbossws-2.0/jbossws-core/src/main/etc/default.mf
branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh
branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml
Log:
[JBWS-1666] Simplify jbosws jar dependencies
Modified: branches/jbossws-2.0/build/etc/default.mf
===================================================================
--- branches/jbossws-2.0/build/etc/default.mf 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/build/etc/default.mf 2007-06-14 14:43:46 UTC (rev 3582)
@@ -1,4 +1,4 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.2
Created-By: @java.vm.version@ (@java.vm.vendor@)
Specification-Title: @specification.title@
Specification-Version: @specification.version@
Modified: branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-14 14:43:46 UTC (rev 3582)
@@ -264,6 +264,13 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1666 -->
+ <war destfile="${tests.output.dir}/libs/jaxws-jbws1666.war" webxml="${tests.output.dir}/resources/jaxws/jbws1666/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.class"/>
+ </classes>
+ </war>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/libs/jaxws-namespace.war" webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: branches/jbossws-2.0/jbossws-core/build.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/build.xml 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/build.xml 2007-06-14 14:43:46 UTC (rev 3582)
@@ -224,7 +224,7 @@
<target name="main" description="Executes the default target (most)." depends="most"/>
- <target name="most" description="Builds almost everything." depends="jars,tests-jars"/>
+ <target name="most" description="Builds almost everything." depends="jars"/>
<target name="all" description="Create a distribution zip file" depends="most">
</target>
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/default.mf
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/default.mf 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/default.mf 2007-06-14 14:43:46 UTC (rev 3582)
@@ -1,4 +1,4 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.2
Created-By: @java.vm.version@ (@java.vm.vendor@)
Specification-Title: @specification.title@
Specification-Version: @specification.version@
@@ -9,5 +9,5 @@
Implementation-Vendor: @implementation.vendor@
Implementation-Vendor-Id: @implementation.vendor.id@
Class-Path: jbossws-spi.jar jboss-jaxrpc.jar jboss-jaxws.jar jboss-saaj.jar
- jboss-xml-binding.jar javassist.jar mail.jar activation.jar
- jaxb-api.jar jaxb-impl.jar policy.jar wsdl4j.jar
\ No newline at end of file
+ activation.jar commons-logging.jar concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar
+ mail.jar jboss-remoting.jar jboss-xml-binding.jar policy.jar wsdl4j.jar
\ No newline at end of file
Modified: branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/src/main/etc/wsrunclient.sh 2007-06-14 14:43:46 UTC (rev 3582)
@@ -56,28 +56,16 @@
JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
# Setup the client classpath
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/activation.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/mail.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-spi.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/policy.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
-# subset of jbossall-client.jar:
+# JBossAS-5.0 subset of jbossall-client.jar
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-logging-spi.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-common-core.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/concurrent.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/commons-logging.jar"
-WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-remoting.jar"
+# JBossAS-4.2 subset of jbossall-client.jar
+WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-common-client.jar"
+
while [ $# -ge 1 ]; do
case $1 in
"-classpath") WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$2"; shift;;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -95,7 +95,7 @@
}
catch (Exception ex)
{
- throw new WebServiceException("Unable to createEndpointReference Provider: " + ex.getMessage());
+ throw new WebServiceException("Unable to load Provider: " + ex.getMessage(), ex);
}
}
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1666;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStreamReader;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.wsf.spi.utils.IOUtils;
+
+/**
+ * [JBWS-1666] Simplify jbosws jar dependencies
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1666
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Jun-2007
+ */
+public class JBWS1666TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1666TestCase.class, "jaxws-jbws1666.war");
+ }
+
+ public void testPortAccess() throws Exception
+ {
+ String resStr = TestClient.testPortAccess(getServerHost());
+ assertEquals(TestClient.REQ_STR, resStr);
+ }
+
+ public void testClientAccess() throws Exception
+ {
+ String jbh = System.getProperty("jboss.home");
+ String jbc = jbh + "/client";
+ String jbl = jbh + "/lib";
+
+ // Setup the classpath - do not modify this lightheartedly.
+ // Maybe you should extend the Class-Path in the MANIFEST instead.
+ StringBuffer cp = new StringBuffer("./classes");
+ cp.append(":" + jbc + "/jbossws-client.jar");
+ cp.append(":" + jbc + "/jboss-common-client.jar");
+
+ Runtime rt = Runtime.getRuntime();
+
+ String command = "java -Djava.endorsed.dirs=" + jbl + "/endorsed -cp " + cp + " " + TestClient.class.getName() + " " + getServerHost();
+ Process proc = rt.exec(command);
+ int status = proc.waitFor();
+ if (status == 0)
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
+ String resStr = br.readLine();
+ assertEquals(TestClient.REQ_STR, resStr);
+ }
+ else
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, proc.getErrorStream());
+ String errStr = new String(baos.toByteArray());
+ fail(errStr);
+ }
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1666;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+public class TestClient
+{
+ public static final String REQ_STR = "Hello World!";
+
+ public static String testPortAccess(String serverHost) throws Exception
+ {
+ URL wsdlURL = new URL("http://" + serverHost + ":8080/jaxws-jbws1666?wsdl");
+
+ QName serviceName = new QName("http://org.jboss.ws/jbws1666", "TestEndpointImplService");
+ Service service = Service.create(wsdlURL, serviceName);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ String resStr = port.echo(REQ_STR);
+ return resStr;
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ String serverHost = args[0];
+ String resStr = testPortAccess(serverHost);
+ System.out.println(resStr);
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1666;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1666")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint
+{
+ String echo(String input);
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws1666;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1666")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class TestEndpointImpl
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointService.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointService.java 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointService.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -1,16 +0,0 @@
-/*
- * JBoss, the OpenSource EJB server
- * Distributable under LGPL license. See terms of license at gnu.org.
- */
-
-//Auto Generated by jbossws - Please do not edit!!!
-package org.jboss.test.ws.jaxws.jbws871;
-
-import javax.xml.rpc.Service;
-import javax.xml.rpc.ServiceException;
-
-public interface RpcArrayEndpointService extends Service
-{
- public RpcArrayEndpoint getRpcArrayEndpointPort() throws ServiceException;
-
-}
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-06-14 12:50:56 UTC (rev 3581)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wseventing/EventingSupport.java 2007-06-14 14:43:46 UTC (rev 3582)
@@ -27,7 +27,6 @@
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.Stub;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.addressing.AddressingBuilder;
@@ -182,30 +181,6 @@
return filter;
}
- public static void setSubscriptionId(Stub stub, URI identifier)
- {
- stub._setProperty("subscriptionId", identifier);
- }
-
- public static URI setMessageId(Stub stub) throws Exception
- {
- URI messageId = new URI("http://www.example.org/eventSink/message#" + (msgId++));
- //stub._setProperty(SOAPClientHandler.CLIENT_ADDRESSING_REQUEST_MESSAGE_ID, messageId);
- return messageId;
- }
-
- protected void assertReplyAction(Stub stub, URI expectedAction) throws Exception
- {
- // see AddrConstraintsHandler
- stub._setProperty("wsa:expectedReplyAction", expectedAction);
- }
-
- protected void assertRelatesTo(Stub stub, URI expectedRelatesTo) throws Exception
- {
- // see AddrConstraintsHandler
- stub._setProperty("wsa:expectedRelatesTo", expectedRelatesTo);
- }
-
protected void assertWSDLAccess() throws MalformedURLException
{
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
Copied: branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1666 (from rev 3575, branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1178)
Modified: branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1178/WEB-INF/web.xml 2007-06-13 21:25:17 UTC (rev 3575)
+++ branches/jbossws-2.0/jbossws-core/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml 2007-06-14 14:43:46 UTC (rev 3582)
@@ -5,12 +5,11 @@
<servlet>
<servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws1178.TestEndpoint</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1666.TestEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestEndpoint</servlet-name>
- <!-- [JBWS-864] soap:address in wsdl ignores <url-pattern> -->
- <url-pattern>/testpattern</url-pattern>
+ <url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
\ No newline at end of file
18 years, 10 months
JBossWS SVN: r3581 - in branches/maeste_palin/integration: spi/src/main/java/org/jboss/wsf/spi/utils/log and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: palin
Date: 2007-06-14 08:50:56 -0400 (Thu, 14 Jun 2007)
New Revision: 3581
Added:
branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/
branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JBossLogHandler.java
branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JDKLogRedirector.java
branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/NamespaceFilter.java
Modified:
branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
Log:
First implementation of JDKLogRedirector for JBWS-1675 JBWS-1678
Added: branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JBossLogHandler.java
===================================================================
--- branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JBossLogHandler.java (rev 0)
+++ branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JBossLogHandler.java 2007-06-14 12:50:56 UTC (rev 3581)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.utils.log;
+
+import java.util.logging.ErrorManager;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.SimpleFormatter;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A Handler (java.util.logging.Handler) class redirecting messages
+ * to the jboss logging system.
+ *
+ * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
+ * @author Stefano Maestri, <stefano.maestri(a)javalinux.it>
+ * @since 14-Jun-2007
+ *
+ */
+public class JBossLogHandler extends Handler
+{
+
+ public JBossLogHandler()
+ {
+ super.setFormatter(new SimpleFormatter());
+ }
+
+ @Override
+ public void publish(LogRecord record)
+ {
+ if (!isLoggable(record))
+ {
+ return;
+ }
+ String msg;
+ try
+ {
+ msg = getFormatter().formatMessage(record);
+ }
+ catch (Exception ex)
+ {
+ // We don't want to throw an exception here, but we
+ // report the exception to any registered ErrorManager.
+ reportError(null, ex, ErrorManager.FORMAT_FAILURE);
+ return;
+ }
+ if (record.getLevel() == Level.INFO)
+ {
+ Logger.getLogger(record.getSourceClassName()).info(msg);
+ }
+ else if (record.getLevel() == Level.SEVERE)
+ {
+ Logger.getLogger(record.getSourceClassName()).error(msg);
+ }
+ else if (record.getLevel() == Level.WARNING)
+ {
+ Logger.getLogger(record.getSourceClassName()).warn(msg);
+ }
+ else if (record.getLevel() == Level.FINE)
+ {
+ Logger.getLogger(record.getSourceClassName()).debug(msg);
+ }
+ else if (record.getLevel() == Level.FINER || record.getLevel() == Level.FINEST)
+ {
+ Logger.getLogger(record.getSourceClassName()).trace(msg);
+ }
+ else
+ {
+ Logger.getLogger(record.getSourceClassName()).debug(msg);
+ }
+ }
+
+ @Override
+ public boolean isLoggable(LogRecord record)
+ {
+ if (record == null)
+ {
+ return false;
+ }
+ return super.isLoggable(record);
+ }
+
+ @Override
+ public void flush()
+ {
+ //nothing to do
+ }
+
+ @Override
+ public void close() throws SecurityException
+ {
+ //nothing to do
+ }
+
+}
\ No newline at end of file
Added: branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JDKLogRedirector.java
===================================================================
--- branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JDKLogRedirector.java (rev 0)
+++ branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/JDKLogRedirector.java 2007-06-14 12:50:56 UTC (rev 3581)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.utils.log;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.logging.Filter;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Redirects JDK Logger output to the JBoss Logger.
+ *
+ * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
+ * @author Stefano Maestri, <stefano.maestri(a)javalinux.it>
+ * @since 14-Jun-2007
+ *
+ */
+public class JDKLogRedirector
+{
+ private List<String> namespaces = new LinkedList<String>();
+
+ public JDKLogRedirector()
+ {
+ }
+
+ public void changeHandlers()
+ {
+ for (String ns : namespaces)
+ {
+ changeHandler(ns);
+ }
+ }
+
+ /**
+ * Modifies the jdk root logger in order not to log records coming from
+ * loggers with the provided namespace; these records are then logged
+ * through the JBoss Logger.
+ *
+ * @param ns
+ */
+ public void changeHandler(String ns)
+ {
+ if (ns == null)
+ ns = "";
+ Logger.getLogger(this.getClass()).info("Changing current root logger's log handlers to hide logs with namespace " + ns);
+ java.util.logging.Logger jdkRootLogger = java.util.logging.Logger.getLogger("");
+ Handler[] handlers = jdkRootLogger.getHandlers();
+ for (int i = 0; i < handlers.length; i++)
+ {
+ Handler handler = handlers[i];
+ if (!(handler instanceof JBossLogHandler))
+ {
+ StringBuffer sb = new StringBuffer("Disableing handler ");
+ sb.append(handler).append(" with level ").append(handler.getLevel());
+ Logger.getLogger(this.getClass()).debug(sb);
+ Filter f = handler.getFilter();
+ if (f != null && f instanceof NamespaceFilter)
+ {
+ ((NamespaceFilter)f).addNamespace(ns);
+ }
+ else
+ {
+ NamespaceFilter nsFilter = new NamespaceFilter(false);
+ nsFilter.addNamespace(ns);
+ handler.setFilter(nsFilter);
+ }
+ }
+ }
+ Handler jbossLogHandler = new JBossLogHandler();
+ jbossLogHandler.setLevel(Level.ALL);
+ java.util.logging.Logger.getLogger(ns).addHandler(jbossLogHandler);
+ }
+
+ public void addNamespace(String ns)
+ {
+ namespaces.add(ns);
+ changeHandler(ns);
+ }
+
+ public List<String> getNamespaces()
+ {
+ return namespaces;
+ }
+
+ public void setNamespaces(List<String> namespaces)
+ {
+ this.namespaces = namespaces;
+ changeHandlers();
+ }
+}
Added: branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/NamespaceFilter.java
===================================================================
--- branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/NamespaceFilter.java (rev 0)
+++ branches/maeste_palin/integration/spi/src/main/java/org/jboss/wsf/spi/utils/log/NamespaceFilter.java 2007-06-14 12:50:56 UTC (rev 3581)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.utils.log;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.logging.Filter;
+import java.util.logging.LogRecord;
+
+/**
+ * A log filter allowing logging of LogRecord depending on the
+ * namespace of the Logger they have been collected by.
+ *
+ * @author Alessio Soldano, <alessio.soldano(a)javalinux.it>
+ * @author Stefano Maestri, <stefano.maestri(a)javalinux.it>
+ * @since 14-Jun-2007
+ *
+ */
+public class NamespaceFilter implements Filter
+{
+
+ private Set<String> namespaces;
+ private boolean show;
+
+ public NamespaceFilter(boolean show)
+ {
+ this.show = show;
+ }
+
+ public boolean isLoggable(LogRecord record)
+ {
+ String loggerName = record.getLoggerName();
+ if (loggerName == null)
+ {
+ return true;
+ }
+ else
+ {
+ for (String ns : namespaces)
+ {
+ if (loggerName.startsWith(ns))
+ {
+ return show;
+ }
+ }
+ return !show;
+ }
+ }
+
+ public void addNamespace(String ns)
+ {
+ if (namespaces == null)
+ namespaces = new LinkedHashSet<String>();
+ namespaces.add(ns);
+ }
+
+ public Set<String> getNamespaces()
+ {
+ return namespaces;
+ }
+
+ public void setNamespaces(Set<String> namespaces)
+ {
+ this.namespaces = namespaces;
+ }
+
+ public boolean isShow()
+ {
+ return show;
+ }
+
+ public void setShow(boolean show)
+ {
+ this.show = show;
+ }
+
+}
Modified: branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-06-14 12:48:59 UTC (rev 3580)
+++ branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-06-14 12:50:56 UTC (rev 3581)
@@ -213,5 +213,14 @@
</list>
</property>
</bean>
-
+
+ <bean name="JDKLogRedirector" class="org.jboss.wsf.spi.utils.log.JDKLogRedirector">
+ <property name="namespaces">
+ <list class="java.util.LinkedList" elementClass="java.lang.String">
+ <value>javax.enterprise.resource.webservices.jaxws</value>
+ <value>com.sun</value>
+ </list>
+ </property>
+ </bean>
+
</deployment>
\ No newline at end of file
Modified: branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-06-14 12:48:59 UTC (rev 3580)
+++ branches/maeste_palin/integration/sunri/src/main/resources/jbossws-sunri50.sar/META-INF/jbossws-beans.xml 2007-06-14 12:50:56 UTC (rev 3581)
@@ -244,5 +244,14 @@
</uninstall>
<depends>WebServiceMainDeployer</depends>
</bean>
+
+ <bean name="JDKLogRedirector" class="org.jboss.wsf.spi.utils.log.JDKLogRedirector">
+ <property name="namespaces">
+ <list class="java.util.LinkedList" elementClass="java.lang.String">
+ <value>javax.enterprise.resource.webservices.jaxws</value>
+ <value>com.sun</value>
+ </list>
+ </property>
+ </bean>
</deployment>
18 years, 10 months