JBossWS SVN: r16977 - stack/native/branches/jbossws-native-3.1.2/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-14 03:21:17 -0500 (Wed, 14 Nov 2012)
New Revision: 16977
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
Log:
[JBPAPP-9520]:exclude the test to check the tmp file delete
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2012-11-14 08:19:53 UTC (rev 16976)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2012-11-14 08:21:17 UTC (rev 16977)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP14</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -362,6 +362,9 @@
<!--# [JBWS-2217] Fix BPEL jaxrpc samples -->
<exclude>org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*</exclude>
+ <!--After JBPAPP-9520 we don't delete temporary file -->
+ <exclude>org/jboss/test/ws/jaxrpc/jbws1205/*TestCase.*</exclude>
+
<!--# JMS not supported in EAP51x -->
<exclude>org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.*</exclude>
12 years, 1 month
JBossWS SVN: r16976 - stack/native/tags/jbossws-native-3.1.2.SP14/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-14 03:19:53 -0500 (Wed, 14 Nov 2012)
New Revision: 16976
Modified:
stack/native/tags/jbossws-native-3.1.2.SP14/modules/testsuite/pom.xml
Log:
[JBPAPP-9520]:exclude the test to check the tmp file delete
Modified: stack/native/tags/jbossws-native-3.1.2.SP14/modules/testsuite/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP14/modules/testsuite/pom.xml 2012-11-14 08:19:45 UTC (rev 16975)
+++ stack/native/tags/jbossws-native-3.1.2.SP14/modules/testsuite/pom.xml 2012-11-14 08:19:53 UTC (rev 16976)
@@ -362,6 +362,9 @@
<!--# [JBWS-2217] Fix BPEL jaxrpc samples -->
<exclude>org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*</exclude>
+ <!--After JBPAPP-9520 we don't delete temporary file -->
+ <exclude>org/jboss/test/ws/jaxrpc/jbws1205/*TestCase.*</exclude>
+
<!--# JMS not supported in EAP51x -->
<exclude>org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.*</exclude>
12 years, 1 month
JBossWS SVN: r16975 - stack/native/branches/jbossws-native-3.1.2.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-14 03:19:45 -0500 (Wed, 14 Nov 2012)
New Revision: 16975
Modified:
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
switch to jbossws common SNAPSHOT
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2012-11-13 14:58:05 UTC (rev 16974)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2012-11-14 08:19:45 UTC (rev 16975)
@@ -44,7 +44,7 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.1.0.SP9</jbossws.common.version>
+ <jbossws.common.version>1.1.0-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.1.2.SP12</jbossws.framework.version>
<jbossws.spi.version>1.1.2.SP8</jbossws.spi.version>
<!-- [JBWS-2505] -->
12 years, 1 month
JBossWS SVN: r16974 - in stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws: tools/wsdl and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-13 09:58:05 -0500 (Tue, 13 Nov 2012)
New Revision: 16974
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
[JBPAPP-10380]:hash tmp file name from the file content not the simple wsdl file name
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 14:56:55 UTC (rev 16973)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 14:58:05 UTC (rev 16974)
@@ -513,7 +513,7 @@
/** Get the temp file for a given namespace
*/
- public static File getSchemaTempFile(String targetNS, String fileName) throws IOException
+ public static File getSchemaTempFile(String targetNS, byte[] fileContent) throws IOException
{
if (targetNS.length() == 0)
throw new IllegalArgumentException("Invalid null target namespace");
@@ -544,11 +544,11 @@
fname = fname.replace('#', '_');
File file = null;
- if (fileName != null)
+ if (fileContent != null)
{
try
{
- String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
+ String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileContent));
if(tmpdir == null)
{
tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 14:56:55 UTC (rev 16973)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 14:58:05 UTC (rev 16974)
@@ -21,10 +21,14 @@
*/
package org.jboss.ws.tools.wsdl;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
@@ -109,6 +113,7 @@
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.IOUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -267,7 +272,8 @@
{
for (File current : tempFiles)
{
- current.deleteOnExit();
+ //TODO: look at how to remove tmp file correctly
+ //current.delete();
}
}
@@ -530,6 +536,17 @@
importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
+ byte[] wsdlContent = null;
+
+ InputStream inputStream = wsdlLoc.openStream();
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ IOUtils.copyStream(bout, inputStream);
+ wsdlContent = bout.toByteArray();
+ inputStream.close();
+ bout.close();
+
+
String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
File tmpFile = null;
@@ -544,14 +561,14 @@
{
log.trace("processSchemaInclude: [targetNS=" + targetNS + ",parentURL=" + wsdlLoc + "]");
- tmpFile = SchemaUtils.getSchemaTempFile(targetNS, getFileName(wsdlLoc));
+ tmpFile = SchemaUtils.getSchemaTempFile(targetNS, wsdlContent);
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
}
else
{
- tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", getFileName(wsdlLoc));
+ tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", wsdlContent);
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
12 years, 1 month
JBossWS SVN: r16973 - common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-13 09:56:55 -0500 (Tue, 13 Nov 2012)
New Revision: 16973
Modified:
common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
Log:
[JBPAPP-10380]:Fix JBWS2526TestCase
Modified: common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
===================================================================
--- common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2012-11-13 14:56:46 UTC (rev 16972)
+++ common/branches/jbossws-common-1.1.0/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2012-11-13 14:56:55 UTC (rev 16973)
@@ -56,73 +56,78 @@
// provide logging
private static final Logger log = Logger.getLogger(JBossWSEntityResolver.class);
+
public JBossWSEntityResolver()
{
- this("META-INF/jbossws-entities.properties");
+ super();
+ loadEntity(getClass().getClassLoader(), "META-INF/jbossws-entities.properties");
+ loadEntity(Thread.currentThread().getContextClassLoader(), "jbossws-entities.properties");
+
}
- public JBossWSEntityResolver(final String entitiesResource)
- {
- super();
-
+ private void loadEntity(final ClassLoader loader, final String entityResource) {
+ Map<String, Properties> map = propertiesMap.get(loader);
Properties props = null;
- ClassLoader loader = this.getClass().getClassLoader();
- Map<String, Properties> map = propertiesMap.get(loader);
- if (map != null && map.containsKey(entitiesResource))
+ if (map != null && map.containsKey(entityResource))
{
- props = map.get(entitiesResource);
+ props = map.get(entityResource);
}
else
{
- if (map == null)
+ props = loadEntitiesMappingFromClasspath(loader, entityResource);
+ if (map == null && props.size() > 1)
{
map = new ConcurrentHashMap<String, Properties>();
propertiesMap.put(loader, map);
}
- // load entities
- props = loadEntitiesMappingFromClasspath(entitiesResource);
- if (props.size() == 0)
- throw new IllegalArgumentException("No entities mapping defined in resource file: " + entitiesResource);
- map.put(entitiesResource, props);
+ if (map != null && props.size() > 1)
+ map.put(entityResource, props);
}
-
- // register entities
- String key = null, val = null;
- for (Enumeration<Object> keys = props.keys(); keys.hasMoreElements();)
- {
- key = (String)keys.nextElement();
- val = props.getProperty(key);
-
- registerEntity(key, val);
- }
+
+ // register entities
+ String key = null, val = null;
+ for (Enumeration<Object> keys = props.keys(); keys.hasMoreElements();)
+ {
+ key = (String) keys.nextElement();
+ val = props.getProperty(key);
+
+ registerEntity(key, val);
+ }
}
- private Properties loadEntitiesMappingFromClasspath(final String entitiesResource)
+ private Properties loadEntitiesMappingFromClasspath(final ClassLoader loader, final String entitiesResource)
{
return AccessController.doPrivileged(new PrivilegedAction<Properties>()
{
public Properties run()
{
- InputStream is = this.getClass().getClassLoader().getResourceAsStream(entitiesResource);
+ Properties props = new Properties();
+ InputStream is = loader.getResourceAsStream(entitiesResource);
// get stream
- if (is == null)
- throw new IllegalArgumentException("Resource " + entitiesResource + " not found");
+ if (is != null)
+ {
- // load props
- Properties props = new Properties();
- try
- {
- props.load(is);
+ // load props
+
+ try
+ {
+ props.load(is);
+ }
+ catch (IOException ioe)
+ {
+ log.error("Cannot read resource: " + entitiesResource, ioe);
+ }
+ finally
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException ioe)
+ {
+ } // ignore
+ }
}
- catch (IOException ioe)
- {
- log.error("Cannot read resource: " + entitiesResource, ioe);
- }
- finally
- {
- try { is.close(); } catch (IOException ioe) {} // ignore
- }
-
return props;
}
});
12 years, 1 month
JBossWS SVN: r16972 - in stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws: tools/wsdl and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-13 09:56:46 -0500 (Tue, 13 Nov 2012)
New Revision: 16972
Modified:
stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
Revert the wrong commit in tag, should do another release
Modified: stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 14:45:27 UTC (rev 16971)
+++ stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 14:56:46 UTC (rev 16972)
@@ -513,7 +513,7 @@
/** Get the temp file for a given namespace
*/
- public static File getSchemaTempFile(String targetNS, byte[] fileContent) throws IOException
+ public static File getSchemaTempFile(String targetNS, String fileName) throws IOException
{
if (targetNS.length() == 0)
throw new IllegalArgumentException("Invalid null target namespace");
@@ -544,11 +544,11 @@
fname = fname.replace('#', '_');
File file = null;
- if (fileContent != null)
+ if (fileName != null)
{
try
{
- String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileContent));
+ String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
if(tmpdir == null)
{
tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
Modified: stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 14:45:27 UTC (rev 16971)
+++ stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 14:56:46 UTC (rev 16972)
@@ -21,14 +21,10 @@
*/
package org.jboss.ws.tools.wsdl;
-import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
-import java.io.InputStream;
import java.net.MalformedURLException;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
@@ -113,7 +109,6 @@
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
-import org.jboss.wsf.common.IOUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -272,8 +267,7 @@
{
for (File current : tempFiles)
{
- //TODO: look at how to remove tmp file correctly
- //current.delete();
+ current.deleteOnExit();
}
}
@@ -536,17 +530,6 @@
importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
- byte[] wsdlContent = null;
-
- InputStream inputStream = wsdlLoc.openStream();
-
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- IOUtils.copyStream(bout, inputStream);
- wsdlContent = bout.toByteArray();
- inputStream.close();
- bout.close();
-
-
String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
File tmpFile = null;
@@ -561,14 +544,14 @@
{
log.trace("processSchemaInclude: [targetNS=" + targetNS + ",parentURL=" + wsdlLoc + "]");
- tmpFile = SchemaUtils.getSchemaTempFile(targetNS, wsdlContent);
+ tmpFile = SchemaUtils.getSchemaTempFile(targetNS, getFileName(wsdlLoc));
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
}
else
{
- tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", wsdlContent);
+ tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", getFileName(wsdlLoc));
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
12 years, 1 month
JBossWS SVN: r16971 - in stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws: tools/wsdl and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2012-11-13 09:45:27 -0500 (Tue, 13 Nov 2012)
New Revision: 16971
Modified:
stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
[JBPAPP-10380]:Fix JBWS2526TestCase
Modified: stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 08:31:21 UTC (rev 16970)
+++ stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/xsd/SchemaUtils.java 2012-11-13 14:45:27 UTC (rev 16971)
@@ -513,7 +513,7 @@
/** Get the temp file for a given namespace
*/
- public static File getSchemaTempFile(String targetNS, String fileName) throws IOException
+ public static File getSchemaTempFile(String targetNS, byte[] fileContent) throws IOException
{
if (targetNS.length() == 0)
throw new IllegalArgumentException("Invalid null target namespace");
@@ -544,11 +544,11 @@
fname = fname.replace('#', '_');
File file = null;
- if (fileName != null)
+ if (fileContent != null)
{
try
{
- String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileName.getBytes("UTF-8")));
+ String fileNameHash = toHexString(MessageDigest.getInstance("MD5").digest(fileContent));
if(tmpdir == null)
{
tmpdir = (File) AccessController.doPrivileged(new PrivilegedAction() {
Modified: stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 08:31:21 UTC (rev 16970)
+++ stack/native/tags/jbossws-native-3.1.2.SP14/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-11-13 14:45:27 UTC (rev 16971)
@@ -21,10 +21,14 @@
*/
package org.jboss.ws.tools.wsdl;
+import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
@@ -109,6 +113,7 @@
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.common.IOUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -267,7 +272,8 @@
{
for (File current : tempFiles)
{
- current.deleteOnExit();
+ //TODO: look at how to remove tmp file correctly
+ //current.delete();
}
}
@@ -530,6 +536,17 @@
importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
+ byte[] wsdlContent = null;
+
+ InputStream inputStream = wsdlLoc.openStream();
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ IOUtils.copyStream(bout, inputStream);
+ wsdlContent = bout.toByteArray();
+ inputStream.close();
+ bout.close();
+
+
String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
File tmpFile = null;
@@ -544,14 +561,14 @@
{
log.trace("processSchemaInclude: [targetNS=" + targetNS + ",parentURL=" + wsdlLoc + "]");
- tmpFile = SchemaUtils.getSchemaTempFile(targetNS, getFileName(wsdlLoc));
+ tmpFile = SchemaUtils.getSchemaTempFile(targetNS, wsdlContent);
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
}
else
{
- tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", getFileName(wsdlLoc));
+ tmpFile = SchemaUtils.getSchemaTempFile("no_namespace", wsdlContent);
tempFiles.add(tmpFile);
publishedLocations.put(wsdlLoc, tmpFile.toURL());
12 years, 1 month
JBossWS SVN: r16970 - in stack/native/branches/ropalka: modules/core/src/main/java/org/jboss/ws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 03:31:21 -0500 (Tue, 13 Nov 2012)
New Revision: 16970
Added:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java
stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
Removed:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
Modified:
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
stack/native/branches/ropalka/pom.xml
Log:
[JBWS-3565] WS Ref SPI clean up
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/NativeMessages.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/NativeMessages.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -29,7 +29,6 @@
import java.util.Collection;
import javax.management.ObjectName;
-import javax.naming.NamingException;
import javax.wsdl.Part;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
@@ -687,7 +686,7 @@
JAXRPCException outputParamsNotAvailable();
@Message(id = 25268, value = "Cannot obtain path to PortComponentLinkServlet")
- NamingException cannotObtainPathToPCLServlet(@Cause Throwable cause);
+ Exception cannotObtainPathToPCLServlet(@Cause Throwable cause);
@Message(id = 25270, value = "The service interface does not implement javax.xml.rpc.Service: %s")
JAXRPCException interfaceDoesNotImplementJAXRPCService(String intf);
Deleted: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefBinderFactoryImpl.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.client;
-
-import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceRefBinderJAXRPC;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
-
-/**
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class NativeServiceRefBinderFactoryImpl implements ServiceRefBinderFactory
-{
- private static final ServiceRefBinder JAXRPC_BINDER = new NativeServiceRefBinderJAXRPC();
-
- public ServiceRefBinder newServiceRefBinder(final Type type)
- {
- if (type == Type.JAXRPC)
- {
- return JAXRPC_BINDER;
- }
- throw new UnsupportedOperationException();
- }
-}
Added: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java (rev 0)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryFactoryImpl.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.client;
+
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class NativeServiceRefFactoryFactoryImpl implements ServiceRefFactoryFactory
+{
+ public ServiceRefFactory newServiceRefFactory()
+ {
+ return new NativeServiceRefFactoryImpl();
+ }
+}
Added: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java (rev 0)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/client/NativeServiceRefFactoryImpl.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.client;
+
+import org.jboss.ws.core.jaxrpc.client.serviceref.NativeServiceObjectFactoryJAXRPC;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.serviceref.ServiceRefFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefType;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+final class NativeServiceRefFactoryImpl implements ServiceRefFactory
+{
+ public Object newServiceRef(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (serviceRefMD.getType() == ServiceRefType.JAXRPC) {
+ return new NativeServiceObjectFactoryJAXRPC().getObjectInstance(serviceRefMD);
+ }
+ throw new UnsupportedOperationException();
+ }
+}
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -58,7 +58,6 @@
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
@@ -204,7 +203,6 @@
String nsURI = portName.getNamespaceURI();
serviceMetaData.assertTargetNamespace(nsURI);
CallImpl call = new CallImpl(this, portName, null);
- initCallProperties(call, null);
return call;
}
@@ -226,7 +224,6 @@
serviceMetaData.assertTargetNamespace(nsURI);
QName opName = new QName(nsURI, operationName);
CallImpl call = new CallImpl(this, portName, opName);
- initCallProperties(call, null);
return call;
}
@@ -247,7 +244,6 @@
serviceMetaData.assertTargetNamespace(portName.getNamespaceURI());
serviceMetaData.assertTargetNamespace(opName.getNamespaceURI());
CallImpl call = new CallImpl(this, portName, opName);
- initCallProperties(call, null);
return call;
}
@@ -263,7 +259,6 @@
public Call createCall() throws ServiceException
{
CallImpl call = new CallImpl(this);
- initCallProperties(call, null);
return call;
}
@@ -445,10 +440,6 @@
CallImpl call = new CallImpl(this, epMetaData);
initStubProperties(call, seiClass.getName());
- // JBoss-4.0.x does not support <stub-properties>
- if (initCallProperties(call, seiClass.getName()) > 0)
- NativeLoggers.JAXRPC_LOGGER.deprecatedUseOfCallPropsOnJAXRPCStub();
-
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
Remote proxy = (Remote)Proxy.newProxyInstance(cl, new Class[] { seiClass, Stub.class, StubExt.class }, handler);
@@ -480,41 +471,6 @@
return propCount;
}
- private int initCallProperties(CallImpl call, String seiName)
- {
- setupHandlerChain(call.getEndpointMetaData());
-
- // nothing to do
- if (usrMetaData == null)
- return 0;
-
- int propCount = 0;
-
- // General properties
- for (UnifiedCallPropertyMetaData prop : usrMetaData.getCallProperties())
- {
- call.setProperty(prop.getPropName(), prop.getPropValue());
- propCount++;
- }
-
- if (seiName != null)
- {
- for (UnifiedPortComponentRefMetaData upcRef : usrMetaData.getPortComponentRefs())
- {
- if (seiName.equals(upcRef.getServiceEndpointInterface()))
- {
- for (UnifiedCallPropertyMetaData prop : upcRef.getCallProperties())
- {
- call.setProperty(prop.getPropName(), prop.getPropValue());
- propCount++;
- }
- }
- }
- }
-
- return propCount;
- }
-
/**
* Get the handler chain for the given endpoint name, maybe null.
*/
Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceObjectFactoryJAXRPC.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -24,11 +24,8 @@
import static org.jboss.ws.NativeMessages.MESSAGES;
import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.ObjectInputStream;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.net.URL;
@@ -36,22 +33,15 @@
import java.rmi.Remote;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Hashtable;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.NamingException;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import org.jboss.logging.Logger;
import org.jboss.ws.NativeLoggers;
+import org.jboss.ws.NativeMessages;
import org.jboss.ws.common.Constants;
import org.jboss.ws.core.jaxrpc.client.ServiceExt;
import org.jboss.ws.core.jaxrpc.client.ServiceImpl;
@@ -67,7 +57,8 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -80,54 +71,15 @@
* @author Thomas.Diesler(a)jboss.org
* @since 15-April-2004
*/
-public final class NativeServiceObjectFactoryJAXRPC implements ObjectFactory
+public final class NativeServiceObjectFactoryJAXRPC
{
// provide logging
private static final Logger log = Logger.getLogger(NativeServiceObjectFactoryJAXRPC.class);
- /**
- * Creates an object using the location or reference information specified.
- * <p/>
- *
- * @param obj The possibly null object containing location or reference
- * information that can be used in creating an object.
- * @param name The name of this object relative to <code>nameCtx</code>,
- * or null if no name is specified.
- * @param nameCtx The context relative to which the <code>name</code>
- * parameter is specified, or null if <code>name</code> is
- * relative to the default initial context.
- * @param environment The possibly null environment that is used in
- * creating the object.
- * @return The object created; null if an object cannot be created.
- * @throws Exception if this object factory encountered an exception
- * while attempting to create an object, and no other object factories are
- * to be tried.
- * @see javax.naming.spi.NamingManager#getObjectInstance
- * @see javax.naming.spi.NamingManager#getURLContext
- */
- public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception
+ public Object getObjectInstance(final UnifiedServiceRefMetaData serviceRef)
{
try
{
- Reference ref = (Reference)obj;
-
- // Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData serviceRef = null;
- RefAddr metaRefAddr = ref.get(NativeServiceReferenceableJAXRPC.SERVICE_REF_META_DATA);
- ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
- try
- {
- ObjectInputStream ois = new ObjectInputStream(bais);
- serviceRef = (UnifiedServiceRefMetaData)ois.readObject();
- ois.close();
- }
- catch (IOException ex)
- {
- NamingException ne = new NamingException();
- ne.setRootCause(ex);
- throw ne;
- }
-
ServiceImpl jaxrpcService = null;
URL wsdlLocation = serviceRef.getWsdlLocation();
if (wsdlLocation != null)
@@ -149,21 +101,11 @@
ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- // Set any service level properties
- if (serviceRef.getCallProperties().size() > 0)
- {
- Properties callProps = new Properties();
- serviceMetaData.setProperties(callProps);
- for (UnifiedCallPropertyMetaData prop : serviceRef.getCallProperties())
- callProps.setProperty(prop.getPropName(), prop.getPropValue());
- }
-
// The web service client using a port-component-link, the contet is the URL to
// the PortComponentLinkServlet that will return the actual endpoint address
- RefAddr pcLinkRef = ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK);
- if (pcLinkRef != null)
+ String pcLink = getPortComponentLink(serviceRef);
+ if (pcLink != null)
{
- String pcLink = (String)pcLinkRef.getContent();
log.debug("Resolving port-component-link: " + pcLink);
// First try to obtain the endpoint address loacally
@@ -187,7 +129,7 @@
// We may be remote in the esoteric case where an appclient uses the port-comonent-link feature
if (endpointAddress == null)
{
- String servletPath = (String)ref.get(NativeServiceReferenceableJAXRPC.PORT_COMPONENT_LINK_SERVLET).getContent();
+ String servletPath = getPortComponentLinkServlet();
servletPath += "?pcLink=" + URLEncoder.encode(pcLink, "UTF-8");
InputStream is = new URL(servletPath).openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
@@ -242,10 +184,33 @@
catch (Exception ex)
{
NativeLoggers.JAXRPC_LOGGER.cannotCreateService(ex);
- throw ex;
+ throw new RuntimeException(ex);
}
}
+ private String getPortComponentLink(UnifiedServiceRefMetaData refMetaData) {
+ for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
+ {
+ return pcr.getPortComponentLink();
+ }
+ return null;
+ }
+
+ private String getPortComponentLinkServlet() throws Exception {
+ try {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+
+ String host = config.getWebServiceHost();
+ int port = config.getWebServicePort();
+
+ String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
+ return servletURL;
+ } catch (Exception ex) {
+ throw NativeMessages.MESSAGES.cannotObtainPathToPCLServlet(ex);
+ }
+ }
+
/**
* Narrow available endpoints by <port-component-ref> declarations.
* Service.getPort(SEI) must be able to retrieve a distinct port definition.
Deleted: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceRefBinderJAXRPC.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jaxrpc.client.serviceref;
-
-import javax.naming.Referenceable;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
-
-/**
- * Binds a JAXRPC Service object to the client's ENC.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class NativeServiceRefBinderJAXRPC implements ServiceRefBinder
-{
- @Override
- public Referenceable createReferenceable(final UnifiedServiceRefMetaData serviceRefMD)
- {
- return new NativeServiceReferenceableJAXRPC(serviceRefMD);
- }
-}
Deleted: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/serviceref/NativeServiceReferenceableJAXRPC.java 2012-11-13 08:31:21 UTC (rev 16970)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.client.serviceref;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-
-import javax.naming.BinaryRefAddr;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.Referenceable;
-import javax.naming.StringRefAddr;
-
-import org.jboss.ws.NativeMessages;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * A JNDI reference to a javax.xml.rpc.Service
- * <p/>
- * It holds the information to reconstrut the javax.xml.rpc.Service
- * when the client does a JNDI lookup.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public final class NativeServiceReferenceableJAXRPC implements Referenceable
-{
- public static final String SERVICE_REF_META_DATA = "SERVICE_REF_META_DATA";
- public static final String PORT_COMPONENT_LINK = "PORT_COMPONENT_LINK";
- public static final String PORT_COMPONENT_LINK_SERVLET = "PORT_COMPONENT_LINK_SERVLET";
-
- private UnifiedServiceRefMetaData refMetaData;
-
- /**
- * A service referenceable for a WSDL document that is part of the deployment
- */
- public NativeServiceReferenceableJAXRPC(UnifiedServiceRefMetaData refMetaData)
- {
- this.refMetaData = refMetaData;
- }
-
- /**
- * Retrieves the Reference of this object.
- *
- * @return The non-null Reference of this object.
- * @throws javax.naming.NamingException If a naming exception was encountered while retrieving the reference.
- */
- public Reference getReference() throws NamingException
- {
- Reference myRef = new Reference(NativeServiceReferenceableJAXRPC.class.getName(), NativeServiceObjectFactoryJAXRPC.class.getName(), null);
-
- // Add a reference to the ServiceRefMetaData and WSDLDefinitions
- myRef.add(new BinaryRefAddr(SERVICE_REF_META_DATA, marshallServiceRef()));
-
- // Add references to port component links
- for (UnifiedPortComponentRefMetaData pcr : refMetaData.getPortComponentRefs())
- {
- String pcLink = pcr.getPortComponentLink();
- if (pcLink != null)
- {
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK, pcLink));
- try
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
-
- String host = config.getWebServiceHost();
- int port = config.getWebServicePort();
-
- String servletURL = "http://" + host + ":" + port + "/jbossws/pclink";
- myRef.add(new StringRefAddr(PORT_COMPONENT_LINK_SERVLET, servletURL));
- }
- catch (Exception ex)
- {
- throw NativeMessages.MESSAGES.cannotObtainPathToPCLServlet(ex);
- }
- }
- }
-
- return myRef;
- }
-
- /** Marshall the ServiceRefMetaData to an byte array
- */
- private byte[] marshallServiceRef() throws NamingException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
- try
- {
- ObjectOutputStream oos = new ObjectOutputStream(baos);
- oos.writeObject(refMetaData);
- oos.close();
- }
- catch (IOException e)
- {
- throw new NamingException(e.toString());
- }
- return baos.toByteArray();
- }
-
-}
Deleted: stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory
===================================================================
--- stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory 2012-11-13 08:31:21 UTC (rev 16970)
@@ -1 +0,0 @@
-org.jboss.ws.core.client.NativeServiceRefBinderFactoryImpl
\ No newline at end of file
Added: stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
===================================================================
--- stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory (rev 0)
+++ stack/native/branches/ropalka/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory 2012-11-13 08:31:21 UTC (rev 16970)
@@ -0,0 +1 @@
+org.jboss.ws.core.client.NativeServiceRefFactoryFactoryImpl
\ No newline at end of file
Modified: stack/native/branches/ropalka/pom.xml
===================================================================
--- stack/native/branches/ropalka/pom.xml 2012-11-13 08:13:44 UTC (rev 16969)
+++ stack/native/branches/ropalka/pom.xml 2012-11-13 08:31:21 UTC (rev 16970)
@@ -57,8 +57,8 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.1.Final</jbossws.api.version>
- <jbossws.spi.version>2.1.0.Final</jbossws.spi.version>
- <jbossws.common.version>2.1.0.Final</jbossws.common.version>
+ <jbossws.spi.version>2.1.1-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.1.1-SNAPSHOT</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
<jbossws.shared.testsuite.version>4.1.0.Final</jbossws.shared.testsuite.version>
<jbossws.jboss713.version>4.1.1-SNAPSHOT</jbossws.jboss713.version>
12 years, 1 month
JBossWS SVN: r16969 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 03:13:44 -0500 (Tue, 13 Nov 2012)
New Revision: 16969
Added:
stack/native/branches/ropalka/
Log:
WS Ref cleanup branch
12 years, 1 month
JBossWS SVN: r16968 - stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-11-13 03:08:39 -0500 (Tue, 13 Nov 2012)
New Revision: 16968
Added:
stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
Log:
[JBWS-3565] WS Ref SPI clean up
Added: stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory
===================================================================
--- stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory (rev 0)
+++ stack/cxf/branches/ropalka/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.serviceref.ServiceRefFactoryFactory 2012-11-13 08:08:39 UTC (rev 16968)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.client.serviceref.CXFServiceRefFactoryFactoryImpl
\ No newline at end of file
12 years, 1 month