[SCOUT-133] updates site definitions to match jUDDI's theming and corrects release version
[SCOUT-132] fixes debug statements[SCOUT-132] fixes debug statements
[SCOUT-133] updates site definitions to match jUDDI's theming and corrects release version
[SCOUT-134] updates all dependencies and code to match 3.1.5 juddi apis
[SCOUT-135] resolves mappings issues with address line
[SCOUT-136] resolves issues with sort by name with findbinding
NOJIRA signing key
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..2125666
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d4954dd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,22 @@
+target
+**/target/*
+**/derby.log
+**/.project
+**/.classpath
+**/.settings/
+.gradle/
+.svn/
+.idea
+**/*.iml
+docs/db/ddl/*.ddl
+*.ddl
+uddi-tck/pref-rpt-*.txt
+nb-configuration.xml
+*.orig
+uddi-tck/drivers/
+*.releaseBackup
+*.versionsBackup
+**/bin/Debug/*
+**/obj/**
+*.suo
+juddi-client.net/.vs/juddi-client.net/v15/**
diff --git a/KEYS b/KEYS
index 17bdcde..e3b0a17 100644
--- a/KEYS
+++ b/KEYS
@@ -62,3 +62,37 @@
f+bKmTLT7oLzf+sAoIeCfFt8vA6ovF3RkvN05O65WPcD
=5V68
-----END PGP PUBLIC KEY BLOCK-----
+
+
+pub rsa4096 2018-11-23 [SC] [expires: 2023-11-22]
+ 3A1AAFA9B89A1D1DDD5F3A4B98AD2E19BFF4106D
+uid [ultimate] Alex O'Ree <alexoree@apache.org>
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFv3+7oBEADXMQXwYMxs45ePjno3XcOouM5NMCYsKk6qmrCBr2ffLLTPER6M
+9KtyYAqCqe1DQmB0BRau1GuBRN6mydzILjVaJ6B1S+SsDGHOTDpTVyKUKSkQ292X
+KzGq3w5xqvQ1ZP1Iob38XvGQDR2vKnqDeZhVcCsDrbMPBpO3bxCCwrztwHogGZiA
+wejypOGlYz3stRY7SKvFkuuH75An6KGx/C9VDh8EH0tUT3hQ09On1/m6+I/8X3YR
+WUhCj5WuUg9oaI0MCd9CjgKRH7PEnemFhb1iXBxcOn8vC8hRmYqsl54gIhfF9T8P
+HdyTfqji7AKNu3zz3yiiaqlteZewxFyjhwnjvmJMQ+D5Mt9ZfexuDIMY7319psiY
+w8x8CuDb1NPq3vR/P0oo5baldIk2r3K0uOdXBGOls1bbqUTv2V+fFdAzk7qC+kxU
+PrEpkFKMKd2jtkcO/0Qfgn5r5r7aU1AyGRbXT7fySMT2/6GFu4XSrVWBtjFP9u7F
+5ELb19dFaQk6eUCr+ZMTwz5TP6pajDp3NSBX+lXZipYHQEIcwk0P8kSwHwqVUhgr
+uAlyy5E/bvmBxX0nFZVbGwlUedT2OkwhU2FeQKfMG9Ohimpx0qK0XQbRRAaJ8AI9
+ws3rC/RkPdfOZvgIdGScf+aNJNb9/5pnSUx+bpBppg7MhbWTnRkkCR1qsQARAQAB
+tCBBbGV4IE8nUmVlIDxhbGV4b3JlZUBhcGFjaGUub3JnPokCVAQTAQgAPhYhBDoa
+r6m4mh0d3V86S5itLhm/9BBtBQJb9/u6AhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW
+AgMBAh4BAheAAAoJEJitLhm/9BBt8jEQAKU8DFRyiVFVK+k+TwVIFgS7ZF3uV48p
+6I6VSCZUQsWYJWu0LnT8k/vi1lSz3i4080J5vB/8pkuYtJW3Bfv15BcZ6xDg9Asm
+XcAvt/sS315x+TyjBeqvfi3yJEVlCySduc3PeoMVLOZmtPcmbeajAmHh9P1TkZ7g
+f9sXtdzXrnViwMYMs+CN91qlWCfZJopfomEf1aazhJixYfjjh12wwSfLRsa7cHWd
+XeuTdXg7xAOnegLLdfzgzpQdRC67QM6K6GmucqY0dCKIWIgN1UuV5n33336fI0WB
+RR+LKGTZK39l2ddh0iizurJO9QYM4m8FmhVmym2e/2ClY3N1QniXU1a8ZGIPlSIS
+/tbyMYXt+3CiP9P+nyrQKoilCX54L1RdwOrDb7Z1B4DnQqls6MrdEphHtZMdDkeX
+INBX9q3P7J4SrwA5xAbvevaVHJ5mk7rgmG2V1FVGmDeX8ACF4ONfOs4T4C1bTMhw
+SOM+ulVAtr1nsrDZWO7/Kv9LlVXr1/pbOZuRp6ioveQlZZNzzfjLm4WxpeTqeQ4w
+PJzYFhDkrJXyb4GOhnsyVyHclxnMWP3xB0iV4BFyY92SMIPfnaoLoI4sBui+Ua7i
+PUwMIH473BaLm7fvqothns0DAmXYd+VKpAx0zta0ucya0wtBXY0xaz7h4vVHB6zJ
+Ui44RuYe758D
+=LGw7
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/README b/README
index dfdf991..ed3827e 100644
--- a/README
+++ b/README
@@ -87,6 +87,15 @@
dev-subscribe@juddi.apache.org
+Release Notes - Scout - Version 1.2.8
+
+Bug
+
+ [SCOUT-136] - Scout adds sort by name desc to findBinding UDDI requests, which is invalid
+ [SCOUT-135] - Fix for mismatch with UDDI Address Line
+ [SCOUT-134] - Updates dependencies and code to match the jUDDI 3.1.5 APIs
+
+
Release Notes - Scout - Version 1.2.7
Bug
diff --git a/pom.xml b/pom.xml
index a9bb06c..64814fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,825 +1,867 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>6</version>
- </parent>
- <groupId>org.apache.juddi.scout</groupId>
- <artifactId>scout</artifactId>
- <version>1.2.8-SNAPSHOT</version>
- <packaging>bundle</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>19</version>
+ </parent>
+ <groupId>org.apache.juddi.scout</groupId>
+ <artifactId>scout</artifactId>
+ <version>1.2.8-SNAPSHOT</version>
+ <packaging>jar</packaging>
- <properties>
- <juddi.registry.version>3.1.3</juddi.registry.version>
- </properties>
+ <properties>
+ <javadoc.extra.settings />
+ <juddi.registry.version>3.3.6-SNAPSHOT</juddi.registry.version>
+ </properties>
- <prerequisites>
- <maven>3.0.3</maven>
- </prerequisites>
- <name>Apache Scout</name>
- <description>
+ <name>Apache Scout</name>
+ <description>
Apache Scout is an implementation of the JSR 93 - JavaTM API for
XML Registries 1.0 (JAXR)
</description>
- <url>http://juddi.apache.org/scout/</url>
- <issueManagement>
- <system>JIRA</system>
- <url>http://issues.apache.org/jira/browse/SCOUT</url>
- </issueManagement>
- <ciManagement>
- <system>Continuum</system>
- <url>http://vmbuild.apache.org</url>
- <notifiers>
- <notifier>
- <sendOnError>true</sendOnError>
- <sendOnFailure>true</sendOnFailure>
- <sendOnSuccess>true</sendOnSuccess>
- <sendOnWarning>true</sendOnWarning>
- <configuration>
- <address>juddi-dev@apache.org</address>
- </configuration>
- </notifier>
- </notifiers>
- </ciManagement>
- <inceptionYear>2004</inceptionYear>
- <mailingLists>
- <mailingList>
- <name>jUDDI/Scout Developers</name>
- <subscribe>juddi-dev-subscribe@apache.org</subscribe>
- <unsubscribe>juddi-dev-unsubscribe@apache.org</unsubscribe>
- <post>juddi-dev@apache.org</post>
- <archive>http://mail-archives.apache.org/mod_mbox/juddi-dev/</archive>
- </mailingList>
- </mailingLists>
- <developers>
- <developer>
- <id>anil</id>
- <name>Anil Saldhana</name>
- <email>anil@apache.org</email>
- <organization />
- </developer>
- <developer>
- <id>djencks</id>
- <name>David Jencks</name>
- <email>djencks@apache.org</email>
- <organization />
- </developer>
- <developer>
- <id>kstam</id>
- <name>Kurt T Stam</name>
- <email>kstam@apache.org</email>
- <organization />
- </developer>
- <developer>
- <id>jfaath</id>
- <name>Jeff Faath</name>
- <email>jfaath@apache.org</email>
- <organization />
- </developer>
- <developer>
- <name>Steve Viens</name>
- <email>sviens@apache.org</email>
- <organization />
- </developer>
- <developer>
- <id>tcunning</id>
- <name>Tom Cunningham</name>
- <email>tcunning@apache.org</email>
- <organization />
- </developer>
- </developers>
- <contributors>
- <contributor>
- <name>Deepack Bhole</name>
- <email>dbhole@apache.org</email>
- <organization />
- </contributor>
- <contributor>
- <name>Davanum Srinivas</name>
- <email>dims@yahoo.com</email>
- <organization />
- </contributor>
- <contributor>
- <name>Geir Magnusson Jr.</name>
- <email>geirm@apache.org</email>
- <organization />
- </contributor>
- <contributor>
- <name>Lin Sun</name>
- <email>linsun@apache.org</email>
- <organization />
- </contributor>
- <contributor>
- <name>Jarek Gawor</name>
- <email>gawor@apache.org</email>
- <organization />
- </contributor>
- <contributor>
- <name>Jeremy Boynes</name>
- <email>jboynes@apache.org</email>
- <organization />
- </contributor>
- </contributors>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/juddi/scout/trunk</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/juddi/scout/trunk</developerConnection>
- <url>http://svn.apache.org/viewcvs.cgi/juddi/scout/trunk</url>
- </scm>
- <dependencies>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-activation_1.1_spec</artifactId>
- <version>1.0.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jaxb_2.1_spec</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jaxr_1.0_spec</artifactId>
- <version>2.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jaxrpc_1.1_spec</artifactId>
- <version>2.0.0</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-saaj_1.3_spec</artifactId>
- <version>1.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.0_spec</artifactId>
- <version>1.0.1</version>
- </dependency>
+ <url>http://juddi.apache.org/scout/</url>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://issues.apache.org/jira/browse/SCOUT</url>
+ </issueManagement>
+ <ciManagement>
+ <system>Continuum</system>
+ <url>http://vmbuild.apache.org</url>
+ <notifiers>
+ <notifier>
+ <sendOnError>true</sendOnError>
+ <sendOnFailure>true</sendOnFailure>
+ <sendOnSuccess>true</sendOnSuccess>
+ <sendOnWarning>true</sendOnWarning>
+ <configuration>
+ <address>juddi-dev@apache.org</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <inceptionYear>2004</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>jUDDI/Scout Developers</name>
+ <subscribe>juddi-dev-subscribe@apache.org</subscribe>
+ <unsubscribe>juddi-dev-unsubscribe@apache.org</unsubscribe>
+ <post>juddi-dev@apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/juddi-dev/</archive>
+ </mailingList>
+ </mailingLists>
+ <developers>
+ <developer>
+ <id>anil</id>
+ <name>Anil Saldhana</name>
+ <email>anil@apache.org</email>
+ <organization />
+ </developer>
+ <developer>
+ <id>djencks</id>
+ <name>David Jencks</name>
+ <email>djencks@apache.org</email>
+ <organization />
+ </developer>
+ <developer>
+ <id>kstam</id>
+ <name>Kurt T Stam</name>
+ <email>kstam@apache.org</email>
+ <organization />
+ </developer>
+ <developer>
+ <id>jfaath</id>
+ <name>Jeff Faath</name>
+ <email>jfaath@apache.org</email>
+ <organization />
+ </developer>
+ <developer>
+ <name>Steve Viens</name>
+ <email>sviens@apache.org</email>
+ <organization />
+ </developer>
+ <developer>
+ <id>tcunning</id>
+ <name>Tom Cunningham</name>
+ <email>tcunning@apache.org</email>
+ <organization />
+ </developer>
+ </developers>
+ <contributors>
+ <contributor>
+ <name>Deepack Bhole</name>
+ <email>dbhole@apache.org</email>
+ <organization />
+ </contributor>
+ <contributor>
+ <name>Davanum Srinivas</name>
+ <email>dims@yahoo.com</email>
+ <organization />
+ </contributor>
+ <contributor>
+ <name>Geir Magnusson Jr.</name>
+ <email>geirm@apache.org</email>
+ <organization />
+ </contributor>
+ <contributor>
+ <name>Lin Sun</name>
+ <email>linsun@apache.org</email>
+ <organization />
+ </contributor>
+ <contributor>
+ <name>Jarek Gawor</name>
+ <email>gawor@apache.org</email>
+ <organization />
+ </contributor>
+ <contributor>
+ <name>Jeremy Boynes</name>
+ <email>jboynes@apache.org</email>
+ <organization />
+ </contributor>
+ </contributors>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/juddi/scout/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/juddi/scout/trunk</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/juddi/scout/trunk</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxb_2.1_spec</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxr_1.0_spec</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxrpc_1.1_spec</artifactId>
+ <version>2.0.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-saaj_1.3_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ <version>1.0.1</version>
+ </dependency>
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis</artifactId>
- <version>1.4</version>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>org.apache.axis</groupId>
- <artifactId>axis-jaxrpc</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.axis</groupId>
- <artifactId>axis-saaj</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.axis</groupId>
- <artifactId>axis-wsdl4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis-saaj</artifactId>
- <version>1.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis-jaxrpc</artifactId>
- <version>1.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- <version>0.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>logkit</groupId>
- <artifactId>logkit</artifactId>
- </exclusion>
- <exclusion>
- <groupId>avalon-framework</groupId>
- <artifactId>avalon-framework</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-client</artifactId>
- <version>${juddi.registry.version}</version>
- </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.4</version>
+ <optional>true</optional>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis</groupId>
+ <artifactId>axis-wsdl4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ <version>1.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ <version>1.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <version>0.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ <optional>true</optional>
+ <exclusions>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-client</artifactId>
+ <version>${juddi.registry.version}</version>
+ </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.5</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.1.2.1</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.14.2.0</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.17</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.6.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>1.5.2</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <repositories>
- <repository>
- <id>maven2-repository.dev.java.net</id>
- <name>Java.net Maven 2 Repository</name>
- <url>http://download.java.net/maven/2</url>
- <layout>default</layout>
- </repository>
- <repository>
- <id>apache.nexus</id>
- <name>Apache NEXUS Maven 2 Repository</name>
- <url>https://repository.apache.org/content/repositories/releases/</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <version>1.3</version>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.6.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>1.5.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Maven 2 Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ <layout>default</layout>
+ </repository>
+ <repository>
+ <id>apache.nexus</id>
+ <name>Apache NEXUS Maven 2 Repository</name>
+ <url>https://repository.apache.org/content/repositories/releases/</url>
+ <layout>default</layout>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <aggregate>true</aggregate>
+ <additionalparam>${javadoc.extra.settings}</additionalparam>
+ </configuration>
<executions>
<execution>
+ <id>aggregate</id>
<goals>
- <goal>test-compile</goal> <!-- use this goal to weave all your test classes -->
+ <goal>aggregate</goal>
</goals>
+ <phase>site</phase>
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <preparationGoals>clean install</preparationGoals>
- <goals>deploy</goals>
- <releaseProfiles>apache-release</releaseProfiles>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.6</version>
+
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>aspectj-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-compile</goal> <!-- use this goal to weave all your test classes -->
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ <preparationGoals>clean install</preparationGoals>
+ <goals>deploy</goals>
+ <releaseProfiles>apache-release</releaseProfiles>
+ </configuration>
+ </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.0.0-M1</version>
+ <executions>
+ <execution>
+ <id>enforce-versions</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <phase>validate</phase>
+ <configuration>
+ <rules>
-
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>2.0.0</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Import-Package>org.apache.axis.*;resolution:=optional,*</Import-Package>
- </instructions>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>ianal-maven-plugin</artifactId>
- <version>1.0-alpha-1</version>
- </plugin>
-
- </plugins>
- </build>
- <distributionManagement>
- <site>
- <id>website</id>
- <url>scpexe://people.apache.org/www/juddi.apache.org/scout</url>
- </site>
- </distributionManagement>
-
- <profiles>
- <profile>
- <id>uddiv2</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi</artifactId>
- <version>2.0.1</version>
- <scope>test</scope>
- </dependency>
- <!-- have to figure out which dependencies of 3.0.2 make the uddiv2 build work -->
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>uddi-ws</artifactId>
- <version>3.0.2</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <skip>true</skip>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
- <environmentVariables>
- <uddi.version>2</uddi.version>
- </environmentVariables>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <systemProperties>
- <property>
- <name>cactus.contextURL</name>
- <value>http://localhost:8880/juddi</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>uddiv3</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-tomcat</artifactId>
- <version>${juddi.registry.version}</version>
- <scope>test</scope>
- <type>zip</type>
- </dependency>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>uddi-ws</artifactId>
- <version>${juddi.registry.version}</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <id>copy</id>
- <phase>package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-tomcat</artifactId>
- <version>${juddi.registry.version}</version>
- <type>zip</type>
- <outputDirectory>${basedir}/target</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>test</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <unzip dest="target" src="target/juddi-tomcat-${juddi.registry.version}.zip" />
- <copy file="${basedir}/server.xml" todir="target/juddi-tomcat-${juddi.registry.version}/conf" overwrite="true" />
- <copy file="${basedir}/log4j.properties" todir="target/juddi-tomcat-${juddi.registry.version}/webapps/juddiv3/WEB-INF/classes" overwrite="true" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <wait>false</wait>
- <container>
- <containerId>tomcat6x</containerId>
- <home>${basedir}/target/juddi-tomcat-${juddi.registry.version}</home>
- </container>
- <configuration>
- <type>existing</type>
- <home>${project.build.directory}/juddi-tomcat-${juddi.registry.version}</home>
- <properties>
- <cargo.logging>high</cargo.logging>
- <cargo.hostname>localhost</cargo.hostname>
- <cargo.servlet.port>8880</cargo.servlet.port>
- <cargo.jvmargs>-Xms256m -Xmx256m -XX:MaxPermSize=256M</cargo.jvmargs>
- </properties>
- </configuration>
- </configuration>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <skip>true</skip>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
- <environmentVariables>
- <uddi.version>3</uddi.version>
- </environmentVariables>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <systemProperties>
- <property>
- <name>cactus.contextURL</name>
- <value>http://localhost:8880/juddi</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>apache-release</id>
- <activation>
- <property>
- <name>apache-release</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi</artifactId>
- <version>2.0.1</version>
- <scope>test</scope>
- </dependency>
- <!-- have to figure out which dependencies of 3.0.2 make the uddiv2 build work -->
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>uddi-ws</artifactId>
- <version>3.0.2</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-4</version>
- <executions>
- <execution>
- <goals>
- <goal>single</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
- <descriptorRefs>
- <descriptorRef>
- source-release
- </descriptorRef>
- </descriptorRefs>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <!-- apache version not yet released -->
- <!--<groupId>org.apache</groupId> -->
- <groupId>org.apache.geronimo.genesis</groupId>
- <artifactId>apache-source-release-assembly-descriptor</artifactId>
- <!-- apache version not yet known -->
- <version>2.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <skip>true</skip>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
- <environmentVariables>
- <uddi.version>2</uddi.version>
- </environmentVariables>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
+ <requireMavenVersion>
+ <version>[3.0.3,)</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
<configuration>
- <skip>false</skip>
- <systemProperties>
- <property>
- <name>cactus.contextURL</name>
- <value>http://localhost:8880/juddi</value>
- </property>
- <property>
- <name>java.io.tmpdir</name>
- <value>${basedir}/temp</value>
- </property>
- </systemProperties>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
- </execution>
- </executions>
- </plugin>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.0.0</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Import-Package>org.apache.axis.*;resolution:=optional,*</Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ianal-maven-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ </plugin>
+ </plugins>
+ </build>
+ <distributionManagement>
+ <site>
+ <id>website</id>
+ <url>scpexe://people.apache.org/www/juddi.apache.org/scout</url>
+ </site>
+ </distributionManagement>
+
+ <profiles>
+ <profile>
+ <id>doclint-java8-disable</id>
+ <activation>
+ <jdk>[1.8,)</jdk>
+ </activation>
+
+
+ <properties>
+ <javadoc.extra.settings>-Xdoclint:none</javadoc.extra.settings>
+ </properties>
+ </profile>
+ <profile>
+ <id>uddiv2</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- have to figure out which dependencies of 3.0.2 make the uddiv2 build work -->
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-ws</artifactId>
+ <version>${juddi.registry.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <systemProperties>
+ <property>
+ <name>derby.stream.error.file</name>
+ <value>target/derby.log</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ <environmentVariables>
+ <uddi.version>2</uddi.version>
+ </environmentVariables>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <systemProperties>
+ <property>
+ <name>cactus.contextURL</name>
+ <value>http://localhost:8880/juddi</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>uddiv3</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-tomcat</artifactId>
+ <version>${juddi.registry.version}</version>
+ <scope>test</scope>
+ <type>zip</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-ws</artifactId>
+ <version>${juddi.registry.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-tomcat</artifactId>
+ <version>${juddi.registry.version}</version>
+ <type>zip</type>
+ <outputDirectory>${basedir}/target</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>test</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <unzip dest="target" src="target/juddi-tomcat-${juddi.registry.version}.zip" />
+ <copy file="${basedir}/server.xml" todir="target/juddi-tomcat-${juddi.registry.version}/conf" overwrite="true" />
+ <copy file="${basedir}/log4j.properties" todir="target/juddi-tomcat-${juddi.registry.version}/webapps/juddiv3/WEB-INF/classes" overwrite="true" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.7.0</version>
+
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <wait>false</wait>
+ <container>
+ <containerId>tomcat9x</containerId>
+ <home>${basedir}/target/juddi-tomcat-${juddi.registry.version}</home>
+ </container>
+ <configuration>
+ <type>existing</type>
+ <home>${project.build.directory}/juddi-tomcat-${juddi.registry.version}</home>
+ <properties>
+ <cargo.logging>high</cargo.logging>
+ <cargo.hostname>localhost</cargo.hostname>
+ <cargo.servlet.port>8880</cargo.servlet.port>
+ <cargo.jvmargs>-Xms256m -Xmx256m -XX:MaxPermSize=256M</cargo.jvmargs>
+ </properties>
+ </configuration>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ <configuration>
+ <container>
+ <containerId>tomcat9x</containerId>
+ </container>
+ <configuration>
+ <properties>
+ <cargo.servlet.port>8880</cargo.servlet.port>
+ </properties>
+ <home>${project.build.directory}/juddi-tomcat-${juddi.registry.version}</home>
+ </configuration>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <systemProperties>
+ <property>
+ <name>derby.stream.error.file</name>
+ <value>target/derby.log</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ <environmentVariables>
+ <uddi.version>3</uddi.version>
+ </environmentVariables>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <systemProperties>
+ <property>
+ <name>cactus.contextURL</name>
+ <value>http://localhost:8880/juddi</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>apache-release</id>
+ <activation>
+ <property>
+ <name>apache-release</name>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- have to figure out which dependencies of 3.0.2 make the uddiv2 build work -->
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-ws</artifactId>
+ <version>${juddi.registry.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
+ <descriptorRefs>
+ <descriptorRef>
+ source-release
+ </descriptorRef>
+ </descriptorRefs>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <!-- apache version not yet released -->
+ <!--<groupId>org.apache</groupId> -->
+ <groupId>org.apache.geronimo.genesis</groupId>
+ <artifactId>apache-source-release-assembly-descriptor</artifactId>
+ <!-- apache version not yet known -->
+ <version>2.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <systemProperties>
+ <property>
+ <name>derby.stream.error.file</name>
+ <value>target/derby.log</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ <environmentVariables>
+ <uddi.version>2</uddi.version>
+ </environmentVariables>
+ </configuration>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <systemProperties>
+ <property>
+ <name>cactus.contextURL</name>
+ <value>http://localhost:8880/juddi</value>
+ </property>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${basedir}/temp</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>testcache</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- <property>
- <name>testcache</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>pertest</forkMode>
- <argLine>-javaagent:${settings.localRepository}/aspectj/aspectjweaver/1.5.2/aspectjweaver-1.5.2.jar</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>testcache</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>testcache</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ <argLine>-javaagent:${settings.localRepository}/aspectj/aspectjweaver/1.5.2/aspectjweaver-1.5.2.jar</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.5</version>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
- <reportSets>
- <reportSet>
- <reports>
- <report>javadoc</report>
- <report>test-javadoc</report>
- </reports>
- </reportSet>
- </reportSets>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
- <configuration>
- <quiet>true</quiet>
- <tags>
- <tag>
- <name>goal</name>
- <placement>Xt</placement>
- </tag>
- <tag>
- <name>phase</name>
- <placement>Xt</placement>
- </tag>
- <tag>
- <name>execute</name>
- <placement>Xt</placement>
- </tag>
- <tag>
- <name>requiresDependencyResolution</name>
- <placement>Xt</placement>
- </tag>
- <tag>
- <name>parameter</name>
- <placement>Xf</placement>
- </tag>
- <tag>
- <name>required</name>
- <placement>Xf</placement>
- </tag>
- <tag>
- <name>readonly</name>
- <placement>Xf</placement>
- </tag>
- <tag>
- <name>component</name>
- <placement>Xf</placement>
- </tag>
- <tag>
- <name>plexus.component</name>
- <placement>Xf</placement>
- </tag>
- <tag>
- <name>plexus.requirement</name>
- <placement>Xf</placement>
- </tag>
- </tags>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <version>3.11.0</version>
+ <configuration>
+ <sourceEncoding>utf-8</sourceEncoding>
+ <minimumTokens>100</minimumTokens>
+ <targetJdk>1.5</targetJdk>
+ <linkXRef>true</linkXRef>
+ </configuration>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.9</version>
+ <configuration>
+ <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+ </configuration>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <sourceEncoding>utf-8</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>1.5</targetJdk>
- <linkXRef>true</linkXRef>
- </configuration>
- </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.22.1</version>
+ </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <quiet>true</quiet>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- <version>2.0-beta-2</version>
- </plugin>
- </plugins>
- </reporting>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <quiet>true</quiet>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>3.0.5</version>
+ <configuration>
+ <xmlOutput>true</xmlOutput>
+ <!-- Optional directory to put findbugs xdoc xml report -->
+ <xmlOutputDirectory>target/site</xmlOutputDirectory>
+ </configuration>
+ </plugin>
+ <!-- doesn't work with asf<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <version>2.12.1</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>jira-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ -->
+ </plugins>
+ </reporting>
</project>
diff --git a/server.xml b/server.xml
index 6c98bd7..8260211 100644
--- a/server.xml
+++ b/server.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -20,14 +20,16 @@
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
-
+ <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
+ <!-- Security listener. Documentation at /docs/config/listeners.html
+ <Listener className="org.apache.catalina.security.SecurityListener" />
+ -->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
- <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
- <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
+ <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+ <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+ <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
@@ -44,44 +46,70 @@
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
- a single "Container" Note: A "Service" is not itself a "Container",
+ a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
-
+
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
+ <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
-
-
+
+
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
- Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
+ Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
- Define a non-SSL HTTP/1.1 Connector on port 8080
+ Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
- <Connector port="8880" protocol="HTTP/1.1"
- connectionTimeout="20000"
+ <Connector port="8880" protocol="HTTP/1.1"
+ connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
- port="8080" protocol="HTTP/1.1"
- connectionTimeout="20000"
+ port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
redirectPort="8443" />
- -->
- <!-- Define a SSL HTTP/1.1 Connector on port 8443
- This connector uses the JSSE configuration, when using APR, the
- connector should be using the OpenSSL style configuration
- described in the APR documentation -->
+ -->
+ <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
+ This connector uses the NIO implementation. The default
+ SSLImplementation will depend on the presence of the APR/native
+ library and the useOpenSSL attribute of the
+ AprLifecycleListener.
+ Either JSSE or OpenSSL style configuration may be used regardless of
+ the SSLImplementation selected. JSSE style configuration is used below.
+ -->
<!--
- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
- maxThreads="150" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS" />
+ <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
+ maxThreads="150" SSLEnabled="true">
+ <SSLHostConfig>
+ <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
+ type="RSA" />
+ </SSLHostConfig>
+ </Connector>
+ -->
+ <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
+ This connector uses the APR/native implementation which always uses
+ OpenSSL for TLS.
+ Either JSSE or OpenSSL style configuration may be used. OpenSSL style
+ configuration is used below.
+ -->
+ <!--
+ <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
+ maxThreads="150" SSLEnabled="true" >
+ <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
+ <SSLHostConfig>
+ <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
+ certificateFile="conf/localhost-rsa-cert.pem"
+ certificateChainFile="conf/localhost-rsa-chain.pem"
+ type="RSA" />
+ </SSLHostConfig>
+ </Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
@@ -95,8 +123,8 @@
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
- <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
- -->
+ <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
+ -->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
@@ -104,39 +132,34 @@
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
- -->
-
- <!-- The request dumper valve dumps useful debugging information about
- the request and response data received and sent by Tomcat.
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
- <!-- This Realm uses the UserDatabase configured in the global JNDI
- resources under the key "UserDatabase". Any edits
- that are performed against this UserDatabase are immediately
- available for use by the Realm. -->
- <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
- resourceName="UserDatabase"/>
+ <!-- Use the LockOutRealm to prevent attempts to guess user passwords
+ via a brute-force attack -->
+ <Realm className="org.apache.catalina.realm.LockOutRealm">
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ resourceName="UserDatabase"/>
+ </Realm>
- <!-- Define the default virtual host
- Note: XML Schema validation will not work with Xerces 2.2.
- -->
<Host name="localhost" appBase="webapps"
- unpackWARs="true" autoDeploy="true"
- xmlValidation="false" xmlNamespaceAware="false">
+ unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
+ <!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+ -->
<!-- Access log processes all example.
- Documentation at: /docs/config/valve.html -->
- <!--
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
- -->
+ Documentation at: /docs/config/valve.html
+ Note: The pattern used is equivalent to using pattern="common" -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ prefix="localhost_access_log" suffix=".txt"
+ pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
diff --git a/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java b/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
index f85a182..58bce2d 100644
--- a/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
+++ b/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
@@ -333,7 +333,7 @@
List<TModel> tmodelList = td.getTModel();
entityarr = new TModel[tmodelList.size()];
tmodelList.toArray(entityarr);
- log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving TModel. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
TModel tm = (TModel) entityarr[i];
coll.add(new KeyImpl(tm.getTModelKey()));
@@ -382,7 +382,7 @@
entityarr = new TModel[tmodelList.size()];
tmodelList.toArray(entityarr);
- log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving TModel. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
TModel tm = (TModel) entityarr[i];
coll.add(new KeyImpl(tm.getTModelKey()));
@@ -433,7 +433,7 @@
entityarr = new BusinessEntity[bizEntityList.size()];
bizEntityList.toArray(entityarr);
- log.debug("After Saving Business. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving Business. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
BusinessEntity entity = (BusinessEntity) entityarr[i];
coll.add(new KeyImpl(entity.getBusinessKey()));
@@ -803,7 +803,7 @@
keyResultArr = new Result[resultList.size()];
resultList.toArray(keyResultArr);
- log.debug("After deleting Business. Obtained vector size:" + keyResultArr != null ? keyResultArr.length : 0);
+ log.debug("After deleting Business. Obtained vector size:" + ((keyResultArr != null) ? keyResultArr.length : 0));
for (int i = 0; keyResultArr != null && i < keyResultArr.length; i++) {
Result result = (Result) keyResultArr[i];
int errno = result.getErrno();
diff --git a/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.java b/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.java
index ea9c850..c8eee4f 100644
--- a/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.java
+++ b/src/main/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerV3Impl.java
@@ -332,7 +332,7 @@
List<TModel> tmodelList = td.getTModel();
entityarr = new TModel[tmodelList.size()];
tmodelList.toArray(entityarr);
- log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving TModel. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
TModel tm = (TModel) entityarr[i];
coll.add(new KeyImpl(tm.getTModelKey()));
@@ -381,7 +381,7 @@
entityarr = new TModel[tmodelList.size()];
tmodelList.toArray(entityarr);
- log.debug("After Saving TModel. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving TModel. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
TModel tm = (TModel) entityarr[i];
coll.add(new KeyImpl(tm.getTModelKey()));
@@ -431,7 +431,7 @@
entityarr = new BusinessEntity[bizEntityList.size()];
bizEntityList.toArray(entityarr);
- log.debug("After Saving Business. Obtained vector size:" + entityarr != null ? entityarr.length : 0);
+ log.debug("After Saving Business. Obtained vector size:" + ((entityarr != null) ? entityarr.length : 0));
for (int i = 0; entityarr != null && i < entityarr.length; i++) {
BusinessEntity entity = (BusinessEntity) entityarr[i];
coll.add(new KeyImpl(entity.getBusinessKey()));
@@ -829,7 +829,7 @@
keyResultArr = new Result[resultList.size()];
resultList.toArray(keyResultArr);
- log.debug("After deleting Business. Obtained vector size:" + keyResultArr != null ? keyResultArr.length : 0);
+ log.debug("After deleting Business. Obtained vector size:" + ((keyResultArr != null) ? keyResultArr.length : 0));
for (int i = 0; keyResultArr != null && i < keyResultArr.length; i++) {
Result result = (Result) keyResultArr[i];
int errno = result.getErrno();
diff --git a/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java b/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
index 6d2be0d..0d0daf3 100644
--- a/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
+++ b/src/main/java/org/apache/ws/scout/registry/ConnectionImpl.java
@@ -28,7 +28,7 @@
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.juddi.v3.client.config.UDDIClerkManager;
+import org.apache.juddi.v3.client.config.UDDIClient;
/**
* Apache Scout Implementation of a JAXR Connection.
@@ -52,7 +52,7 @@
private final String postalScheme;
private final int maxRows;
private String uddiVersion;
- UDDIClerkManager manager = null;
+ UDDIClient manager = null;
public ConnectionImpl(Properties properties) throws InvalidRequestException
{
@@ -77,7 +77,7 @@
String managerName = null;
if (manager==null && uddiConfigFile!=null) {
try {
- manager = new UDDIClerkManager(uddiConfigFile, properties);
+ manager = new UDDIClient(uddiConfigFile, properties);
manager.start();
} catch (ConfigurationException e) {
log.error(e.getMessage(),e);
diff --git a/src/main/java/org/apache/ws/scout/registry/Constants.java b/src/main/java/org/apache/ws/scout/registry/Constants.java
index 07dcda5..4ee64b5 100644
--- a/src/main/java/org/apache/ws/scout/registry/Constants.java
+++ b/src/main/java/org/apache/ws/scout/registry/Constants.java
@@ -43,14 +43,14 @@
* UDDI Type Taxonomy [uddi-org:types] This taxonomy assists in general
* categorization of the tModels themselves.
*/
- public static final String TMODEL_TYPES_TMODEL_KEY = "UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4";
+ public static final String TMODEL_TYPES_TMODEL_KEY = "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4";
/**
* Business Taxonomy: NAICS (1997 Release) [ntis-gov:naics:1997] This tModel
* defines the NAICS (North American Industry Classification System) 1997
* Release industry taxonomy.
*/
- public static final String TMODEL_NAICS_TMODEL_KEY = "UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2";
+ public static final String TMODEL_NAICS_TMODEL_KEY = "uuid:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2";
/**
* Product Taxonomy: UNSPSC (Version 3.1) [unspsc-org:unspsc:3-1] This
@@ -59,26 +59,26 @@
* superceeded by the Universal Standard Products and Services
* Classification (see {@link #TMODEL_UNSPSC_73_TMODEL_KEY}) taxonomy.
*/
- public static final String TMODEL_UNSPSC_TMODEL_KEY = "UUID:DB77450D-9FA8-45D4-A7BC-04411D14E384";
+ public static final String TMODEL_UNSPSC_TMODEL_KEY = "uuid:DB77450D-9FA8-45D4-A7BC-04411D14E384";
/**
* Product and Services Taxonomy:UNSPSC (Version 7.3) [unspsc-org:unspsc]
* This tModel defines the UNSPSC (Universal Standard Products and Services
* Classification) version 7.3 product and services taxonomy.
*/
- public static final String TMODEL_UNSPSC_73_TMODEL_KEY = "UUID:CD153257-086A-4237-B336-6BDCBDCC6634";
+ public static final String TMODEL_UNSPSC_73_TMODEL_KEY = "uuid:CD153257-086A-4237-B336-6BDCBDCC6634";
/**
* ISO 3166 Geographic Taxonomy [uddi-org:iso-ch:3166-1999] This tModel
* defines the ISO 3166 geographic classification taxonomy.
*/
- public static final String TMODEL_ISO_CH_TMODEL_KEY = "UUID:4E49A8D6-D5A2-4FC2-93A0-0411D8D19E88";
+ public static final String TMODEL_ISO_CH_TMODEL_KEY = "uuid:4E49A8D6-D5A2-4FC2-93A0-0411D8D19E88";
/**
* UDDI Other Taxonomy [uddi-org:misc-taxomony] This tModel defines an
* unidentified taxonomy.
*/
- public static final String TMODEL_GENERAL_KEYWORDS_TMODEL_KEY = "UUID:A035A07C-F362-44dd-8F95-E2B134BF43B4";
+ public static final String TMODEL_GENERAL_KEYWORDS_TMODEL_KEY = "uuid:A035A07C-F362-44dd-8F95-E2B134BF43B4";
/**
* UDDI Owning Business [uddi-org:owningBusiness] This tModel identifies the
@@ -86,79 +86,79 @@
* tModels to establish an 'owned' relationship with a registered
* businessEntity.
*/
- public static final String TMODEL_OWNING_BUSINESS_TMODEL_KEY = "UUID:4064C064-6D14-4F35-8953-9652106476A9";
+ public static final String TMODEL_OWNING_BUSINESS_TMODEL_KEY = "uuid:4064C064-6D14-4F35-8953-9652106476A9";
/**
* UDDI businessEntity relationship [uddi-org:relationships] This tModel is
* used to describe business relationships. Used in the publisher assertion
* messages.
*/
- public static final String TMODEL_RELATIONSHIPS_TMODEL_KEY = "UUID:807A2C6A-EE22-470D-ADC7-E0424A337C03";
+ public static final String TMODEL_RELATIONSHIPS_TMODEL_KEY = "uuid:807A2C6A-EE22-470D-ADC7-E0424A337C03";
/**
* UDDI Operators [uddi-org:operators] This checked value set is used to
* identify UDDI operators.
*/
- public static final String TMODEL_OPERATORS_TMODEL_KEY = "UUID:327A56F0-3299-4461-BC23-5CD513E95C55";
+ public static final String TMODEL_OPERATORS_TMODEL_KEY = "uuid:327A56F0-3299-4461-BC23-5CD513E95C55";
/**
* D-U-N-S� Number Identifier System [dnb-com:D-U-N-S] This tModel is used
* for the Dun & Bradstreet D-U-N-S� Number identifier.
*/
- public static final String TMODEL_D_U_N_S_TMODEL_KEY = "UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823";
+ public static final String TMODEL_D_U_N_S_TMODEL_KEY = "uuid:8609C81E-EE1F-4D5A-B202-3EB13AD01823";
/**
* Thomas Register Supplier Identifier Code System
* [thomasregister-com:supplierID] This tModel is used for the Thomas
* Register supplier identifier codes.
*/
- public static final String TMODEL_THOMAS_REGISTER_TMODEL_KEY = "UUID:B1B1BAF5-2329-43E6-AE13-BA8E97195039";
+ public static final String TMODEL_THOMAS_REGISTER_TMODEL_KEY = "uuid:B1B1BAF5-2329-43E6-AE13-BA8E97195039";
/**
* UDDI IsReplacedBy [uddi-org:isReplacedBy] An identifier system used to
* point (using UDDI keys) to the tModel (or businessEntity) that is the
* logical replacement for the one in which isReplacedBy is used.
*/
- public static final String TMODEL_IS_REPLACED_BY_TMODEL_KEY = "UUID:E59AE320-77A5-11D5-B898-0004AC49CC1E";
+ public static final String TMODEL_IS_REPLACED_BY_TMODEL_KEY = "uuid:E59AE320-77A5-11D5-B898-0004AC49CC1E";
/**
* Email based web service [uddi-org:smtp] This tModel is used to describe a
* web service that is invoked through SMTP email transmissions. These
* transmissions may be between people or applications.
*/
- public static final String TMODEL_SMTP_TMODEL_KEY = "UUID:93335D49-3EFB-48A0-ACEA-EA102B60DDC6";
+ public static final String TMODEL_SMTP_TMODEL_KEY = "uuid:93335D49-3EFB-48A0-ACEA-EA102B60DDC6";
/**
* Fax based web service [uddi-org:fax] This tModel is used to describe a
* web service that is invoked through fax transmissions. These
* transmissions may be between people or applications.
*/
- public static final String TMODEL_FAX_TMODEL_KEY = "UUID:1A2B00BE-6E2C-42F5-875B-56F32686E0E7";
+ public static final String TMODEL_FAX_TMODEL_KEY = "uuid:1A2B00BE-6E2C-42F5-875B-56F32686E0E7";
/**
* FTP based web service [uddi-org:ftp] This tModel is used to describe a
* web service that is invoked through file transfers via the ftp protocol.
*/
- public static final String TMODEL_FTP_TMODEL_KEY = "UUID:5FCF5CD0-629A-4C50-8B16-F94E9CF2A674";
+ public static final String TMODEL_FTP_TMODEL_KEY = "uuid:5FCF5CD0-629A-4C50-8B16-F94E9CF2A674";
/**
* Telephone based web service [uddi-org:telephone] This tModel is used to
* describe a web service that is invoked through a telephone call and
* interaction by voice and/or touch-tone.
*/
- public static final String TMODEL_TELEPHONE_TMODEL_KEY = "UUID:38E12427-5536-4260-A6F9-B5B530E63A07";
+ public static final String TMODEL_TELEPHONE_TMODEL_KEY = "uuid:38E12427-5536-4260-A6F9-B5B530E63A07";
/**
* Web browser or HTTP based web service [uddi-org:http] This tModel is used
* to describe a web service that is invoked through a web browser and/or
* the HTTP protocol.
*/
- public static final String TMODEL_HTTP_TMODEL_KEY = "UUID:68DE9E80-AD09-469D-8A37-088422BFBC36";
+ public static final String TMODEL_HTTP_TMODEL_KEY = "uuid:68DE9E80-AD09-469D-8A37-088422BFBC36";
/**
* HTTP Web Home Page URL [uddi-org:homepage] This tModel is used as the
* bindingTemplate fingerprint for a web home page reference.
*/
- public static final String TMODEL_HOMEPAGE_TMODEL_KEY = "UUID:4CEC1CEF-1F68-4B23-8CB7-8BAA763AEB89";
+ public static final String TMODEL_HOMEPAGE_TMODEL_KEY = "uuid:4CEC1CEF-1F68-4B23-8CB7-8BAA763AEB89";
}
diff --git a/src/main/java/org/apache/ws/scout/registry/IRegistryV3.java b/src/main/java/org/apache/ws/scout/registry/IRegistryV3.java
index 9c21765..ed305ff 100644
--- a/src/main/java/org/apache/ws/scout/registry/IRegistryV3.java
+++ b/src/main/java/org/apache/ws/scout/registry/IRegistryV3.java
@@ -214,11 +214,19 @@
throws RegistryV3Exception;
/**
+ *
* "Used to locate specific bindings within a registered
* businessService. Returns a bindingDetail message."
*
* @exception RegistryV3Exception
- */
+ * @param serviceKey
+ * @param categoryBag
+ * @param tModelBag
+ * @param findQualifiers
+ * @param maxRows
+ * @return
+ * @throws RegistryV3Exception
+ */
BindingDetail findBinding(String serviceKey,CategoryBag categoryBag,TModelBag tModelBag,FindQualifiers findQualifiers,int maxRows)
throws RegistryV3Exception;
diff --git a/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java b/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
index 9d42986..333861c 100644
--- a/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
+++ b/src/main/java/org/apache/ws/scout/registry/RegistryV3Impl.java
@@ -709,12 +709,12 @@
}
request.setMaxRows(maxRows);
- BindingDetail bd = null;
- JAXBElement<?> o = execute(this.objectFactory.createFindBinding(request),
- this.getInquiryURI());
- if (o != null) bd = (BindingDetail) o.getValue();
+ BindingDetail bd = null;
+ JAXBElement<?> o = execute(this.objectFactory.createFindBinding(request),
+ this.getInquiryURI());
+ if (o != null) bd = (BindingDetail) o.getValue();
- return bd;
+ return bd;
}
/**
@@ -1084,9 +1084,11 @@
if (businessArray != null) {
for (int i = 0; i < businessArray.length; i++) {
BusinessEntity be = businessArray[i];
- if (be.getBusinessServices().getBusinessService().size() == 0) {
- be.setBusinessServices(null);
- }
+ if (be.getBusinessServices()!=null)
+
+ if (be.getBusinessServices().getBusinessService().size() == 0) {
+ be.setBusinessServices(null);
+ }
}
request.getBusinessEntity().addAll(Arrays.asList(businessArray));
diff --git a/src/main/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java b/src/main/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java
index fc8ee9e..58b4f48 100644
--- a/src/main/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java
+++ b/src/main/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java
@@ -20,7 +20,7 @@
/**
* Implements JAXR Interface.
- * For futher details, look into the JAXR API Javadoc.
+ * For further details, look into the JAXR API Javadoc.
*
* @author Anil Saldhana <anil@apache.org>
*/
diff --git a/src/main/java/org/apache/ws/scout/util/EnumerationHelper.java b/src/main/java/org/apache/ws/scout/util/EnumerationHelper.java
index 156f8bb..eea4c1c 100644
--- a/src/main/java/org/apache/ws/scout/util/EnumerationHelper.java
+++ b/src/main/java/org/apache/ws/scout/util/EnumerationHelper.java
@@ -45,7 +45,7 @@
private static Log log = LogFactory.getLog(EnumerationHelper.class);
- private final static String UDDI_ORG_TYPES = "C1ACF26D-9672-4404-9D70-39B756E62AB4";
+ private final static String UDDI_ORG_TYPES = "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4";
private final static String OBJECT_TYPE = "ObjectType";
private final static String ASSOCIATION_TYPE = "AssociationType";
private final static String URL_TYPE = "URLType";
@@ -120,7 +120,7 @@
throws JAXRException, IllegalArgumentException
{
if (!TYPES_LIST.contains(firstToken)) throw new IllegalArgumentException("Expected the path to " +
- "start with one of " + TYPES);
+ "start with one of " + Arrays.toString(TYPES));
//get the predefined classificationscheme
ClassificationScheme cs = new ClassificationSchemeImpl(null);
@@ -129,7 +129,7 @@
ArrayList<String> conceptStrings = typesMap.get(firstToken);
if (!conceptStrings.contains(secondToken)) throw new IllegalArgumentException("Expected the path to " +
- "end with one of " + conceptStrings.toArray());
+ "end with one of " + Arrays.toString(conceptStrings.toArray()));
Concept concept = new ConceptImpl(null);
concept.setName(new InternationalStringImpl(secondToken.toLowerCase()));
diff --git a/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java b/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
index ede6768..d0e4e79 100644
--- a/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
+++ b/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
@@ -84,19 +84,17 @@
* @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
* @author <a href="mailto:tcunning@apache.org">Tom Cunningham</a>
*/
-public class ScoutJaxrUddiHelper
-{
+public class ScoutJaxrUddiHelper {
+
private static final String UDDI_ORG_TYPES = "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4";
- private static Log log = LogFactory.getLog(ScoutJaxrUddiHelper.class);
- private static ObjectFactory objectFactory = new ObjectFactory();
-
+ private static Log log = LogFactory.getLog(ScoutJaxrUddiHelper.class);
+ private static ObjectFactory objectFactory = new ObjectFactory();
+
/**
* Get UDDI Address given JAXR Postal Address
*/
- public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
- Address address = objectFactory.createAddress();
-
- AddressLine[] addarr = new AddressLine[6];
+ public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
+ Address address = objectFactory.createAddress();
String stnum = postalAddress.getStreetNumber();
String st = postalAddress.getStreet();
@@ -105,116 +103,119 @@
String code = postalAddress.getPostalCode();
String state = postalAddress.getStateOrProvince();
- AddressLine stnumAL = objectFactory.createAddressLine();
- stnumAL.setKeyName("STREET_NUMBER");
- if (stnum != null) {
- stnumAL.setKeyValue(stnum);
- }
+ if (stnum != null && stnum.length() > 0) {
+ AddressLine stnumAL = objectFactory.createAddressLine();
+ stnumAL.setValue(stnum);
+ stnumAL.setKeyValue("STREET_NUMBER");
+ stnumAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ address.getAddressLine().add(stnumAL);
+ }
- AddressLine stAL = objectFactory.createAddressLine();
- stAL.setKeyName("STREET");
- if (st != null) {
- stAL.setKeyValue(st);
- }
+ if (st != null && st.length() > 0) {
+ AddressLine stAL = objectFactory.createAddressLine();
+ stAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ stAL.setValue(st);
+ stAL.setKeyValue("STREET");
+ address.getAddressLine().add(stAL);
+ }
- AddressLine cityAL = objectFactory.createAddressLine();
- cityAL.setKeyName("CITY");
- if (city != null) {
- cityAL.setKeyValue(city);
- }
+ if (city != null && city.length() > 0) {
+ AddressLine cityAL = objectFactory.createAddressLine();
+ cityAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ cityAL.setValue(city);
+ cityAL.setKeyValue("CITY");
+ address.getAddressLine().add(cityAL);
+ }
- AddressLine countryAL = objectFactory.createAddressLine();
- countryAL.setKeyName("COUNTRY");
- if (country != null) {
- countryAL.setKeyValue(country);
- }
+ if (country != null && country.length() > 0) {
+ AddressLine countryAL = objectFactory.createAddressLine();
+ countryAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ countryAL.setValue(country);
+ countryAL.setKeyValue("COUNTRY");
+ address.getAddressLine().add(countryAL);
+ }
- AddressLine codeAL = objectFactory.createAddressLine();
- codeAL.setKeyName("POSTALCODE");
- if (code != null) {
- codeAL.setKeyValue(code);
- }
+ if (code != null && code.length() > 0) {
+ AddressLine codeAL = objectFactory.createAddressLine();
+ codeAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ codeAL.setValue(code);
+ codeAL.setKeyValue("POSTALCODE");
+ address.getAddressLine().add(codeAL);
- AddressLine stateAL = objectFactory.createAddressLine();
- stateAL.setKeyName("STATE");
- if (state != null) {
- stateAL.setKeyValue(state);
- }
+ }
- // Add the AddressLine to vector
- addarr[0] = stnumAL;
- addarr[1] = stAL;
- addarr[2] = cityAL;
- addarr[3] = countryAL;
- addarr[4] = codeAL;
- addarr[5] = stateAL;
-
- address.getAddressLine().addAll(Arrays.asList(addarr));
+ if (state != null && state.length() > 0) {
+ AddressLine stateAL = objectFactory.createAddressLine();
+ stateAL.setKeyName("uuid:48eb2518-c1bd-354f-92c9-21a53b0ff2b1");
+ stateAL.setValue(state);
+ stateAL.setKeyValue("STATE");
+ address.getAddressLine().add(stateAL);
+ }
return address;
}
- public static BindingTemplate getBindingTemplateFromJAXRSB(
- ServiceBinding serviceBinding) throws JAXRException {
- BindingTemplate bt = objectFactory.createBindingTemplate();
- if (serviceBinding.getKey() != null && serviceBinding.getKey().getId() != null) {
- bt.setBindingKey(serviceBinding.getKey().getId());
- } else {
- bt.setBindingKey("");
- }
-
- try {
- // Set Access URI
+ public static BindingTemplate getBindingTemplateFromJAXRSB(
+ ServiceBinding serviceBinding) throws JAXRException {
+ BindingTemplate bt = objectFactory.createBindingTemplate();
+ if (serviceBinding.getKey() != null && serviceBinding.getKey().getId() != null) {
+ bt.setBindingKey(serviceBinding.getKey().getId());
+ } else {
+ bt.setBindingKey("");
+ }
+
+ try {
+ // Set Access URI
String accessuri = serviceBinding.getAccessURI();
- if (accessuri != null) {
- AccessPoint accessPoint = objectFactory.createAccessPoint();
+ if (accessuri != null) {
+ AccessPoint accessPoint = objectFactory.createAccessPoint();
accessPoint.setURLType(getURLType(accessuri));
- accessPoint.setValue(accessuri);
+ accessPoint.setValue(accessuri);
bt.setAccessPoint(accessPoint);
}
ServiceBinding sb = serviceBinding.getTargetBinding();
- if (sb != null) {
- HostingRedirector red = objectFactory.createHostingRedirector();
+ if (sb != null) {
+ HostingRedirector red = objectFactory.createHostingRedirector();
Key key = sb.getKey();
- if (key != null && key.getId() != null) {
- red.setBindingKey(key.getId());
+ if (key != null && key.getId() != null) {
+ red.setBindingKey(key.getId());
} else {
red.setBindingKey("");
}
bt.setHostingRedirector(red);
} else {
- if (bt.getAccessPoint() == null) {
- bt.setAccessPoint(objectFactory.createAccessPoint());
- }
+ if (bt.getAccessPoint() == null) {
+ bt.setAccessPoint(objectFactory.createAccessPoint());
+ }
}
- // TODO:Need to look further at the mapping b/w BindingTemplate and
- // Jaxr ServiceBinding
+ // TODO:Need to look further at the mapping b/w BindingTemplate and
+ // Jaxr ServiceBinding
- // Get Service information
- Service svc = serviceBinding.getService();
- if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
- bt.setServiceKey(svc.getKey().getId());
- }
-
- InternationalString idesc = serviceBinding.getDescription();
-
+ // Get Service information
+ Service svc = serviceBinding.getService();
+ if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
+ bt.setServiceKey(svc.getKey().getId());
+ }
+
+ InternationalString idesc = serviceBinding.getDescription();
+
addDescriptions(bt.getDescription(), idesc);
- // SpecificationLink
- Collection<SpecificationLink> slcol = serviceBinding.getSpecificationLinks();
- TModelInstanceDetails tid = objectFactory.createTModelInstanceDetails();
- if (slcol != null && !slcol.isEmpty()) {
- Iterator<SpecificationLink> iter = slcol.iterator();
- while (iter.hasNext()) {
- SpecificationLink slink = (SpecificationLink) iter.next();
+ // SpecificationLink
+ Collection<SpecificationLink> slcol = serviceBinding.getSpecificationLinks();
+ TModelInstanceDetails tid = objectFactory.createTModelInstanceDetails();
+ if (slcol != null && !slcol.isEmpty()) {
+ Iterator<SpecificationLink> iter = slcol.iterator();
+ while (iter.hasNext()) {
+ SpecificationLink slink = (SpecificationLink) iter.next();
- TModelInstanceInfo emptyTInfo = objectFactory.createTModelInstanceInfo();
- tid.getTModelInstanceInfo().add(emptyTInfo);
+ TModelInstanceInfo emptyTInfo = objectFactory.createTModelInstanceInfo();
+ tid.getTModelInstanceInfo().add(emptyTInfo);
RegistryObject specificationObject = slink.getSpecificationObject();
- if (specificationObject.getKey() != null && specificationObject.getKey().getId() != null) {
- emptyTInfo.setTModelKey(specificationObject.getKey().getId());
- if (specificationObject.getDescription()!=null) {
+ if (specificationObject.getKey() != null && specificationObject.getKey().getId() != null) {
+ emptyTInfo.setTModelKey(specificationObject.getKey().getId());
+ if (specificationObject.getDescription() != null) {
for (Object o : specificationObject.getDescription().getLocalizedStrings()) {
LocalizedString locDesc = (LocalizedString) o;
Description description = objectFactory.createDescription();
@@ -224,107 +225,108 @@
}
}
Collection<ExternalLink> externalLinks = slink.getExternalLinks();
- if (externalLinks!=null && externalLinks.size()>0) {
+ if (externalLinks != null && externalLinks.size() > 0) {
for (ExternalLink link : externalLinks) {
InstanceDetails ids = objectFactory.createInstanceDetails();
emptyTInfo.setInstanceDetails(ids);
- if (link.getDescription()!=null) {
+ if (link.getDescription() != null) {
Description description = objectFactory.createDescription();
ids.getDescription().add(description);
description.setValue(link.getDescription().getValue());
}
- if (link.getExternalURI()!=null) {
+ if (link.getExternalURI() != null) {
OverviewDoc overviewDoc = objectFactory.createOverviewDoc();
ids.setOverviewDoc(overviewDoc);
overviewDoc.setOverviewURL(link.getExternalURI());
}
- }
+ }
}
- }
- }
+ }
+ }
}
- bt.setTModelInstanceDetails(tid);
- log.debug("BindingTemplate=" + bt.toString());
- } catch (Exception ud) {
+ bt.setTModelInstanceDetails(tid);
+ log.debug("BindingTemplate=" + bt.toString());
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return bt;
}
- public static PublisherAssertion getPubAssertionFromJAXRAssociation(
- Association association) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- if (association.getSourceObject().getKey() != null &&
- association.getSourceObject().getKey().getId() != null) {
- pa.setFromKey(association.getSourceObject().getKey().getId());
- }
-
- if (association.getTargetObject().getKey() != null &&
- association.getTargetObject().getKey().getId() != null) {
- pa.setToKey(association.getTargetObject().getKey().getId());
- }
+ public static PublisherAssertion getPubAssertionFromJAXRAssociation(
+ Association association) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
+ try {
+ if (association.getSourceObject().getKey() != null
+ && association.getSourceObject().getKey().getId() != null) {
+ pa.setFromKey(association.getSourceObject().getKey().getId());
+ }
+
+ if (association.getTargetObject().getKey() != null
+ && association.getTargetObject().getKey().getId() != null) {
+ pa.setToKey(association.getTargetObject().getKey().getId());
+ }
Concept c = association.getAssociationType();
String v = c.getValue();
- KeyedReference kr = objectFactory.createKeyedReference();
+ KeyedReference kr = objectFactory.createKeyedReference();
Key key = c.getKey();
- if (key == null) {
- // TODO:Need to check this. If the concept is a predefined
- // enumeration, the key can be the parent classification scheme
+ if (key == null) {
+ // TODO:Need to check this. If the concept is a predefined
+ // enumeration, the key can be the parent classification scheme
key = c.getClassificationScheme().getKey();
}
- if (key != null && key.getId() != null) {
- kr.setTModelKey(key.getId());
- }
+ if (key != null && key.getId() != null) {
+ kr.setTModelKey(key.getId());
+ }
kr.setKeyName("Concept");
- if (v != null) {
- kr.setKeyValue(v);
- }
-
- pa.setKeyedReference(kr);
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return pa;
- }
-
- public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
- String key) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- StringTokenizer token = new StringTokenizer(key, "|");
- if (token.hasMoreTokens()) {
- pa.setFromKey(getToken(token.nextToken()));
- pa.setToKey(getToken(token.nextToken()));
- KeyedReference kr = objectFactory.createKeyedReference();
- // Sometimes the Key is UUID:something
- String str = getToken(token.nextToken());
- if ("UUID".equals(str))
- str += ":" + getToken(token.nextToken());
- kr.setTModelKey(str);
- kr.setKeyName(getToken(token.nextToken()));
- kr.setKeyValue(getToken(token.nextToken()));
- pa.setKeyedReference(kr);
+ if (v != null) {
+ kr.setKeyValue(v);
}
- } catch (Exception ud) {
+ pa.setKeyedReference(kr);
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return pa;
}
- public static BusinessService getBusinessServiceFromJAXRService(
- Service service) throws JAXRException {
- BusinessService bs = objectFactory.createBusinessService();
- try {
- InternationalString iname = service.getName();
-
- addNames(bs.getName(), iname);
-
+ public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
+ String key) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
+ try {
+ StringTokenizer token = new StringTokenizer(key, "|");
+ if (token.hasMoreTokens()) {
+ pa.setFromKey(getToken(token.nextToken()));
+ pa.setToKey(getToken(token.nextToken()));
+ KeyedReference kr = objectFactory.createKeyedReference();
+ // Sometimes the Key is UUID:something
+ String str = getToken(token.nextToken());
+ if ("UUID".equals(str)) {
+ str += ":" + getToken(token.nextToken());
+ }
+ kr.setTModelKey(str);
+ kr.setKeyName(getToken(token.nextToken()));
+ kr.setKeyValue(getToken(token.nextToken()));
+ pa.setKeyedReference(kr);
+ }
+
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return pa;
+ }
+
+ public static BusinessService getBusinessServiceFromJAXRService(
+ Service service) throws JAXRException {
+ BusinessService bs = objectFactory.createBusinessService();
+ try {
+ InternationalString iname = service.getName();
+
+ addNames(bs.getName(), iname);
+
InternationalString idesc = service.getDescription();
-
- addDescriptions(bs.getDescription(), idesc);
+
+ addDescriptions(bs.getDescription(), idesc);
Organization o = service.getProvidingOrganization();
@@ -334,26 +336,26 @@
if (o != null) {
Key k = o.getKey();
- if (k != null && k.getId() != null) {
+ if (k != null && k.getId() != null) {
bs.setBusinessKey(k.getId());
- }
-
- } else {
+ }
+
+ } else {
/*
* gmj - I *think* this is the right thing to do
*/
- throw new JAXRException(
- "Service has no associated organization");
+ throw new JAXRException(
+ "Service has no associated organization");
}
- if (service.getKey() != null && service.getKey().getId() != null) {
+ if (service.getKey() != null && service.getKey().getId() != null) {
bs.setServiceKey(service.getKey().getId());
} else {
bs.setServiceKey("");
}
CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
bs.setCategoryBag(catBag);
}
@@ -362,18 +364,18 @@
if (bt != null) {
bs.setBindingTemplates(bt);
}
-
+
log.debug("BusinessService=" + bs.toString());
- } catch (Exception ud) {
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return bs;
}
- public static TModel getTModelFromJAXRClassificationScheme(
- ClassificationScheme classificationScheme) throws JAXRException {
- TModel tm = objectFactory.createTModel();
- try {
+ public static TModel getTModelFromJAXRClassificationScheme(
+ ClassificationScheme classificationScheme) throws JAXRException {
+ TModel tm = objectFactory.createTModel();
+ try {
/*
* a fresh scheme might not have a key
*/
@@ -389,85 +391,87 @@
/*
* There's no reason to believe these are here either
*/
-
Slot s = classificationScheme.getSlot("authorizedName");
- if (s != null && s.getName() != null) {
+ if (s != null && s.getName() != null) {
tm.setAuthorizedName(s.getName());
}
s = classificationScheme.getSlot("operator");
- if (s != null && s.getName() != null) {
+ if (s != null && s.getName() != null) {
tm.setOperator(s.getName());
}
- InternationalString iname = classificationScheme.getName();
-
+ InternationalString iname = classificationScheme.getName();
+
tm.setName(getFirstName(iname));
- InternationalString idesc = classificationScheme.getDescription();
-
- addDescriptions(tm.getDescription(), idesc);
+ InternationalString idesc = classificationScheme.getDescription();
+
+ addDescriptions(tm.getDescription(), idesc);
IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(classificationScheme.getExternalIdentifiers());
- if (idBag!=null) {
+ if (idBag != null) {
tm.setIdentifierBag(idBag);
}
CategoryBag catBag = getCategoryBagFromClassifications(classificationScheme.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
tm.setCategoryBag(catBag);
}
-
- // ToDO: overviewDoc
- } catch (Exception ud) {
+
+ // ToDO: overviewDoc
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return tm;
}
public static TModel getTModelFromJAXRConcept(Concept concept)
- throws JAXRException {
- TModel tm = objectFactory.createTModel();
- if (concept == null)
- return null;
- try {
+ throws JAXRException {
+ TModel tm = objectFactory.createTModel();
+ if (concept == null) {
+ return null;
+ }
+ try {
Key key = concept.getKey();
- if (key != null && key.getId() != null)
- tm.setTModelKey(key.getId());
+ if (key != null && key.getId() != null) {
+ tm.setTModelKey(key.getId());
+ }
Slot sl1 = concept.getSlot("authorizedName");
- if (sl1 != null && sl1.getName() != null)
- tm.setAuthorizedName(sl1.getName());
+ if (sl1 != null && sl1.getName() != null) {
+ tm.setAuthorizedName(sl1.getName());
+ }
Slot sl2 = concept.getSlot("operator");
- if (sl2 != null && sl2.getName() != null)
- tm.setOperator(sl2.getName());
+ if (sl2 != null && sl2.getName() != null) {
+ tm.setOperator(sl2.getName());
+ }
- InternationalString iname = concept.getName();
+ InternationalString iname = concept.getName();
tm.setName(getFirstName(iname));
InternationalString idesc = concept.getDescription();
-
+
addDescriptions(tm.getDescription(), idesc);
// External Links
- Collection<ExternalLink> externalLinks = concept.getExternalLinks();
- if(externalLinks != null && externalLinks.size() > 0)
- {
- tm.setOverviewDoc(getOverviewDocFromExternalLink((ExternalLink)externalLinks.iterator().next()));
- }
+ Collection<ExternalLink> externalLinks = concept.getExternalLinks();
+ if (externalLinks != null && externalLinks.size() > 0) {
+ tm.setOverviewDoc(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next()));
+ }
IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(concept.getExternalIdentifiers());
- if (idBag!=null) {
+ if (idBag != null) {
tm.setIdentifierBag(idBag);
}
CategoryBag catBag = getCategoryBagFromClassifications(concept.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
tm.setCategoryBag(catBag);
}
- } catch (Exception ud) {
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return tm;
@@ -495,6 +499,7 @@
}
return null;
}
+
private static void addNames(List<Name> names, InternationalString iname) throws JAXRException {
for (Object o : iname.getLocalizedStrings()) {
LocalizedString locName = (LocalizedString) o;
@@ -506,52 +511,52 @@
}
public static BusinessEntity getBusinessEntityFromJAXROrg(Organization organization)
- throws JAXRException {
- BusinessEntity biz = objectFactory.createBusinessEntity();
- BusinessServices bss = objectFactory.createBusinessServices();
- BusinessService[] barr = new BusinessService[0];
+ throws JAXRException {
+ BusinessEntity biz = objectFactory.createBusinessEntity();
+ BusinessServices bss = objectFactory.createBusinessServices();
+ BusinessService[] barr = new BusinessService[0];
- try {
- // It may just be an update
+ try {
+ // It may just be an update
Key key = organization.getKey();
- if (key != null && key.getId() != null) {
- biz.setBusinessKey(key.getId());
+ if (key != null && key.getId() != null) {
+ biz.setBusinessKey(key.getId());
} else {
biz.setBusinessKey("");
}
- // Lets get the Organization attributes at the top level
-
- InternationalString iname = organization.getName();
-
- if (iname != null) {
+ // Lets get the Organization attributes at the top level
+
+ InternationalString iname = organization.getName();
+
+ if (iname != null) {
addNames(biz.getName(), iname);
- }
-
- InternationalString idesc = organization.getDescription();
-
+ }
+
+ InternationalString idesc = organization.getDescription();
+
addDescriptions(biz.getDescription(), idesc);
- if (organization.getPrimaryContact() != null &&
- organization.getPrimaryContact().getPersonName()!= null &&
- organization.getPrimaryContact().getPersonName().getFullName() != null) {
+ if (organization.getPrimaryContact() != null
+ && organization.getPrimaryContact().getPersonName() != null
+ && organization.getPrimaryContact().getPersonName().getFullName() != null) {
- biz.setAuthorizedName(organization.getPrimaryContact().getPersonName()
- .getFullName());
- }
+ biz.setAuthorizedName(organization.getPrimaryContact().getPersonName()
+ .getFullName());
+ }
Collection<Service> s = organization.getServices();
log.debug("?Org has services=" + s.isEmpty());
- barr = new BusinessService[s.size()];
+ barr = new BusinessService[s.size()];
Iterator<Service> iter = s.iterator();
- int barrPos = 0;
- while (iter.hasNext()) {
- BusinessService bs = ScoutJaxrUddiHelper
- .getBusinessServiceFromJAXRService((Service) iter
- .next());
- barr[barrPos] = bs;
- barrPos++;
+ int barrPos = 0;
+ while (iter.hasNext()) {
+ BusinessService bs = ScoutJaxrUddiHelper
+ .getBusinessServiceFromJAXRService((Service) iter
+ .next());
+ barr[barrPos] = bs;
+ barrPos++;
}
/*
@@ -559,16 +564,14 @@
* special designation for one of the users, and D6.1 seems to say
* that the first UDDI user is the primary contact
*/
-
- Contacts cts = objectFactory.createContacts();
- Contact[] carr = new Contact[0];
+ Contacts cts = objectFactory.createContacts();
+ Contact[] carr = new Contact[0];
User primaryContact = organization.getPrimaryContact();
Collection<User> users = organization.getUsers();
// Expand array to necessary size only (xmlbeans does not like
// null items in cases like this)
-
int carrSize = 0;
if (primaryContact != null) {
@@ -606,8 +609,8 @@
}
}
- bss.getBusinessService().addAll(Arrays.asList(barr));
- if (carr.length>0) {
+ bss.getBusinessService().addAll(Arrays.asList(barr));
+ if (carr.length > 0) {
cts.getContact().addAll(Arrays.asList(carr));
biz.setContacts(cts);
}
@@ -619,7 +622,9 @@
boolean first = true;
while (exiter.hasNext()) {
ExternalLink link = (ExternalLink) exiter.next();
- /** Note: jUDDI adds its own discoverURL as the businessEntity* */
+ /**
+ * Note: jUDDI adds its own discoverURL as the businessEntity*
+ */
if (first) {
emptyDUs = objectFactory.createDiscoveryURLs();
biz.setDiscoveryURLs(emptyDUs);
@@ -628,22 +633,22 @@
DiscoveryURL emptyDU = objectFactory.createDiscoveryURL();
emptyDUs.getDiscoveryURL().add(emptyDU);
emptyDU.setUseType("businessEntityExt");
-
+
if (link.getExternalURI() != null) {
emptyDU.setValue(link.getExternalURI());
}
}
-
- IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(organization.getExternalIdentifiers());
- if (idBag!=null) {
- biz.setIdentifierBag(idBag);
- }
- CategoryBag catBag = getCategoryBagFromClassifications(organization.getClassifications());
- if (catBag!=null) {
- biz.setCategoryBag(catBag);
- }
-
- } catch (Exception ud) {
+
+ IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(organization.getExternalIdentifiers());
+ if (idBag != null) {
+ biz.setIdentifierBag(idBag);
+ }
+ CategoryBag catBag = getCategoryBagFromClassifications(organization.getClassifications());
+ if (catBag != null) {
+ biz.setCategoryBag(catBag);
+ }
+
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return biz;
@@ -651,203 +656,214 @@
/**
*
- * Convert JAXR User Object to UDDI Contact
+ * Convert JAXR User Object to UDDI Contact
*/
public static Contact getContactFromJAXRUser(User user)
- throws JAXRException {
- Contact ct = objectFactory.createContact();
+ throws JAXRException {
+ Contact ct = objectFactory.createContact();
if (user == null) {
return null;
}
- Address[] addarr = new Address[0];
- Phone[] phonearr = new Phone[0];
- Email[] emailarr = new Email[0];
- try {
-
- if (user.getPersonName() != null && user.getPersonName().getFullName() != null) {
- ct.setPersonName(user.getPersonName().getFullName());
- }
-
- if (user.getType() != null) {
- ct.setUseType(user.getType());
- }
- // Postal Address
+ Address[] addarr = new Address[0];
+ Phone[] phonearr = new Phone[0];
+ Email[] emailarr = new Email[0];
+ try {
+
+ if (user.getPersonName() != null && user.getPersonName().getFullName() != null) {
+ ct.setPersonName(user.getPersonName().getFullName());
+ }
+
+ if (user.getType() != null) {
+ ct.setUseType(user.getType());
+ }
+ // Postal Address
Collection<PostalAddress> postc = user.getPostalAddresses();
- addarr = new Address[postc.size()];
+ addarr = new Address[postc.size()];
Iterator<PostalAddress> iterator = postc.iterator();
- int addarrPos = 0;
- while (iterator.hasNext()) {
+ int addarrPos = 0;
+ while (iterator.hasNext()) {
PostalAddress post = (PostalAddress) iterator.next();
- addarr[addarrPos] = ScoutJaxrUddiHelper.getAddress(post);
- addarrPos++;
+ addarr[addarrPos] = ScoutJaxrUddiHelper.getAddress(post);
+ addarrPos++;
}
- // Phone Numbers
+ // Phone Numbers
Collection ph = user.getTelephoneNumbers(null);
- phonearr = new Phone[ph.size()];
+ phonearr = new Phone[ph.size()];
Iterator it = ph.iterator();
- int phonearrPos = 0;
- while (it.hasNext()) {
+ int phonearrPos = 0;
+ while (it.hasNext()) {
TelephoneNumber t = (TelephoneNumber) it.next();
- Phone phone = objectFactory.createPhone();
+ Phone phone = objectFactory.createPhone();
String str = t.getNumber();
log.debug("Telephone=" + str);
-
- // FIXME: If phone number is null, should the phone
- // not be set at all, or set to empty string?
- if (str != null) {
- phone.setValue(str);
- } else {
- phone.setValue("");
- }
- phonearr[phonearrPos] = phone;
- phonearrPos++;
+ // FIXME: If phone number is null, should the phone
+ // not be set at all, or set to empty string?
+ if (str != null) {
+ phone.setValue(str);
+ } else {
+ phone.setValue("");
+ }
+
+ phonearr[phonearrPos] = phone;
+ phonearrPos++;
}
- // Email Addresses
+ // Email Addresses
Collection ec = user.getEmailAddresses();
- emailarr = new Email[ec.size()];
+ emailarr = new Email[ec.size()];
Iterator iter = ec.iterator();
- int emailarrPos = 0;
- while (iter.hasNext()) {
+ int emailarrPos = 0;
+ while (iter.hasNext()) {
EmailAddress ea = (EmailAddress) iter.next();
- Email email = objectFactory.createEmail();
-
- if (ea.getAddress() != null) {
- email.setValue(ea.getAddress());
- }
- // email.setText( ea.getAddress() );
-
- if (ea.getType() != null) {
- email.setUseType(ea.getType());
- }
+ Email email = objectFactory.createEmail();
- emailarr[emailarrPos] = email;
- emailarrPos++;
- }
- ct.getAddress().addAll(Arrays.asList(addarr));
- ct.getPhone().addAll(Arrays.asList(phonearr));
- ct.getEmail().addAll(Arrays.asList(emailarr));
- } catch (Exception ud) {
+ if (ea.getAddress() != null) {
+ email.setValue(ea.getAddress());
+ }
+ // email.setText( ea.getAddress() );
+
+ if (ea.getType() != null) {
+ email.setUseType(ea.getType());
+ }
+
+ emailarr[emailarrPos] = email;
+ emailarrPos++;
+ }
+ ct.getAddress().addAll(Arrays.asList(addarr));
+ ct.getPhone().addAll(Arrays.asList(phonearr));
+ ct.getEmail().addAll(Arrays.asList(emailarr));
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return ct;
}
- private static String getToken(String tokenstr) {
- // Token can have the value NULL which need to be converted into null
- if (tokenstr.equals("NULL"))
- tokenstr = "";
- return tokenstr;
- }
+ private static String getToken(String tokenstr) {
+ // Token can have the value NULL which need to be converted into null
+ if (tokenstr.equals("NULL")) {
+ tokenstr = "";
+ }
+ return tokenstr;
+ }
- private static URLType getURLType(String accessuri) {
- String acc = accessuri.toLowerCase();
- URLType uri = URLType.OTHER;
- if (acc.startsWith("http:"))
- uri = URLType.HTTP;
- else if (acc.startsWith("https:"))
- uri = URLType.HTTPS;
- else if (acc.startsWith("ftp:"))
- uri = URLType.FTP;
- else if (acc.startsWith("phone:"))
- uri = URLType.PHONE;// TODO:Handle this better
+ private static URLType getURLType(String accessuri) {
+ String acc = accessuri.toLowerCase();
+ URLType uri = URLType.OTHER;
+ if (acc.startsWith("http:")) {
+ uri = URLType.HTTP;
+ } else if (acc.startsWith("https:")) {
+ uri = URLType.HTTPS;
+ } else if (acc.startsWith("ftp:")) {
+ uri = URLType.FTP;
+ } else if (acc.startsWith("phone:")) {
+ uri = URLType.PHONE;// TODO:Handle this better
+ }
+ return uri;
+ }
- return uri;
- }
-
- /**
- * According to JAXR Javadoc, there are two types of classification, internal and external and they use the Classification, Concept,
- * and ClassificationScheme objects. It seems the only difference between internal and external (as related to UDDI) is that the
- * name/value pair of the categorization is held in the Concept for internal classifications and the Classification for external (bypassing
- * the Concept entirely).
- *
- * The translation to UDDI is simple. Relevant objects have a category bag which contains a bunch of KeyedReferences (name/value pairs).
- * These KeyedReferences optionally refer to a tModel that identifies the type of category (translates to the ClassificationScheme key). If
- * this is set and the tModel doesn't exist in the UDDI registry, then an invalid key error will occur when trying to save the object.
- *
+ /**
+ * According to JAXR Javadoc, there are two types of classification,
+ * internal and external and they use the Classification, Concept, and
+ * ClassificationScheme objects. It seems the only difference between
+ * internal and external (as related to UDDI) is that the name/value pair of
+ * the categorization is held in the Concept for internal classifications
+ * and the Classification for external (bypassing the Concept entirely).
+ *
+ * The translation to UDDI is simple. Relevant objects have a category bag
+ * which contains a bunch of KeyedReferences (name/value pairs). These
+ * KeyedReferences optionally refer to a tModel that identifies the type of
+ * category (translates to the ClassificationScheme key). If this is set and
+ * the tModel doesn't exist in the UDDI registry, then an invalid key error
+ * will occur when trying to save the object.
+ *
* @param classifications classifications to turn into categories
* @throws JAXRException
*/
- public static CategoryBag getCategoryBagFromClassifications(Collection classifications) throws JAXRException {
- try {
- if (classifications == null || classifications.size()==0)
- return null;
-
- // Classifications
- CategoryBag cbag = objectFactory.createCategoryBag();
- Iterator classiter = classifications.iterator();
- while (classiter.hasNext()) {
- Classification classification = (Classification) classiter.next();
- if (classification != null ) {
- KeyedReference keyr = objectFactory.createKeyedReference();
- cbag.getKeyedReference().add(keyr);
-
- InternationalStringImpl iname = null;
- String value = null;
- ClassificationScheme scheme = classification.getClassificationScheme();
- if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {
+ public static CategoryBag getCategoryBagFromClassifications(Collection classifications) throws JAXRException {
+ try {
+ if (classifications == null || classifications.size() == 0) {
+ return null;
+ }
+
+ // Classifications
+ CategoryBag cbag = objectFactory.createCategoryBag();
+ Iterator classiter = classifications.iterator();
+ while (classiter.hasNext()) {
+ Classification classification = (Classification) classiter.next();
+ if (classification != null) {
+ KeyedReference keyr = objectFactory.createKeyedReference();
+ cbag.getKeyedReference().add(keyr);
+
+ InternationalStringImpl iname = null;
+ String value = null;
+ ClassificationScheme scheme = classification.getClassificationScheme();
+ if (scheme == null || (classification.isExternal() && classification.getConcept() == null)) {
/*
* JAXR 1.0 Specification: Section D6.4.4
* Specification related tModels mapped from Concept may be automatically
* categorized by the well-known uddi-org:types taxonomy in UDDI (with
* tModelKey uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4) as follows:
* The keyed reference is assigned a taxonomy value of specification.
- */
+ */
keyr.setTModelKey(UDDI_ORG_TYPES);
- keyr.setKeyValue("specification");
+ keyr.setKeyValue("specification");
} else {
- if (classification.isExternal()) {
+ if (classification.isExternal()) {
iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
value = classification.getValue();
- } else {
- Concept concept = classification.getConcept();
- if (concept != null) {
- iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
- value = concept.getValue();
- scheme = concept.getClassificationScheme();
- }
- }
-
- String name = iname.getValue();
- if (name != null)
- keyr.setKeyName(name);
-
- if (value != null)
- keyr.setKeyValue(value);
-
- if (scheme != null) {
- Key key = scheme.getKey();
- if (key != null && key.getId() != null)
- keyr.setTModelKey(key.getId());
- }
- }
+ } else {
+ Concept concept = classification.getConcept();
+ if (concept != null) {
+ iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
+ value = concept.getValue();
+ scheme = concept.getClassificationScheme();
+ }
+ }
+
+ String name = iname.getValue();
+ if (name != null) {
+ keyr.setKeyName(name);
+ }
+
+ if (value != null) {
+ keyr.setKeyValue(value);
+ }
+
+ if (scheme != null) {
+ Key key = scheme.getKey();
+ if (key != null && key.getId() != null) {
+ keyr.setTModelKey(key.getId());
+ }
+ }
+ }
}
- }
- return cbag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ }
+ return cbag;
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
- public static TModelBag getTModelBagFromSpecifications(Collection specifications) throws JAXRException {
- try {
- if (specifications == null || specifications.size()==0)
- return null;
-
- // Classifications
- TModelBag tbag = objectFactory.createTModelBag();
- Iterator speciter = specifications.iterator();
- while (speciter.hasNext()) {
- RegistryObject registryobject = (RegistryObject) speciter.next();
- if (registryobject instanceof Concept) {
+ public static TModelBag getTModelBagFromSpecifications(Collection specifications) throws JAXRException {
+ try {
+ if (specifications == null || specifications.size() == 0) {
+ return null;
+ }
+
+ // Classifications
+ TModelBag tbag = objectFactory.createTModelBag();
+ Iterator speciter = specifications.iterator();
+ while (speciter.hasNext()) {
+ RegistryObject registryobject = (RegistryObject) speciter.next();
+ if (registryobject instanceof Concept) {
Concept concept = (Concept) registryobject;
if (concept.getKey() != null) {
tbag.getTModelKey().add(concept.getKey().toString());
@@ -861,87 +877,90 @@
// tbag.getTModelKey().add(key.toString());
// }
// }
- } else {
- log.info("ebXML case - the RegistryObject is an ExtrinsicObject, Not implemented");
- }
- }
- return tbag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ } else {
+ log.info("ebXML case - the RegistryObject is an ExtrinsicObject, Not implemented");
+ }
+ }
+ return tbag;
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
-
- /**
+ /**
* Adds the objects identifiers from JAXR's external identifier collection
- *
+ *
* @param identifiers external identifiers to turn into identifiers
* @throws JAXRException
*/
- public static IdentifierBag getIdentifierBagFromExternalIdentifiers(Collection identifiers) throws JAXRException {
- try {
- if (identifiers == null || identifiers.size()==0)
- return null;
-
- // Identifiers
- IdentifierBag ibag = objectFactory.createIdentifierBag();
- Iterator iditer = identifiers.iterator();
- while (iditer.hasNext()) {
- ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
- if (extid != null ) {
- KeyedReference keyr = objectFactory.createKeyedReference();
- ibag.getKeyedReference().add(keyr);
-
- InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
- String value = extid.getValue();
- ClassificationScheme scheme = extid.getIdentificationScheme();
-
- String name = iname.getValue();
- if (name != null)
- keyr.setKeyName(name);
-
- if (value != null)
- keyr.setKeyValue(value);
-
- if (scheme != null) {
- Key key = scheme.getKey();
- if (key != null && key.getId() != null)
- keyr.setTModelKey(key.getId());
- }
- }
- }
- return ibag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ public static IdentifierBag getIdentifierBagFromExternalIdentifiers(Collection identifiers) throws JAXRException {
+ try {
+ if (identifiers == null || identifiers.size() == 0) {
+ return null;
+ }
+
+ // Identifiers
+ IdentifierBag ibag = objectFactory.createIdentifierBag();
+ Iterator iditer = identifiers.iterator();
+ while (iditer.hasNext()) {
+ ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
+ if (extid != null) {
+ KeyedReference keyr = objectFactory.createKeyedReference();
+ ibag.getKeyedReference().add(keyr);
+
+ InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
+ String value = extid.getValue();
+ ClassificationScheme scheme = extid.getIdentificationScheme();
+
+ String name = iname.getValue();
+ if (name != null) {
+ keyr.setKeyName(name);
+ }
+
+ if (value != null) {
+ keyr.setKeyValue(value);
+ }
+
+ if (scheme != null) {
+ Key key = scheme.getKey();
+ if (key != null && key.getId() != null) {
+ keyr.setTModelKey(key.getId());
+ }
+ }
+ }
+ }
+ return ibag;
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
-
+
private static OverviewDoc getOverviewDocFromExternalLink(ExternalLink link)
- throws JAXRException
- {
- OverviewDoc od = objectFactory.createOverviewDoc();
- String url = link.getExternalURI();
- if(url != null)
- od.setOverviewURL(url);
- InternationalString extDesc = link.getDescription();
- if(extDesc != null) {
- Description description = objectFactory.createDescription();
- od.getDescription().add(description);
- description.setValue(extDesc.getValue());
- }
- return od;
- }
+ throws JAXRException {
+ OverviewDoc od = objectFactory.createOverviewDoc();
+ String url = link.getExternalURI();
+ if (url != null) {
+ od.setOverviewURL(url);
+ }
+ InternationalString extDesc = link.getDescription();
+ if (extDesc != null) {
+ Description description = objectFactory.createDescription();
+ od.getDescription().add(description);
+ description.setValue(extDesc.getValue());
+ }
+ return od;
+ }
private static BindingTemplates getBindingTemplates(Collection serviceBindings)
- throws JAXRException {
+ throws JAXRException {
BindingTemplates bt = null;
- if(serviceBindings != null && serviceBindings.size() > 0) {
+ if (serviceBindings != null && serviceBindings.size() > 0) {
bt = objectFactory.createBindingTemplates();
Iterator iter = serviceBindings.iterator();
int currLoc = 0;
BindingTemplate[] bindingTemplateArray = new BindingTemplate[serviceBindings.size()];
- while(iter.hasNext()) {
- ServiceBinding sb = (ServiceBinding)iter.next();
+ while (iter.hasNext()) {
+ ServiceBinding sb = (ServiceBinding) iter.next();
bindingTemplateArray[currLoc] = getBindingTemplateFromJAXRSB(sb);
currLoc++;
}
@@ -949,6 +968,6 @@
bt.getBindingTemplate().addAll(Arrays.asList(bindingTemplateArray));
}
}
- return bt;
+ return bt;
}
}
diff --git a/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java b/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
index cc8a6f4..ac81f42 100644
--- a/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
+++ b/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiV3Helper.java
@@ -19,6 +19,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
@@ -56,19 +57,18 @@
* @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
* @author <a href="mailto:tcunning@apache.org">Tom Cunningham</a>
*/
-public class ScoutJaxrUddiV3Helper
-{
+public class ScoutJaxrUddiV3Helper {
+
private static final String UDDI_ORG_TYPES = "uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4";
- private static Log log = LogFactory.getLog(ScoutJaxrUddiV3Helper.class);
- private static ObjectFactory objectFactory = new ObjectFactory();
-
+ private static Log log = LogFactory.getLog(ScoutJaxrUddiV3Helper.class);
+ private static ObjectFactory objectFactory = new ObjectFactory();
+
/**
* Get UDDI Address given JAXR Postal Address
*/
- public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
- Address address = objectFactory.createAddress();
-
- AddressLine[] addarr = new AddressLine[7];
+ public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
+ Address address = objectFactory.createAddress();
+ List<AddressLine> list = new LinkedList<AddressLine>();
String stnum = postalAddress.getStreetNumber();
String st = postalAddress.getStreet();
@@ -78,135 +78,150 @@
String state = postalAddress.getStateOrProvince();
String type = postalAddress.getType();
- AddressLine stnumAL = objectFactory.createAddressLine();
- stnumAL.setKeyName("STREET_NUMBER");
- if (stnum != null) {
- stnumAL.setKeyValue("STREET_NUMBER");
- stnumAL.setValue(stnum);
- }
+ AddressLine stnumAL = null;
- AddressLine stAL = objectFactory.createAddressLine();
- stAL.setKeyName("STREET");
- if (st != null) {
- stAL.setKeyValue("STREET");
- stAL.setValue(st);
- }
-
- AddressLine cityAL = objectFactory.createAddressLine();
- cityAL.setKeyName("CITY");
- if (city != null) {
- cityAL.setKeyValue("CITY");
- cityAL.setValue(city);
- }
-
- AddressLine countryAL = objectFactory.createAddressLine();
- countryAL.setKeyName("COUNTRY");
- if (country != null) {
- countryAL.setKeyValue("COUNTRY");
- countryAL.setValue(country);
- }
-
- AddressLine codeAL = objectFactory.createAddressLine();
- codeAL.setKeyName("POSTALCODE");
- if (code != null) {
- codeAL.setKeyValue("POSTALCODE");
- codeAL.setValue(code);
- }
-
- AddressLine stateAL = objectFactory.createAddressLine();
- stateAL.setKeyName("STATE");
- if (state != null) {
- stateAL.setKeyValue("STATE");
- stateAL.setValue(state);
- }
-
- AddressLine typeAL = objectFactory.createAddressLine();
- typeAL.setKeyName("TYPE");
- if (type != null) {
- typeAL.setKeyValue("TYPE");
- typeAL.setValue(type);
+ if (stnum != null && stnum.length() > 0) {
+ stnumAL = objectFactory.createAddressLine();
+ stnumAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ stnumAL.setKeyValue("STREET_NUMBER");
+ stnumAL.setValue(stnum);
+ list.add(stnumAL);
}
- // Add the AddressLine to vector
- addarr[0] = stnumAL;
- addarr[1] = stAL;
- addarr[2] = cityAL;
- addarr[3] = countryAL;
- addarr[4] = codeAL;
- addarr[5] = stateAL;
- addarr[6] = typeAL;
-
- address.getAddressLine().addAll(Arrays.asList(addarr));
+ AddressLine stAL = null;
+
+ if (st != null && st.length() > 0) {
+ stAL = objectFactory.createAddressLine();
+ stAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ stAL.setKeyValue("STREET");
+ stAL.setValue(st);
+ list.add(stAL);
+ }
+
+ AddressLine cityAL = null;
+
+ if (city != null && city.length() > 0) {
+ cityAL = objectFactory.createAddressLine();
+ cityAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ cityAL.setKeyValue("CITY");
+ cityAL.setValue(city);
+ list.add(cityAL);
+ }
+
+ AddressLine countryAL = null;
+
+ if (country != null && country.length() > 0) {
+ countryAL = objectFactory.createAddressLine();
+ countryAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ countryAL.setKeyValue("COUNTRY");
+ countryAL.setValue(country);
+ list.add(countryAL);
+
+ }
+
+ AddressLine codeAL = null;
+
+ if (code != null&& code.length() > 0) {
+ codeAL = objectFactory.createAddressLine();
+ codeAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ codeAL.setKeyValue("POSTALCODE");
+ codeAL.setValue(code);
+ list.add(codeAL);
+ }
+
+ AddressLine stateAL = null;
+ if (state != null && state.length()>0) {
+ stateAL = objectFactory.createAddressLine();
+ stateAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+ stateAL.setKeyValue("STATE");
+ stateAL.setValue(state);
+ list.add(stateAL);
+
+ }
+
+ AddressLine typeAL = null;
+ if (type != null && type.length()>0) {
+ typeAL = objectFactory.createAddressLine();
+ typeAL.setKeyName("uddi:uddi.org:ubr:postaladdress");
+
+ typeAL.setValue(type);
+ typeAL.setKeyValue("TYPE");
+ list.add(typeAL);
+ }
+
+ //FIXME this may need v2 vs v3 support?
+ address.setTModelKey("uddi:uddi.org:ubr:postaladdress");
+ address.getAddressLine().addAll(list);
return address;
}
- public static BindingTemplate getBindingTemplateFromJAXRSB(
- ServiceBinding serviceBinding) throws JAXRException {
- BindingTemplate bt = objectFactory.createBindingTemplate();
- if (serviceBinding.getKey() != null && serviceBinding.getKey().getId() != null) {
- bt.setBindingKey(serviceBinding.getKey().getId());
- } else {
- bt.setBindingKey("");
- }
-
- try {
- // Set Access URI
+ public static BindingTemplate getBindingTemplateFromJAXRSB(
+ ServiceBinding serviceBinding) throws JAXRException {
+ BindingTemplate bt = objectFactory.createBindingTemplate();
+ if (serviceBinding.getKey() != null && serviceBinding.getKey().getId() != null) {
+ bt.setBindingKey(serviceBinding.getKey().getId());
+ } else {
+ bt.setBindingKey("");
+ }
+
+ try {
+ // Set Access URI
String accessuri = serviceBinding.getAccessURI();
- if (accessuri != null) {
- AccessPoint accessPoint = objectFactory.createAccessPoint();
+ if (accessuri != null) {
+ AccessPoint accessPoint = objectFactory.createAccessPoint();
accessPoint.setUseType(getUseType(accessuri));
- accessPoint.setValue(accessuri);
+ accessPoint.setValue(accessuri);
bt.setAccessPoint(accessPoint);
}
ServiceBinding sb = serviceBinding.getTargetBinding();
- if (sb != null) {
- HostingRedirector red = objectFactory.createHostingRedirector();
+ if (sb != null) {
+ HostingRedirector red = objectFactory.createHostingRedirector();
Key key = sb.getKey();
- if (key != null && key.getId() != null) {
- red.setBindingKey(key.getId());
+ if (key != null && key.getId() != null) {
+ red.setBindingKey(key.getId());
} else {
red.setBindingKey("");
}
bt.setHostingRedirector(red);
} else {
- if (bt.getAccessPoint() == null) {
- bt.setAccessPoint(objectFactory.createAccessPoint());
- }
+ if (bt.getAccessPoint() == null) {
+ bt.setAccessPoint(objectFactory.createAccessPoint());
+ }
}
- // TODO:Need to look further at the mapping b/w BindingTemplate and
- // Jaxr ServiceBinding
+ // TODO:Need to look further at the mapping b/w BindingTemplate and
+ // Jaxr ServiceBinding
CategoryBag catBag = getCategoryBagFromClassifications(serviceBinding.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
bt.setCategoryBag(catBag);
}
-
+
// Get Service information
Service svc = serviceBinding.getService();
if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
- bt.setServiceKey(svc.getKey().getId());
+ bt.setServiceKey(svc.getKey().getId());
}
-
- InternationalString idesc = serviceBinding.getDescription();
-
+
+ InternationalString idesc = serviceBinding.getDescription();
+
addDescriptions(bt.getDescription(), idesc);
- // SpecificationLink
- Collection<SpecificationLink> slcol = serviceBinding.getSpecificationLinks();
- TModelInstanceDetails tid = objectFactory.createTModelInstanceDetails();
- if (slcol != null && !slcol.isEmpty()) {
- Iterator<SpecificationLink> iter = slcol.iterator();
- while (iter.hasNext()) {
- SpecificationLink slink = (SpecificationLink) iter.next();
+ // SpecificationLink
+ Collection<SpecificationLink> slcol = serviceBinding.getSpecificationLinks();
+ TModelInstanceDetails tid = objectFactory.createTModelInstanceDetails();
+ if (slcol != null && !slcol.isEmpty()) {
+ Iterator<SpecificationLink> iter = slcol.iterator();
+ while (iter.hasNext()) {
+ SpecificationLink slink = (SpecificationLink) iter.next();
- TModelInstanceInfo emptyTInfo = objectFactory.createTModelInstanceInfo();
- tid.getTModelInstanceInfo().add(emptyTInfo);
+ TModelInstanceInfo emptyTInfo = objectFactory.createTModelInstanceInfo();
+ tid.getTModelInstanceInfo().add(emptyTInfo);
RegistryObject specificationObject = slink.getSpecificationObject();
- if (specificationObject.getKey() != null && specificationObject.getKey().getId() != null) {
- emptyTInfo.setTModelKey(specificationObject.getKey().getId());
- if (specificationObject.getDescription()!=null) {
+ if (specificationObject.getKey() != null && specificationObject.getKey().getId() != null) {
+ emptyTInfo.setTModelKey(specificationObject.getKey().getId());
+ if (specificationObject.getDescription() != null) {
for (Object o : specificationObject.getDescription().getLocalizedStrings()) {
LocalizedString locDesc = (LocalizedString) o;
Description description = objectFactory.createDescription();
@@ -216,16 +231,16 @@
}
}
Collection<ExternalLink> externalLinks = slink.getExternalLinks();
- if (externalLinks!=null && externalLinks.size()>0) {
+ if (externalLinks != null && externalLinks.size() > 0) {
for (ExternalLink link : externalLinks) {
InstanceDetails ids = objectFactory.createInstanceDetails();
emptyTInfo.setInstanceDetails(ids);
- if (link.getDescription()!=null) {
+ if (link.getDescription() != null) {
Description description = objectFactory.createDescription();
ids.getDescription().add(description);
description.setValue(link.getDescription().getValue());
}
- if (link.getExternalURI()!=null) {
+ if (link.getExternalURI() != null) {
OverviewDoc overviewDoc = objectFactory.createOverviewDoc();
ids.getOverviewDoc().add(overviewDoc);
org.uddi.api_v3.OverviewURL ourl = new org.uddi.api_v3.OverviewURL();
@@ -240,95 +255,96 @@
}
ids.setInstanceParms(buffer.toString().trim());
}
- }
+ }
}
- }
- }
+ }
+ }
}
- if (tid.getTModelInstanceInfo().size() != 0) {
- bt.setTModelInstanceDetails(tid);
- }
- log.debug("BindingTemplate=" + bt.toString());
- } catch (Exception ud) {
+ if (tid.getTModelInstanceInfo().size() != 0) {
+ bt.setTModelInstanceDetails(tid);
+ }
+ log.debug("BindingTemplate=" + bt.toString());
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return bt;
}
- public static PublisherAssertion getPubAssertionFromJAXRAssociation(
- Association association) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- if (association.getSourceObject().getKey() != null &&
- association.getSourceObject().getKey().getId() != null) {
- pa.setFromKey(association.getSourceObject().getKey().getId());
- }
-
- if (association.getTargetObject().getKey() != null &&
- association.getTargetObject().getKey().getId() != null) {
- pa.setToKey(association.getTargetObject().getKey().getId());
- }
+ public static PublisherAssertion getPubAssertionFromJAXRAssociation(
+ Association association) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
+ try {
+ if (association.getSourceObject().getKey() != null
+ && association.getSourceObject().getKey().getId() != null) {
+ pa.setFromKey(association.getSourceObject().getKey().getId());
+ }
+
+ if (association.getTargetObject().getKey() != null
+ && association.getTargetObject().getKey().getId() != null) {
+ pa.setToKey(association.getTargetObject().getKey().getId());
+ }
Concept c = association.getAssociationType();
String v = c.getValue();
- KeyedReference kr = objectFactory.createKeyedReference();
+ KeyedReference kr = objectFactory.createKeyedReference();
Key key = c.getKey();
- if (key == null) {
- // TODO:Need to check this. If the concept is a predefined
- // enumeration, the key can be the parent classification scheme
+ if (key == null) {
+ // TODO:Need to check this. If the concept is a predefined
+ // enumeration, the key can be the parent classification scheme
key = c.getClassificationScheme().getKey();
}
- if (key != null && key.getId() != null) {
- kr.setTModelKey(key.getId());
- }
+ if (key != null && key.getId() != null) {
+ kr.setTModelKey(key.getId());
+ }
kr.setKeyName("Concept");
- if (v != null) {
- kr.setKeyValue(v);
- }
-
- pa.setKeyedReference(kr);
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
- return pa;
- }
-
- public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
- String key) throws JAXRException {
- PublisherAssertion pa = objectFactory.createPublisherAssertion();
- try {
- StringTokenizer token = new StringTokenizer(key, "|");
- if (token.hasMoreTokens()) {
- pa.setFromKey(getToken(token.nextToken()));
- pa.setToKey(getToken(token.nextToken()));
- KeyedReference kr = objectFactory.createKeyedReference();
- // Sometimes the Key is UUID:something
- String str = getToken(token.nextToken());
- if ("UUID".equalsIgnoreCase(str))
- str += ":" + getToken(token.nextToken());
- kr.setTModelKey(str);
- kr.setKeyName(getToken(token.nextToken()));
- kr.setKeyValue(getToken(token.nextToken()));
- pa.setKeyedReference(kr);
+ if (v != null) {
+ kr.setKeyValue(v);
}
- } catch (Exception ud) {
+ pa.setKeyedReference(kr);
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return pa;
}
- public static BusinessService getBusinessServiceFromJAXRService(
- Service service) throws JAXRException {
- BusinessService bs = objectFactory.createBusinessService();
- try {
- InternationalString iname = service.getName();
-
- addNames(bs.getName(), iname);
-
+ public static PublisherAssertion getPubAssertionFromJAXRAssociationKey(
+ String key) throws JAXRException {
+ PublisherAssertion pa = objectFactory.createPublisherAssertion();
+ try {
+ StringTokenizer token = new StringTokenizer(key, "|");
+ if (token.hasMoreTokens()) {
+ pa.setFromKey(getToken(token.nextToken()));
+ pa.setToKey(getToken(token.nextToken()));
+ KeyedReference kr = objectFactory.createKeyedReference();
+ // Sometimes the Key is UUID:something
+ String str = getToken(token.nextToken());
+ if ("UUID".equalsIgnoreCase(str)) {
+ str += ":" + getToken(token.nextToken());
+ }
+ kr.setTModelKey(str);
+ kr.setKeyName(getToken(token.nextToken()));
+ kr.setKeyValue(getToken(token.nextToken()));
+ pa.setKeyedReference(kr);
+ }
+
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
+ return pa;
+ }
+
+ public static BusinessService getBusinessServiceFromJAXRService(
+ Service service) throws JAXRException {
+ BusinessService bs = objectFactory.createBusinessService();
+ try {
+ InternationalString iname = service.getName();
+
+ addNames(bs.getName(), iname);
+
InternationalString idesc = service.getDescription();
-
- addDescriptions(bs.getDescription(), idesc);
+
+ addDescriptions(bs.getDescription(), idesc);
Organization o = service.getProvidingOrganization();
@@ -338,26 +354,26 @@
if (o != null) {
Key k = o.getKey();
- if (k != null && k.getId() != null) {
+ if (k != null && k.getId() != null) {
bs.setBusinessKey(k.getId());
- }
-
- } else {
+ }
+
+ } else {
/*
* gmj - I *think* this is the right thing to do
*/
- throw new JAXRException(
- "Service has no associated organization");
+ throw new JAXRException(
+ "Service has no associated organization");
}
- if (service.getKey() != null && service.getKey().getId() != null) {
+ if (service.getKey() != null && service.getKey().getId() != null) {
bs.setServiceKey(service.getKey().getId());
} else {
bs.setServiceKey("");
}
CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
bs.setCategoryBag(catBag);
}
@@ -366,18 +382,18 @@
if (bt != null) {
bs.setBindingTemplates(bt);
}
-
+
log.debug("BusinessService=" + bs.toString());
- } catch (Exception ud) {
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return bs;
}
- public static TModel getTModelFromJAXRClassificationScheme(
- ClassificationScheme classificationScheme) throws JAXRException {
- TModel tm = objectFactory.createTModel();
- try {
+ public static TModel getTModelFromJAXRClassificationScheme(
+ ClassificationScheme classificationScheme) throws JAXRException {
+ TModel tm = objectFactory.createTModel();
+ try {
/*
* a fresh scheme might not have a key
*/
@@ -393,52 +409,53 @@
/*
* There's no reason to believe these are here either
*/
-
Slot s = classificationScheme.getSlot("authorizedName");
-/*
+ /*
if (s != null && s.getName() != null) {
tm.setAuthorizedName(s.getName());
}
-*/
+ */
s = classificationScheme.getSlot("operator");
-/*
+ /*
if (s != null && s.getName() != null) {
tm.setOperator(s.getName());
}
-*/
- InternationalString iname = classificationScheme.getName();
-
+ */
+ InternationalString iname = classificationScheme.getName();
+
tm.setName(getFirstName(iname));
- InternationalString idesc = classificationScheme.getDescription();
-
- addDescriptions(tm.getDescription(), idesc);
+ InternationalString idesc = classificationScheme.getDescription();
+
+ addDescriptions(tm.getDescription(), idesc);
IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(classificationScheme.getExternalIdentifiers());
- if (idBag!=null) {
+ if (idBag != null) {
tm.setIdentifierBag(idBag);
}
CategoryBag catBag = getCategoryBagFromClassifications(classificationScheme.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
tm.setCategoryBag(catBag);
}
-
- // ToDO: overviewDoc
- } catch (Exception ud) {
+
+ // ToDO: overviewDoc
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return tm;
}
public static TModel getTModelFromJAXRConcept(Concept concept)
- throws JAXRException {
- TModel tm = objectFactory.createTModel();
- if (concept == null)
- return null;
- try {
+ throws JAXRException {
+ TModel tm = objectFactory.createTModel();
+ if (concept == null) {
+ return null;
+ }
+ try {
Key key = concept.getKey();
- if (key != null && key.getId() != null)
- tm.setTModelKey(key.getId());
+ if (key != null && key.getId() != null) {
+ tm.setTModelKey(key.getId());
+ }
Slot sl1 = concept.getSlot("authorizedName");
/*
if (sl1 != null && sl1.getName() != null)
@@ -447,32 +464,31 @@
Slot sl2 = concept.getSlot("operator");
if (sl2 != null && sl2.getName() != null)
tm.setOperator(sl2.getName());
- */
- InternationalString iname = concept.getName();
+ */
+ InternationalString iname = concept.getName();
tm.setName(getFirstName(iname));
InternationalString idesc = concept.getDescription();
-
+
addDescriptions(tm.getDescription(), idesc);
// External Links
- Collection<ExternalLink> externalLinks = concept.getExternalLinks();
- if(externalLinks != null && externalLinks.size() > 0)
- {
- tm.getOverviewDoc().add(getOverviewDocFromExternalLink((ExternalLink)externalLinks.iterator().next()));
- }
+ Collection<ExternalLink> externalLinks = concept.getExternalLinks();
+ if (externalLinks != null && externalLinks.size() > 0) {
+ tm.getOverviewDoc().add(getOverviewDocFromExternalLink((ExternalLink) externalLinks.iterator().next()));
+ }
IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(concept.getExternalIdentifiers());
- if (idBag!=null) {
+ if (idBag != null) {
tm.setIdentifierBag(idBag);
}
CategoryBag catBag = getCategoryBagFromClassifications(concept.getClassifications());
- if (catBag!=null) {
+ if (catBag != null) {
tm.setCategoryBag(catBag);
}
- } catch (Exception ud) {
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return tm;
@@ -500,6 +516,7 @@
}
return null;
}
+
private static void addNames(List<Name> names, InternationalString iname) throws JAXRException {
for (Object o : iname.getLocalizedStrings()) {
LocalizedString locName = (LocalizedString) o;
@@ -511,52 +528,52 @@
}
public static BusinessEntity getBusinessEntityFromJAXROrg(Organization organization)
- throws JAXRException {
- BusinessEntity biz = objectFactory.createBusinessEntity();
- BusinessServices bss = objectFactory.createBusinessServices();
- BusinessService[] barr = new BusinessService[0];
+ throws JAXRException {
+ BusinessEntity biz = objectFactory.createBusinessEntity();
+ BusinessServices bss = objectFactory.createBusinessServices();
+ BusinessService[] barr = new BusinessService[0];
- try {
- // It may just be an update
+ try {
+ // It may just be an update
Key key = organization.getKey();
- if (key != null && key.getId() != null) {
- biz.setBusinessKey(key.getId());
+ if (key != null && key.getId() != null) {
+ biz.setBusinessKey(key.getId());
} else {
biz.setBusinessKey("");
}
- // Lets get the Organization attributes at the top level
-
- InternationalString iname = organization.getName();
-
- if (iname != null) {
+ // Lets get the Organization attributes at the top level
+
+ InternationalString iname = organization.getName();
+
+ if (iname != null) {
addNames(biz.getName(), iname);
- }
-
- InternationalString idesc = organization.getDescription();
-
+ }
+
+ InternationalString idesc = organization.getDescription();
+
addDescriptions(biz.getDescription(), idesc);
- if (organization.getPrimaryContact() != null &&
- organization.getPrimaryContact().getPersonName()!= null &&
- organization.getPrimaryContact().getPersonName().getFullName() != null) {
+ if (organization.getPrimaryContact() != null
+ && organization.getPrimaryContact().getPersonName() != null
+ && organization.getPrimaryContact().getPersonName().getFullName() != null) {
- //biz.setAuthorizedName(organization.getPrimaryContact().getPersonName()
- // .getFullName());
- }
+ //biz.setAuthorizedName(organization.getPrimaryContact().getPersonName()
+ // .getFullName());
+ }
Collection<Service> s = organization.getServices();
log.debug("?Org has services=" + s.isEmpty());
- barr = new BusinessService[s.size()];
+ barr = new BusinessService[s.size()];
Iterator<Service> iter = s.iterator();
- int barrPos = 0;
- while (iter.hasNext()) {
- BusinessService bs = ScoutJaxrUddiV3Helper
- .getBusinessServiceFromJAXRService((Service) iter
- .next());
- barr[barrPos] = bs;
- barrPos++;
+ int barrPos = 0;
+ while (iter.hasNext()) {
+ BusinessService bs = ScoutJaxrUddiV3Helper
+ .getBusinessServiceFromJAXRService((Service) iter
+ .next());
+ barr[barrPos] = bs;
+ barrPos++;
}
/*
@@ -564,16 +581,14 @@
* special designation for one of the users, and D6.1 seems to say
* that the first UDDI user is the primary contact
*/
-
- Contacts cts = objectFactory.createContacts();
- Contact[] carr = new Contact[0];
+ Contacts cts = objectFactory.createContacts();
+ Contact[] carr = new Contact[0];
User primaryContact = organization.getPrimaryContact();
Collection<User> users = organization.getUsers();
// Expand array to necessary size only (xmlbeans does not like
// null items in cases like this)
-
int carrSize = 0;
if (primaryContact != null) {
@@ -611,8 +626,8 @@
}
}
- bss.getBusinessService().addAll(Arrays.asList(barr));
- if (carr.length>0) {
+ bss.getBusinessService().addAll(Arrays.asList(barr));
+ if (carr.length > 0) {
cts.getContact().addAll(Arrays.asList(carr));
biz.setContacts(cts);
}
@@ -624,7 +639,9 @@
boolean first = true;
while (exiter.hasNext()) {
ExternalLink link = (ExternalLink) exiter.next();
- /** Note: jUDDI adds its own discoverURL as the businessEntity* */
+ /**
+ * Note: jUDDI adds its own discoverURL as the businessEntity*
+ */
if (first) {
emptyDUs = objectFactory.createDiscoveryURLs();
biz.setDiscoveryURLs(emptyDUs);
@@ -633,22 +650,22 @@
DiscoveryURL emptyDU = objectFactory.createDiscoveryURL();
emptyDUs.getDiscoveryURL().add(emptyDU);
emptyDU.setUseType("businessEntityExt");
-
+
if (link.getExternalURI() != null) {
emptyDU.setValue(link.getExternalURI());
}
}
-
- IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(organization.getExternalIdentifiers());
- if (idBag!=null) {
- biz.setIdentifierBag(idBag);
- }
- CategoryBag catBag = getCategoryBagFromClassifications(organization.getClassifications());
- if (catBag!=null) {
- biz.setCategoryBag(catBag);
- }
-
- } catch (Exception ud) {
+
+ IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(organization.getExternalIdentifiers());
+ if (idBag != null) {
+ biz.setIdentifierBag(idBag);
+ }
+ CategoryBag catBag = getCategoryBagFromClassifications(organization.getClassifications());
+ if (catBag != null) {
+ biz.setCategoryBag(catBag);
+ }
+
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return biz;
@@ -656,210 +673,225 @@
/**
*
- * Convert JAXR User Object to UDDI Contact
+ * Convert JAXR User Object to UDDI Contact
*/
public static Contact getContactFromJAXRUser(User user)
- throws JAXRException {
- Contact ct = objectFactory.createContact();
+ throws JAXRException {
+ Contact ct = objectFactory.createContact();
if (user == null) {
return null;
}
- Address[] addarr = new Address[0];
- Phone[] phonearr = new Phone[0];
- Email[] emailarr = new Email[0];
- try {
-
- if (user.getPersonName() != null && user.getPersonName().getFullName() != null) {
- org.uddi.api_v3.PersonName pn = new org.uddi.api_v3.PersonName();
- pn.setValue(user.getPersonName().getFullName());
- ct.getPersonName().add(pn);
- }
-
- if (user.getType() != null) {
- ct.setUseType(user.getType());
- }
- // Postal Address
+ Address[] addarr = new Address[0];
+ Phone[] phonearr = new Phone[0];
+ Email[] emailarr = new Email[0];
+ try {
+
+ if (user.getPersonName() != null && user.getPersonName().getFullName() != null) {
+ org.uddi.api_v3.PersonName pn = new org.uddi.api_v3.PersonName();
+ pn.setValue(user.getPersonName().getFullName());
+ ct.getPersonName().add(pn);
+ }
+
+ if (user.getType() != null) {
+ ct.setUseType(user.getType());
+ }
+ // Postal Address
Collection<PostalAddress> postc = user.getPostalAddresses();
- addarr = new Address[postc.size()];
+ addarr = new Address[postc.size()];
Iterator<PostalAddress> iterator = postc.iterator();
- int addarrPos = 0;
- while (iterator.hasNext()) {
+ int addarrPos = 0;
+ while (iterator.hasNext()) {
PostalAddress post = (PostalAddress) iterator.next();
- addarr[addarrPos] = ScoutJaxrUddiV3Helper.getAddress(post);
- addarrPos++;
+ addarr[addarrPos] = ScoutJaxrUddiV3Helper.getAddress(post);
+ addarrPos++;
}
- // Phone Numbers
+ // Phone Numbers
Collection ph = user.getTelephoneNumbers(null);
- phonearr = new Phone[ph.size()];
+ phonearr = new Phone[ph.size()];
Iterator it = ph.iterator();
- int phonearrPos = 0;
- while (it.hasNext()) {
+ int phonearrPos = 0;
+ while (it.hasNext()) {
TelephoneNumber t = (TelephoneNumber) it.next();
- Phone phone = objectFactory.createPhone();
+ Phone phone = objectFactory.createPhone();
String str = t.getNumber();
log.debug("Telephone=" + str);
-
- // FIXME: If phone number is null, should the phone
- // not be set at all, or set to empty string?
- if (str != null) {
- phone.setValue(str);
- } else {
- phone.setValue("");
- }
- phonearr[phonearrPos] = phone;
- phonearrPos++;
+ // FIXME: If phone number is null, should the phone
+ // not be set at all, or set to empty string?
+ if (str != null) {
+ phone.setValue(str);
+ } else {
+ phone.setValue("");
+ }
+
+ phonearr[phonearrPos] = phone;
+ phonearrPos++;
}
- // Email Addresses
+ // Email Addresses
Collection ec = user.getEmailAddresses();
- emailarr = new Email[ec.size()];
+ emailarr = new Email[ec.size()];
Iterator iter = ec.iterator();
- int emailarrPos = 0;
- while (iter.hasNext()) {
+ int emailarrPos = 0;
+ while (iter.hasNext()) {
EmailAddress ea = (EmailAddress) iter.next();
- Email email = objectFactory.createEmail();
-
- if (ea.getAddress() != null) {
- email.setValue(ea.getAddress());
- }
- // email.setText( ea.getAddress() );
-
- if (ea.getType() != null) {
- email.setUseType(ea.getType());
- }
+ Email email = objectFactory.createEmail();
- emailarr[emailarrPos] = email;
- emailarrPos++;
- }
- ct.getAddress().addAll(Arrays.asList(addarr));
- ct.getPhone().addAll(Arrays.asList(phonearr));
- ct.getEmail().addAll(Arrays.asList(emailarr));
- } catch (Exception ud) {
+ if (ea.getAddress() != null) {
+ email.setValue(ea.getAddress());
+ }
+ // email.setText( ea.getAddress() );
+
+ if (ea.getType() != null) {
+ email.setUseType(ea.getType());
+ }
+
+ emailarr[emailarrPos] = email;
+ emailarrPos++;
+ }
+ ct.getAddress().addAll(Arrays.asList(addarr));
+ ct.getPhone().addAll(Arrays.asList(phonearr));
+ ct.getEmail().addAll(Arrays.asList(emailarr));
+ } catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return ct;
}
- private static String getToken(String tokenstr) {
- // Token can have the value NULL which need to be converted into null
- if (tokenstr.equals("NULL"))
- tokenstr = "";
- return tokenstr;
- }
+ private static String getToken(String tokenstr) {
+ // Token can have the value NULL which need to be converted into null
+ if (tokenstr.equals("NULL")) {
+ tokenstr = "";
+ }
+ return tokenstr;
+ }
- private static String getUseType(String accessuri) {
- String acc = accessuri.toLowerCase();
- String uri = "other";
- if (acc.startsWith("http:"))
- uri = "http:";
- else if (acc.startsWith("https:"))
- uri = "https:";
- else if (acc.startsWith("ftp:"))
- uri = "ftp:";
- else if (acc.startsWith("phone:"))
- uri = "phone:";
+ private static String getUseType(String accessuri) {
+ String acc = accessuri.toLowerCase();
+ String uri = "other";
+ if (acc.startsWith("http:")) {
+ uri = "http:";
+ } else if (acc.startsWith("https:")) {
+ uri = "https:";
+ } else if (acc.startsWith("ftp:")) {
+ uri = "ftp:";
+ } else if (acc.startsWith("phone:")) {
+ uri = "phone:";
+ }
- return uri;
- }
-
- /**
- * According to JAXR Javadoc, there are two types of classification, internal and external and they use the Classification, Concept,
- * and ClassificationScheme objects. It seems the only difference between internal and external (as related to UDDI) is that the
- * name/value pair of the categorization is held in the Concept for internal classifications and the Classification for external (bypassing
- * the Concept entirely).
- *
- * The translation to UDDI is simple. Relevant objects have a category bag which contains a bunch of KeyedReferences (name/value pairs).
- * These KeyedReferences optionally refer to a tModel that identifies the type of category (translates to the ClassificationScheme key). If
- * this is set and the tModel doesn't exist in the UDDI registry, then an invalid key error will occur when trying to save the object.
- *
+ return uri;
+ }
+
+ /**
+ * According to JAXR Javadoc, there are two types of classification,
+ * internal and external and they use the Classification, Concept, and
+ * ClassificationScheme objects. It seems the only difference between
+ * internal and external (as related to UDDI) is that the name/value pair of
+ * the categorization is held in the Concept for internal classifications
+ * and the Classification for external (bypassing the Concept entirely).
+ *
+ * The translation to UDDI is simple. Relevant objects have a category bag
+ * which contains a bunch of KeyedReferences (name/value pairs). These
+ * KeyedReferences optionally refer to a tModel that identifies the type of
+ * category (translates to the ClassificationScheme key). If this is set and
+ * the tModel doesn't exist in the UDDI registry, then an invalid key error
+ * will occur when trying to save the object.
+ *
* @param classifications classifications to turn into categories
* @throws JAXRException
*/
- public static CategoryBag getCategoryBagFromClassifications(Collection classifications) throws JAXRException {
- try {
- if (classifications == null || classifications.size()==0)
- return null;
-
- // Classifications
- CategoryBag cbag = objectFactory.createCategoryBag();
- Iterator classiter = classifications.iterator();
- while (classiter.hasNext()) {
- Classification classification = (Classification) classiter.next();
- if (classification != null ) {
- KeyedReference keyr = objectFactory.createKeyedReference();
- cbag.getKeyedReference().add(keyr);
-
- InternationalStringImpl iname = null;
- String value = null;
- ClassificationScheme scheme = classification.getClassificationScheme();
- if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {
+ public static CategoryBag getCategoryBagFromClassifications(Collection classifications) throws JAXRException {
+ try {
+ if (classifications == null || classifications.size() == 0) {
+ return null;
+ }
+
+ // Classifications
+ CategoryBag cbag = objectFactory.createCategoryBag();
+ Iterator classiter = classifications.iterator();
+ while (classiter.hasNext()) {
+ Classification classification = (Classification) classiter.next();
+ if (classification != null) {
+ KeyedReference keyr = objectFactory.createKeyedReference();
+ cbag.getKeyedReference().add(keyr);
+
+ InternationalStringImpl iname = null;
+ String value = null;
+ ClassificationScheme scheme = classification.getClassificationScheme();
+ if (scheme == null || (classification.isExternal() && classification.getConcept() == null)) {
/*
* JAXR 1.0 Specification: Section D6.4.4
* Specification related tModels mapped from Concept may be automatically
* categorized by the well-known uddi-org:types taxonomy in UDDI (with
* tModelKey uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4) as follows:
* The keyed reference is assigned a taxonomy value of specification.
- */
+ */
keyr.setTModelKey(UDDI_ORG_TYPES);
- keyr.setKeyValue("specification");
+ keyr.setKeyValue("specification");
} else {
- if (classification.isExternal()) {
+ if (classification.isExternal()) {
iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
value = classification.getValue();
- } else {
- Concept concept = classification.getConcept();
- if (concept != null) {
- iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
- value = concept.getValue();
- scheme = concept.getClassificationScheme();
- }
- }
-
- String name = iname.getValue();
- if (name != null)
- keyr.setKeyName(name);
-
- if (value != null)
- keyr.setKeyValue(value);
-
- if (scheme != null) {
- Key key = scheme.getKey();
- if (key != null && key.getId() != null)
- keyr.setTModelKey(key.getId());
- }
- }
+ } else {
+ Concept concept = classification.getConcept();
+ if (concept != null) {
+ iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
+ value = concept.getValue();
+ scheme = concept.getClassificationScheme();
+ }
+ }
+
+ String name = iname.getValue();
+ if (name != null) {
+ keyr.setKeyName(name);
+ }
+
+ if (value != null) {
+ keyr.setKeyValue(value);
+ }
+
+ if (scheme != null) {
+ Key key = scheme.getKey();
+ if (key != null && key.getId() != null) {
+ keyr.setTModelKey(key.getId());
+ }
+ }
+ }
}
- }
- if (cbag.getKeyedReference().isEmpty()) return null;
- else return cbag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ }
+ if (cbag.getKeyedReference().isEmpty()) {
+ return null;
+ } else {
+ return cbag;
+ }
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
- public static TModelBag getTModelBagFromSpecifications(Collection specifications) throws JAXRException {
- try {
- if (specifications == null || specifications.size()==0)
- return null;
-
- // Classifications
- TModelBag tbag = objectFactory.createTModelBag();
- Iterator speciter = specifications.iterator();
- while (speciter.hasNext()) {
- RegistryObject registryobject = (RegistryObject) speciter.next();
- if (registryobject instanceof Concept) {
- Concept concept = (Concept) registryobject;
- if (concept.getKey() != null) {
- tbag.getTModelKey().add(concept.getKey().toString());
- }
+ public static TModelBag getTModelBagFromSpecifications(Collection specifications) throws JAXRException {
+ try {
+ if (specifications == null || specifications.size() == 0) {
+ return null;
+ }
+
+ // Classifications
+ TModelBag tbag = objectFactory.createTModelBag();
+ Iterator speciter = specifications.iterator();
+ while (speciter.hasNext()) {
+ RegistryObject registryobject = (RegistryObject) speciter.next();
+ if (registryobject instanceof Concept) {
+ Concept concept = (Concept) registryobject;
+ if (concept.getKey() != null) {
+ tbag.getTModelKey().add(concept.getKey().toString());
+ }
// SpecificationLink specificationlink = (SpecificationLink) registryobject;
// if (specificationlink.getSpecificationObject() != null) {
// RegistryObject ro = specificationlink.getSpecificationObject();
@@ -868,91 +900,96 @@
// tbag.getTModelKey().add(key.toString());
// }
// }
- } else {
- log.info("ebXML case - the RegistryObject is an ExtrinsicObject, Not implemented");
- }
- }
- if (tbag.getTModelKey().isEmpty()) return null;
- else return tbag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ } else {
+ log.info("ebXML case - the RegistryObject is an ExtrinsicObject, Not implemented");
+ }
+ }
+ if (tbag.getTModelKey().isEmpty()) {
+ return null;
+ } else {
+ return tbag;
+ }
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
-
- /**
+ /**
* Adds the objects identifiers from JAXR's external identifier collection
- *
+ *
* @param identifiers external identifiers to turn into identifiers
* @throws JAXRException
*/
- public static IdentifierBag getIdentifierBagFromExternalIdentifiers(Collection identifiers) throws JAXRException {
- try {
- if (identifiers == null || identifiers.size()==0)
- return null;
-
- // Identifiers
- IdentifierBag ibag = objectFactory.createIdentifierBag();
- Iterator iditer = identifiers.iterator();
- while (iditer.hasNext()) {
- ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
- if (extid != null ) {
- KeyedReference keyr = objectFactory.createKeyedReference();
- ibag.getKeyedReference().add(keyr);
-
- InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
- String value = extid.getValue();
- ClassificationScheme scheme = extid.getIdentificationScheme();
-
- String name = iname.getValue();
- if (name != null)
- keyr.setKeyName(name);
-
- if (value != null)
- keyr.setKeyValue(value);
-
- if (scheme != null) {
- Key key = scheme.getKey();
- if (key != null && key.getId() != null)
- keyr.setTModelKey(key.getId());
- }
- }
- }
- return ibag;
- } catch (Exception ud) {
- throw new JAXRException("Apache JAXR Impl:", ud);
- }
+ public static IdentifierBag getIdentifierBagFromExternalIdentifiers(Collection identifiers) throws JAXRException {
+ try {
+ if (identifiers == null || identifiers.size() == 0) {
+ return null;
+ }
+
+ // Identifiers
+ IdentifierBag ibag = objectFactory.createIdentifierBag();
+ Iterator iditer = identifiers.iterator();
+ while (iditer.hasNext()) {
+ ExternalIdentifier extid = (ExternalIdentifier) iditer.next();
+ if (extid != null) {
+ KeyedReference keyr = objectFactory.createKeyedReference();
+ ibag.getKeyedReference().add(keyr);
+
+ InternationalStringImpl iname = (InternationalStringImpl) ((RegistryObject) extid).getName();
+ String value = extid.getValue();
+ ClassificationScheme scheme = extid.getIdentificationScheme();
+
+ String name = iname.getValue();
+ if (name != null) {
+ keyr.setKeyName(name);
+ }
+
+ if (value != null) {
+ keyr.setKeyValue(value);
+ }
+
+ if (scheme != null) {
+ Key key = scheme.getKey();
+ if (key != null && key.getId() != null) {
+ keyr.setTModelKey(key.getId());
+ }
+ }
+ }
+ }
+ return ibag;
+ } catch (Exception ud) {
+ throw new JAXRException("Apache JAXR Impl:", ud);
+ }
}
-
+
private static OverviewDoc getOverviewDocFromExternalLink(ExternalLink link)
- throws JAXRException
- {
- OverviewDoc od = objectFactory.createOverviewDoc();
- String url = link.getExternalURI();
- if(url != null) {
- org.uddi.api_v3.OverviewURL ourl = new org.uddi.api_v3.OverviewURL();
- ourl.setValue(url.toString());
- od.setOverviewURL(ourl);
- }
- InternationalString extDesc = link.getDescription();
- if(extDesc != null) {
- Description description = objectFactory.createDescription();
- od.getDescription().add(description);
- description.setValue(extDesc.getValue());
- }
- return od;
- }
+ throws JAXRException {
+ OverviewDoc od = objectFactory.createOverviewDoc();
+ String url = link.getExternalURI();
+ if (url != null) {
+ org.uddi.api_v3.OverviewURL ourl = new org.uddi.api_v3.OverviewURL();
+ ourl.setValue(url.toString());
+ od.setOverviewURL(ourl);
+ }
+ InternationalString extDesc = link.getDescription();
+ if (extDesc != null) {
+ Description description = objectFactory.createDescription();
+ od.getDescription().add(description);
+ description.setValue(extDesc.getValue());
+ }
+ return od;
+ }
private static BindingTemplates getBindingTemplates(Collection serviceBindings)
- throws JAXRException {
+ throws JAXRException {
BindingTemplates bt = null;
- if(serviceBindings != null && serviceBindings.size() > 0) {
+ if (serviceBindings != null && serviceBindings.size() > 0) {
bt = objectFactory.createBindingTemplates();
Iterator iter = serviceBindings.iterator();
int currLoc = 0;
BindingTemplate[] bindingTemplateArray = new BindingTemplate[serviceBindings.size()];
- while(iter.hasNext()) {
- ServiceBinding sb = (ServiceBinding)iter.next();
+ while (iter.hasNext()) {
+ ServiceBinding sb = (ServiceBinding) iter.next();
bindingTemplateArray[currLoc] = getBindingTemplateFromJAXRSB(sb);
currLoc++;
}
@@ -960,6 +997,6 @@
bt.getBindingTemplate().addAll(Arrays.asList(bindingTemplateArray));
}
}
- return bt;
+ return bt;
}
}
diff --git a/src/main/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java b/src/main/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java
index 13e56e3..5093b25 100644
--- a/src/main/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java
+++ b/src/main/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java
@@ -319,7 +319,7 @@
PostalAddress pa = new PostalAddressImpl();
HashMap<String, String> hm = new HashMap<String, String>();
for (AddressLine anAddressLineArr : addressLineArr) {
- hm.put(anAddressLineArr.getKeyName(), anAddressLineArr.getKeyValue());
+ hm.put(anAddressLineArr.getKeyValue(), anAddressLineArr.getValue());
}
if (hm.containsKey("STREET_NUMBER")) {
diff --git a/src/main/java/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java b/src/main/java/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java
index 2455950..f1f26d4 100644
--- a/src/main/java/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java
+++ b/src/main/java/org/apache/ws/scout/util/ScoutUddiV3JaxrHelper.java
@@ -303,7 +303,7 @@
PostalAddress pa = new PostalAddressImpl();
HashMap<String, String> hm = new HashMap<String, String>();
for (AddressLine anAddressLineArr : addressLineArr) {
- hm.put(anAddressLineArr.getKeyName(), anAddressLineArr.getValue());
+ hm.put(anAddressLineArr.getKeyValue(), anAddressLineArr.getValue());
}
if (hm.containsKey("STREET_NUMBER")) {
diff --git a/src/site/site.xml b/src/site/site.xml
index 704960a..8cc79c8 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -19,7 +19,8 @@
-->
<project name="Apache Scout">
-
+
+ <version position="right"/>
<bannerLeft>
<name>Apache Scout</name>
<src>images/juddi_logo_v3.png</src>
@@ -28,11 +29,27 @@
<bannerRight>
<src>images/scout.jpg</src>
</bannerRight>
- <skin>
- <groupId>org.apache.maven.skins</groupId>
- <artifactId>maven-default-skin</artifactId>
- <version>1.0</version>
- </skin>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.6</version>
+ </skin>
+ <custom>
+ <fluidoSkin>
+ <googleSearch>
+ <sitesearch/>
+ </googleSearch>
+ <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled>
+ <gitHub>
+ <projectId>apache/maven-skins</projectId>
+ <ribbonOrientation>right</ribbonOrientation>
+ <ribbonColor>black</ribbonColor>
+ <projectId>apache/juddi</projectId>
+ </gitHub>
+ <topBarEnabled>true</topBarEnabled>
+ <sideBarEnabled>true</sideBarEnabled>
+ </fluidoSkin>
+ </custom>
<publishDate format="dd MMM yyyy" position="right"/>
@@ -52,7 +69,7 @@
<item name="Wiki" href="http://wiki.apache.org/juddi/scout"/>
</menu>
<menu name="Related Projects">
- <item name="Apache jUDDI" href="http://juddi.apache.org/" description="Apache jUDDI"/>
+ <item name="Apache jUDDI" href="http://juddi.apache.org/" />
</menu>
<menu ref="reports"/>
diff --git a/src/site/xdoc/releases.xml b/src/site/xdoc/releases.xml
index b88947b..37681e4 100644
--- a/src/site/xdoc/releases.xml
+++ b/src/site/xdoc/releases.xml
@@ -16,6 +16,11 @@
<td><strong>Date</strong></td>
<td><strong>Description</strong></td>
</tr>
+ <tr>
+ <td><a href="https://repository.apache.org/content/groups/public/org/apache/juddi/scout/scout/1.2.6/">scout-1.2.6</a></td>
+ <td>Nov 30, 2012</td>
+ <td>Version 1.2.7 of Scout, stable release</td>
+ </tr>
<tr>
<td><a href="https://repository.apache.org/content/groups/public/org/apache/juddi/scout/scout/1.2.6/">scout-1.2.6</a></td>
<td>March 6, 2012</td>
diff --git a/src/test/java/org/apache/ws/scout/Finder.java b/src/test/java/org/apache/ws/scout/Finder.java
index 0c6802c..d2fd790 100644
--- a/src/test/java/org/apache/ws/scout/Finder.java
+++ b/src/test/java/org/apache/ws/scout/Finder.java
@@ -177,7 +177,6 @@
{
Collection<ServiceBinding> serviceBindings=null;
Collection<String> findQualifiers = new ArrayList<String>();
- findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
Collection<Classification> classifications = new ArrayList<Classification>();
classifications.add(classification);
BulkResponse bulkResponse = bqm.findServiceBindings(serviceKey,findQualifiers,classifications,null);
@@ -194,7 +193,6 @@
{
Collection<ServiceBinding> serviceBindings=null;
Collection<String> findQualifiers = new ArrayList<String>();
- findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
Collection<SpecificationLink> specifications = new ArrayList<SpecificationLink>();
specifications.add(specLink);
BulkResponse bulkResponse = bqm.findServiceBindings(serviceKey,findQualifiers,null,specifications);
diff --git a/src/test/java/org/apache/ws/scout/registry/qa/JAXR010OrganizationTest.java b/src/test/java/org/apache/ws/scout/registry/qa/JAXR010OrganizationTest.java
index 7a762ac..0f2f78d 100644
--- a/src/test/java/org/apache/ws/scout/registry/qa/JAXR010OrganizationTest.java
+++ b/src/test/java/org/apache/ws/scout/registry/qa/JAXR010OrganizationTest.java
@@ -16,25 +16,30 @@
*/
package org.apache.ws.scout.registry.qa;
-import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import javax.xml.registry.BulkResponse;
+import javax.xml.registry.FindQualifier;
import javax.xml.registry.JAXRException;
import javax.xml.registry.JAXRResponse;
+import static javax.xml.registry.LifeCycleManager.PERSON_NAME;
import javax.xml.registry.RegistryService;
import javax.xml.registry.infomodel.Classification;
import javax.xml.registry.infomodel.ClassificationScheme;
+import javax.xml.registry.infomodel.EmailAddress;
import javax.xml.registry.infomodel.Key;
import javax.xml.registry.infomodel.Organization;
+import javax.xml.registry.infomodel.PersonName;
+import javax.xml.registry.infomodel.PostalAddress;
import javax.xml.registry.infomodel.Service;
import javax.xml.registry.infomodel.ServiceBinding;
+import javax.xml.registry.infomodel.TelephoneNumber;
+import javax.xml.registry.infomodel.User;
import junit.framework.JUnit4TestAdapter;
@@ -43,13 +48,23 @@
import org.apache.ws.scout.Finder;
import org.apache.ws.scout.Printer;
import org.apache.ws.scout.Remover;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.CITY;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.COUNTRY;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.EMAIL;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.PHONE_NUMBER;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.POSTAL_CODE;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.STATE;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.STREET;
+import static org.apache.ws.scout.registry.qa.JAXR015PrimaryContactTest.STREET_NUMBER;
import org.junit.After;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
/**
* Test to check Jaxr Publish
- * Open source UDDI Browser <http://www.uddibrowser.org>
+ * Open source UDDI Browser http://www.uddibrowser.org or using the juddi-gui project
* can be used to check your results
* @author <mailto:anil@apache.org>Anil Saldhana
* @since Nov 20, 2004
@@ -57,15 +72,42 @@
public class JAXR010OrganizationTest extends BaseTestCase
{
@Before
- public void setUp()
- {
+ public void setUp() {
super.setUp();
+ login();
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ ClassificationScheme cScheme = blm.createClassificationScheme("org.jboss.soa.esb.:testcategory", "JBossESB Classification Scheme");
+ ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>();
+ cSchemes.add(cScheme);
+ BulkResponse br = blm.saveClassificationSchemes(cSchemes);
+ assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
}
-
+
@After
- public void tearDown()
- {
- super.tearDown();
+ public void tearDown() {
+ super.tearDown();
+ login();
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ Collection<String> findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
+ Remover remover = new Remover(blm);
+ remover.removeClassificationScheme(cScheme);
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
}
@Test
@@ -136,11 +178,13 @@
System.err.println("JAXRExceptions " +
"occurred during save:");
Collection exceptions = br.getExceptions();
- Iterator iter = exceptions.iterator();
- while (iter.hasNext())
- {
- Exception e = (Exception) iter.next();
- System.err.println(e.toString());
+ if (exceptions!=null) {
+ Iterator iter = exceptions.iterator();
+ while (iter.hasNext())
+ {
+ Exception e = (Exception) iter.next();
+ System.err.println(e.toString());
+ }
}
}
@@ -157,18 +201,60 @@
login();
try
{
- // Get registry service and business query manager
RegistryService rs = connection.getRegistryService();
+ blm = rs.getBusinessLifeCycleManager();
+ bqm = rs.getBusinessQueryManager();
+ Creator creator = new Creator(blm);
+ Finder finder = new Finder(bqm, uddiversion);
+
+ Collection<Organization> orgs = new ArrayList<Organization>();
+ Organization organization = creator.createOrganization(this.getClass().getName());
+// Add a Service
+ Service service = creator.createService(this.getClass().getName());
+ ServiceBinding serviceBinding = creator.createServiceBinding();
+ service.addServiceBinding(serviceBinding);
+ organization.addService(service);
+
+
+ User user = blm.createUser();
+ PersonName personName = blm.createPersonName(PERSON_NAME);
+ TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
+ telephoneNumber.setNumber(PHONE_NUMBER);
+ telephoneNumber.setType(null);
+ PostalAddress address = blm.createPostalAddress(STREET_NUMBER,
+ STREET, CITY, STATE, COUNTRY, POSTAL_CODE, "");
+
+ Collection<PostalAddress> postalAddresses = new ArrayList<PostalAddress>();
+ postalAddresses.add(address);
+ Collection<EmailAddress> emailAddresses = new ArrayList<EmailAddress>();
+ EmailAddress emailAddress = blm.createEmailAddress(EMAIL);
+ emailAddresses.add(emailAddress);
+
+ Collection<TelephoneNumber> numbers = new ArrayList<TelephoneNumber>();
+ numbers.add(telephoneNumber);
+ user.setPersonName(personName);
+ user.setPostalAddresses(postalAddresses);
+ user.setEmailAddresses(emailAddresses);
+ user.setTelephoneNumbers(numbers);
+ organization.setPrimaryContact(user);
+
+ orgs.add(organization);
+
+ //Now save the Organization along with a Service, ServiceBinding and Classification
+ BulkResponse br = blm.saveOrganizations(orgs);
+
+ // Get registry service and business query manager
+ rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
System.out.println("We have the Business Query Manager");
Printer printer = new Printer();
- Finder finder = new Finder(bqm, uddiversion);
+ finder = new Finder(bqm, uddiversion);
- Collection orgs = finder.findOrganizationsByName(this.getClass().getName());
+ orgs = finder.findOrganizationsByName(this.getClass().getName());
if (orgs == null) {
fail("Only Expecting 1 Organization");
} else {
- assertEquals(1,orgs.size());
+ assertTrue(orgs.size()>=1);
// then step through them
for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();)
{
diff --git a/src/test/java/org/apache/ws/scout/registry/qa/JAXR015PrimaryContactTest.java b/src/test/java/org/apache/ws/scout/registry/qa/JAXR015PrimaryContactTest.java
index 6fc7668..d0fd0e6 100644
--- a/src/test/java/org/apache/ws/scout/registry/qa/JAXR015PrimaryContactTest.java
+++ b/src/test/java/org/apache/ws/scout/registry/qa/JAXR015PrimaryContactTest.java
@@ -26,6 +26,7 @@
import java.util.Iterator;
import javax.xml.registry.BulkResponse;
+import javax.xml.registry.FindQualifier;
import javax.xml.registry.JAXRException;
import javax.xml.registry.JAXRResponse;
import javax.xml.registry.RegistryService;
@@ -49,76 +50,101 @@
import org.apache.ws.scout.Printer;
import org.apache.ws.scout.Remover;
import org.junit.After;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
/**
* Test to check that the primary contact is added
+ *
* @author <a href="mailto:tcunning@redhat.com">Tom Cunningham</a>
* @since Dec 6, 2007
*/
-public class JAXR015PrimaryContactTest extends BaseTestCase
-{
- private static final String PERSON_NAME = "John AXel Rose";
- private static final String PHONE_NUMBER = "111-222-3333";
- private static final String STREET_NUMBER = "1";
- private static final String STREET = "Uddi Drive";
- private static final String CITY = "Apache Town";
- private static final String STATE = "CA";
- private static final String COUNTRY = "USA";
- private static final String POSTAL_CODE = "00000-1111";
+public class JAXR015PrimaryContactTest extends BaseTestCase {
- private static final String EMAIL = "jaxr@apache.org";
+ public static final String PERSON_NAME = "John AXel Rose";
+ public static final String PHONE_NUMBER = "111-222-3333";
+ public static final String STREET_NUMBER = "1";
+ public static final String STREET = "Uddi Drive";
+ public static final String CITY = "Apache Town";
+ public static final String STATE = "CA";
+ public static final String COUNTRY = "USA";
+ public static final String POSTAL_CODE = "00000-1111";
+
+ public static final String EMAIL = "jaxr@apache.org";
@Before
- public void setUp()
- {
+ public void setUp() {
super.setUp();
- }
-
- @After
- public void tearDown()
- {
- super.tearDown();
- }
-
- @Test
- public void publishClassificationScheme()
- {
login();
- try
- {
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ ClassificationScheme cScheme = blm.createClassificationScheme("org.jboss.soa.esb.:testcategory", "JBossESB Classification Scheme");
+ ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>();
+ cSchemes.add(cScheme);
+ BulkResponse br = blm.saveClassificationSchemes(cSchemes);
+ assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
+ }
+
+ @After
+ public void tearDown() {
+ super.tearDown();
+ login();
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ Collection<String> findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
+ Remover remover = new Remover(blm);
+ remover.removeClassificationScheme(cScheme);
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
+ }
+
+ @Test
+ public void publishClassificationScheme() {
+ login();
+ try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
Creator creator = new Creator(blm);
-
+
Collection<ClassificationScheme> schemes = new ArrayList<ClassificationScheme>();
ClassificationScheme classificationScheme = creator.createClassificationScheme(this.getClass().getName());
schemes.add(classificationScheme);
-
+
BulkResponse bulkResponse = blm.saveClassificationSchemes(schemes);
- assertEquals(JAXRResponse.STATUS_SUCCESS,bulkResponse.getStatus());
-
-
+ assertEquals(JAXRResponse.STATUS_SUCCESS, bulkResponse.getStatus());
+
} catch (JAXRException e) {
e.printStackTrace();
assertTrue(false);
- }
+ }
}
-
+
@Test
- public void publishOrganization()
- {
+ public void publishOrganization() {
BulkResponse response = null;
login();
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
bqm = rs.getBusinessQueryManager();
Creator creator = new Creator(blm);
Finder finder = new Finder(bqm, uddiversion);
-
+
Collection<Organization> orgs = new ArrayList<Organization>();
Organization organization = creator.createOrganization(this.getClass().getName());
// Add a Service
@@ -130,14 +156,14 @@
ClassificationScheme cs = finder.findClassificationSchemeByName(this.getClass().getName());
Classification classification = creator.createClassification(cs);
organization.addClassification(classification);
-
+
User user = blm.createUser();
PersonName personName = blm.createPersonName(PERSON_NAME);
TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
telephoneNumber.setNumber(PHONE_NUMBER);
telephoneNumber.setType(null);
PostalAddress address = blm.createPostalAddress(STREET_NUMBER,
- STREET, CITY, STATE, COUNTRY, POSTAL_CODE, "");
+ STREET, CITY, STATE, COUNTRY, POSTAL_CODE, "");
Collection<PostalAddress> postalAddresses = new ArrayList<PostalAddress>();
postalAddresses.add(address);
@@ -153,99 +179,136 @@
user.setTelephoneNumbers(numbers);
organization.setPrimaryContact(user);
- orgs.add(organization);
-
+ orgs.add(organization);
+
//Now save the Organization along with a Service, ServiceBinding and Classification
BulkResponse br = blm.saveOrganizations(orgs);
- if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
- {
+ if (br.getStatus() == JAXRResponse.STATUS_SUCCESS) {
System.out.println("Organization Saved");
Collection coll = br.getCollection();
Iterator iter = coll.iterator();
- while (iter.hasNext())
- {
+ while (iter.hasNext()) {
Key key = (Key) iter.next();
System.out.println("Saved Key=" + key.getId());
}//end while
- } else
- {
- System.err.println("JAXRExceptions " +
- "occurred during save:");
+ } else {
+ System.err.println("JAXRExceptions "
+ + "occurred during save:");
Collection exceptions = br.getExceptions();
- Iterator iter = exceptions.iterator();
- while (iter.hasNext())
- {
- Exception e = (Exception) iter.next();
- System.err.println(e.toString());
+ if (exceptions != null) {
+ Iterator iter = exceptions.iterator();
+ while (iter.hasNext()) {
+ Exception e = (Exception) iter.next();
+ System.err.println(e.toString());
+ }
}
}
-
+
} catch (JAXRException e) {
e.printStackTrace();
- assertTrue(false);
+ fail(e.getMessage());
}
assertNull(response);
}
-
+
@SuppressWarnings("unchecked")
@Test
- public void queryOrganization()
- {
+ public void queryOrganization() {
login();
- try
- {
- // Get registry service and business query manager
+ try {
+
RegistryService rs = connection.getRegistryService();
+ blm = rs.getBusinessLifeCycleManager();
+ bqm = rs.getBusinessQueryManager();
+ Creator creator = new Creator(blm);
+ Finder finder = new Finder(bqm, uddiversion);
+
+ Collection<Organization> orgs = new ArrayList<Organization>();
+ Organization organization = creator.createOrganization(this.getClass().getName());
+// Add a Service
+ Service service = creator.createService(this.getClass().getName());
+ ServiceBinding serviceBinding = creator.createServiceBinding();
+ service.addServiceBinding(serviceBinding);
+ organization.addService(service);
+
+
+ User user = blm.createUser();
+ PersonName personName = blm.createPersonName(PERSON_NAME);
+ TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
+ telephoneNumber.setNumber(PHONE_NUMBER);
+ telephoneNumber.setType(null);
+ PostalAddress address = blm.createPostalAddress(STREET_NUMBER,
+ STREET, CITY, STATE, COUNTRY, POSTAL_CODE, "");
+
+ Collection<PostalAddress> postalAddresses = new ArrayList<PostalAddress>();
+ postalAddresses.add(address);
+ Collection<EmailAddress> emailAddresses = new ArrayList<EmailAddress>();
+ EmailAddress emailAddress = blm.createEmailAddress(EMAIL);
+ emailAddresses.add(emailAddress);
+
+ Collection<TelephoneNumber> numbers = new ArrayList<TelephoneNumber>();
+ numbers.add(telephoneNumber);
+ user.setPersonName(personName);
+ user.setPostalAddresses(postalAddresses);
+ user.setEmailAddresses(emailAddresses);
+ user.setTelephoneNumbers(numbers);
+ organization.setPrimaryContact(user);
+
+ orgs.add(organization);
+
+ //Now save the Organization along with a Service, ServiceBinding and Classification
+ BulkResponse br = blm.saveOrganizations(orgs);
+
+
bqm = rs.getBusinessQueryManager();
System.out.println("We have the Business Query Manager");
Printer printer = new Printer();
- Finder finder = new Finder(bqm, uddiversion);
+ finder = new Finder(bqm, uddiversion);
- Collection orgs = finder.findOrganizationsByName(this.getClass().getName());
+ orgs = finder.findOrganizationsByName(this.getClass().getName());
if (orgs == null) {
fail("Only Expecting 1 Organization");
} else {
- assertEquals(1,orgs.size());
+ assertTrue(orgs.size() >= 1);
// then step through them
- for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();)
- {
+ for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();) {
Organization org = (Organization) orgIter.next();
System.out.println("Org name: " + printer.getName(org));
System.out.println("Org description: " + printer.getDescription(org));
System.out.println("Org key id: " + printer.getKey(org));
- User user = org.getPrimaryContact();
+ user = org.getPrimaryContact();
System.out.println("Primary Contact Full Name : " + user.getPersonName().getFullName());
- assertEquals("User name does not match", user.getPersonName().getFullName(), PERSON_NAME);
-
- Collection<EmailAddress> emailAddresses = user.getEmailAddresses();
- System.out.println("Found " + emailAddresses.size() + " email addresses.");
+ assertEquals("User name does not match", user.getPersonName().getFullName(), PERSON_NAME);
+
+ emailAddresses = user.getEmailAddresses();
+ System.out.println("Found " + emailAddresses.size() + " email addresses.");
assertEquals("Should have found 1 email address, found " + emailAddresses.size(), 1, emailAddresses.size());
- for (EmailAddress email : emailAddresses) {
- System.out.println("Primary Contact email : " + email.getAddress());
- assertEquals("Email should be " + EMAIL, EMAIL, email.getAddress());
+ for (EmailAddress email : emailAddresses) {
+ System.out.println("Primary Contact email : " + email.getAddress());
+ assertEquals("Email should be " + EMAIL, EMAIL, email.getAddress());
}
-
- Collection<PostalAddress> postalAddresses = user.getPostalAddresses();
- System.out.println("Found " + postalAddresses.size() + " postal addresses.");
+
+ postalAddresses = user.getPostalAddresses();
+ System.out.println("Found " + postalAddresses.size() + " postal addresses.");
assertEquals("Should have found 1 postal address, found " + postalAddresses.size(), 1, postalAddresses.size());
- for (PostalAddress postalAddress : postalAddresses) {
- System.out.println("Postal Address is " + postalAddress);
- assertEquals("Street number should be " + STREET_NUMBER, STREET_NUMBER, postalAddress.getStreetNumber());
- assertEquals("Street should be " + STREET, STREET, postalAddress.getStreet());
- assertEquals("City should be " + CITY, CITY, postalAddress.getCity());
- assertEquals("State should be " + STATE, STATE, postalAddress.getStateOrProvince());
- assertEquals("Country should be " + COUNTRY, COUNTRY, postalAddress.getCountry());
- assertEquals("Postal code should be " + POSTAL_CODE, POSTAL_CODE, postalAddress.getPostalCode());
+ for (PostalAddress postalAddress : postalAddresses) {
+ System.out.println("Postal Address is " + postalAddress);
+ assertEquals("Street number should be " + STREET_NUMBER, STREET_NUMBER, postalAddress.getStreetNumber());
+ assertEquals("Street should be " + STREET, STREET, postalAddress.getStreet());
+ assertEquals("City should be " + CITY, CITY, postalAddress.getCity());
+ assertEquals("State should be " + STATE, STATE, postalAddress.getStateOrProvince());
+ assertEquals("Country should be " + COUNTRY, COUNTRY, postalAddress.getCountry());
+ assertEquals("Postal code should be " + POSTAL_CODE, POSTAL_CODE, postalAddress.getPostalCode());
}
-
- Collection<TelephoneNumber> numbers = user.getTelephoneNumbers(null);
- System.out.println("Found " + numbers.size() + " telephone numbers.");
+
+ numbers = user.getTelephoneNumbers(null);
+ System.out.println("Found " + numbers.size() + " telephone numbers.");
assertEquals("Should have found 1 phone number, found " + numbers.size(), 1, numbers.size());
- for (TelephoneNumber tele : numbers) {
- System.out.println("Phone number is " + tele.getNumber());
- assertEquals("Telephone number should be " + PHONE_NUMBER, PHONE_NUMBER, tele.getNumber());
- }
+ for (TelephoneNumber tele : numbers) {
+ System.out.println("Phone number is " + tele.getNumber());
+ assertEquals("Telephone number should be " + PHONE_NUMBER, PHONE_NUMBER, tele.getNumber());
+ }
printer.printServices(org);
printer.printClassifications(org);
}
@@ -253,38 +316,34 @@
} catch (JAXRException e) {
e.printStackTrace();
fail(e.getMessage());
- }
+ }
}
-
+
@Test
- public void deleteOrganization()
- {
+ public void deleteOrganization() {
login();
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
- // Get registry service and business query manager
+ // Get registry service and business query manager
bqm = rs.getBusinessQueryManager();
System.out.println("We have the Business Query Manager");
Finder finder = new Finder(bqm, uddiversion);
Remover remover = new Remover(blm);
Collection orgs = finder.findOrganizationsByName(this.getClass().getName());
- for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();)
- {
+ for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();) {
Organization org = (Organization) orgIter.next();
remover.removeOrganization(org);
}
-
+
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
-
+
@Test
- public void deleteClassificationScheme()
- {
+ public void deleteClassificationScheme() {
login();
try {
RegistryService rs = connection.getRegistryService();
@@ -294,18 +353,17 @@
Finder finder = new Finder(bqm, uddiversion);
Remover remover = new Remover(blm);
Collection schemes = finder.findClassificationSchemesByName(this.getClass().getName());
- for (Iterator iter = schemes.iterator(); iter.hasNext();)
- {
+ for (Iterator iter = schemes.iterator(); iter.hasNext();) {
ClassificationScheme scheme = (ClassificationScheme) iter.next();
remover.removeClassificationScheme(scheme);
}
-
+
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
-
+
public static junit.framework.Test suite() {
return new JUnit4TestAdapter(JAXR015PrimaryContactTest.class);
}
diff --git a/src/test/java/org/apache/ws/scout/registry/qa/JAXR030AssociationsTest.java b/src/test/java/org/apache/ws/scout/registry/qa/JAXR030AssociationsTest.java
index 848e060..73fa58c 100644
--- a/src/test/java/org/apache/ws/scout/registry/qa/JAXR030AssociationsTest.java
+++ b/src/test/java/org/apache/ws/scout/registry/qa/JAXR030AssociationsTest.java
@@ -40,6 +40,7 @@
import org.apache.ws.scout.BaseTestCase;
import org.apache.ws.scout.Creator;
import org.junit.After;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -117,6 +118,7 @@
System.out.println("\nSearching for newly created organizations...\n");
ArrayList<Organization> newOrgs = findTempOrgs();
+ Assert.assertEquals(2, newOrgs.size());
sOrg = newOrgs.get(0);
tOrg = newOrgs.get(1);
diff --git a/src/test/java/org/apache/ws/scout/registry/qa/JAXR050ServiceBindingTest.java b/src/test/java/org/apache/ws/scout/registry/qa/JAXR050ServiceBindingTest.java
index 0a173a2..44a56c1 100644
--- a/src/test/java/org/apache/ws/scout/registry/qa/JAXR050ServiceBindingTest.java
+++ b/src/test/java/org/apache/ws/scout/registry/qa/JAXR050ServiceBindingTest.java
@@ -24,9 +24,11 @@
import javax.xml.registry.BulkResponse;
import javax.xml.registry.BusinessLifeCycleManager;
+import javax.xml.registry.FindQualifier;
import javax.xml.registry.JAXRException;
import javax.xml.registry.JAXRResponse;
import javax.xml.registry.RegistryService;
+import javax.xml.registry.infomodel.ClassificationScheme;
import javax.xml.registry.infomodel.Concept;
import javax.xml.registry.infomodel.ExternalLink;
import javax.xml.registry.infomodel.InternationalString;
@@ -40,7 +42,10 @@
import org.apache.ws.scout.BaseTestCase;
import org.apache.ws.scout.Finder;
+import org.apache.ws.scout.Remover;
import org.junit.After;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
@@ -67,14 +72,42 @@
String tempOrgName = "Apache JAXR Service Org -- APACHE SCOUT TEST";
@Before
- public void setUp()
- {
- super.setUp();
+ public void setUp() {
+ super.setUp();
+ login();
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ ClassificationScheme cScheme = blm.createClassificationScheme("org.jboss.soa.esb.:testcategory", "JBossESB Classification Scheme");
+ ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>();
+ cSchemes.add(cScheme);
+ BulkResponse br = blm.saveClassificationSchemes(cSchemes);
+ assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
}
+
@After
- public void tearDown()
- {
+ public void tearDown() {
super.tearDown();
+ login();
+ try {
+ RegistryService rs = connection.getRegistryService();
+ bqm = rs.getBusinessQueryManager();
+ blm = rs.getBusinessLifeCycleManager();
+ Collection<String> findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
+ Remover remover = new Remover(blm);
+ remover.removeClassificationScheme(cScheme);
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
}
/**
@@ -109,13 +142,13 @@
SpecificationLink specLink = blm.createSpecificationLink();
- Concept concept = null;
+ /*Concept concept = null;
if ("3.0".equals(uddiversion)) {
concept = (Concept)bqm.getRegistryObject("uddi:uddi.org:findqualifier:orlikekeys", BusinessLifeCycleManager.CONCEPT);
} else {
concept = (Concept)bqm.getRegistryObject("uuid:AD61DE98-4DB8-31B2-A299-A2373DC97212",BusinessLifeCycleManager.CONCEPT);
}
- specLink.setSpecificationObject(concept);
+ specLink.setSpecificationObject(concept);*/
//find serviceBinding
Collection<ServiceBinding> serviceBindings2 = finder.findServiceBindings(tmpSvcKey, specLink);
diff --git a/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java b/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
index b78199b..1366ca8 100644
--- a/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
+++ b/src/test/java/org/apache/ws/scout/registry/qa/JAXR060RegistryTest.java
@@ -18,7 +18,7 @@
* 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.apache.ws.scout.registry.qa;
import static org.junit.Assert.assertEquals;
@@ -53,18 +53,17 @@
/**
* Testing the registry.
- *
+ *
* @author kstam
*
*/
-public class JAXR060RegistryTest extends BaseTestCase
-{
+public class JAXR060RegistryTest extends BaseTestCase {
+
@Before
public void setUp() {
super.setUp();
login();
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
blm = rs.getBusinessLifeCycleManager();
@@ -73,7 +72,8 @@
cSchemes.add(cScheme);
BulkResponse br = blm.saveClassificationSchemes(cSchemes);
assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
- } catch (JAXRException je) {
+ } catch (Exception je) {
+ je.printStackTrace();
fail(je.getMessage());
}
}
@@ -88,74 +88,72 @@
blm = rs.getBusinessLifeCycleManager();
Collection<String> findQualifiers = new ArrayList<String>();
findQualifiers.add(FindQualifier.AND_ALL_KEYS);
- findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
Remover remover = new Remover(blm);
remover.removeClassificationScheme(cScheme);
- } catch (JAXRException je) {
+ } catch (Exception je) {
+ je.printStackTrace();
fail(je.getMessage());
}
}
-
- /**
- * Tests the successful creation of the RED HAT/JBossESB Organization.
- */
- @SuppressWarnings("unchecked")
+
+ /**
+ * Tests the successful creation of the RED HAT/JBossESB Organization.
+ */
+ @SuppressWarnings("unchecked")
@Test
- public void publishCheckAndDelete()
- {
+ public void publishCheckAndDelete() {
login();
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
Creator creator = new Creator(blm);
-
+
Collection<Organization> organizations = new ArrayList<Organization>();
Organization organization = creator.createOrganization("Red Hat/JBossESB");
organizations.add(organization);
BulkResponse br = blm.saveOrganizations(organizations);
- assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
- } catch (JAXRException je) {
- je.printStackTrace();
- assertTrue(false);
- }
- //find organization
- try
- {
+ assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
+ } catch (JAXRException je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
+ //find organization
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
Finder finder = new Finder(bqm, uddiversion);
- Collection<Organization> orgs = finder.findOrganizationsByName("Red Hat/JBossESB");
- Organization org = orgs.iterator().next();
- assertEquals("Red Hat/JBossESB", org.getName().getValue());
- } catch (JAXRException je) {
- fail(je.getMessage());
- }
- try {
+ Collection<Organization> orgs = finder.findOrganizationsByName("Red Hat/JBossESB");
+ Organization org = orgs.iterator().next();
+ assertEquals("Red Hat/JBossESB", org.getName().getValue());
+ } catch (JAXRException je) {
+ fail(je.getMessage());
+ }
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
Finder finder = new Finder(bqm, uddiversion);
Collection<Organization> orgs = finder.findOrganizationsByName("Not Existing Org");
- assertEquals(0, orgs.size());
- } catch (JAXRException je) {
- fail(je.getMessage());
- }
+ assertEquals(0, orgs.size());
+ } catch (JAXRException je) {
+ fail(je.getMessage());
+ }
//Publish a service
- try {
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
Finder finder = new Finder(bqm, uddiversion);
Collection<Organization> orgs = finder.findOrganizationsByName("Red Hat/JBossESB");
Organization organization = orgs.iterator().next();
-
+
blm = rs.getBusinessLifeCycleManager();
//Adding the category as prefix for the name
Service service = blm.createService(blm.createInternationalString("Registry Test ServiceName"));
service.setDescription(blm.createInternationalString("Registry Test Service Description"));
Collection<String> findQualifiers = new ArrayList<String>();
findQualifiers.add(FindQualifier.AND_ALL_KEYS);
- findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
Classification classification = blm.createClassification(cScheme, "category", "registry");
service.addClassification(classification);
@@ -164,18 +162,18 @@
services.add(service);
BulkResponse br = blm.saveServices(services);
assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
- } catch (JAXRException je) {
- fail(je.getMessage());
- }
- //find Service
- try
- {
+ } catch (JAXRException je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
+ //find Service
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
blm = rs.getBusinessLifeCycleManager();
Finder finder = new Finder(bqm, uddiversion);
//Find the service
- Service service = finder.findService("registry","Registry Test ServiceName", blm);
+ Service service = finder.findService("registry", "Registry Test ServiceName", blm);
assertEquals("Registry Test ServiceName", service.getName().getValue());
} catch (JAXRException je) {
fail(je.getMessage());
@@ -187,89 +185,93 @@
blm = rs.getBusinessLifeCycleManager();
Finder finder = new Finder(bqm, uddiversion);
//Find the service
- Service service = finder.findService("registry","Registry Test ServiceName", blm);
-
+ Service service = finder.findService("registry", "Registry Test ServiceName", blm);
+
ServiceBinding serviceBinding = blm.createServiceBinding();
serviceBinding.setDescription(blm.createInternationalString("eprDescription"));
String xml = "<epr>epr uri</epr>";
serviceBinding.setAccessURI(xml);
-
+
ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
serviceBindings.add(serviceBinding);
service.addServiceBindings(serviceBindings);
Collection<String> findQualifiers = new ArrayList<String>();
findQualifiers.add(FindQualifier.AND_ALL_KEYS);
- findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ //findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
Classification classification = blm.createClassification(cScheme, "category", "registry");
service.addClassification(classification);
-
- BulkResponse br = blm.saveServiceBindings(serviceBindings);
+
+ BulkResponse br = blm.saveServiceBindings(serviceBindings);
assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
- BulkResponse br2 = blm.saveServiceBindings(serviceBindings); //Save one more
+ BulkResponse br2 = blm.saveServiceBindings(serviceBindings); //Save one more
assertEquals(BulkResponse.STATUS_SUCCESS, br2.getStatus());
-
+
+ findQualifiers = new ArrayList<String>();
+ findQualifiers.add(FindQualifier.AND_ALL_KEYS);
+
+ cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
//Delete one binding
- Collection<ServiceBinding> serviceBindings2 = finder.findServiceBindings(service.getKey(),classification);
- if ((serviceBindings2 != null) && (serviceBindings2.iterator() != null)
- && (serviceBindings2.iterator().hasNext())) {
- ServiceBinding serviceBinding2 = serviceBindings2.iterator().next();
- Remover remover = new Remover(blm);
- remover.removeServiceBinding(serviceBinding2);
+ Collection<ServiceBinding> serviceBindings2 = finder.findServiceBindings(service.getKey(), classification);
+ if ((serviceBindings2 != null) && (serviceBindings2.iterator() != null)
+ && (serviceBindings2.iterator().hasNext())) {
+ ServiceBinding serviceBinding2 = serviceBindings2.iterator().next();
+ Remover remover = new Remover(blm);
+ remover.removeServiceBinding(serviceBinding2);
}
- } catch (JAXRException re) {
- fail(re.getMessage());
- }
+ } catch (JAXRException re) {
+ re.printStackTrace();
+ fail(re.getMessage());
+ }
//find all services for this organization
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
Finder finder = new Finder(bqm, uddiversion);
- Collection<Organization> orgs = finder.findOrganizationsByName("Red Hat/JBossESB");
+ Collection<Organization> orgs = finder.findOrganizationsByName("Red Hat/JBossESB");
Organization org = orgs.iterator().next();
- //Listing out the services and their Bindings
- System.out.println("-------------------------------------------------");
+ //Listing out the services and their Bindings
+ System.out.println("-------------------------------------------------");
System.out.println("Organization name: " + org.getName().getValue());
System.out.println("Description: " + org.getDescription().getValue());
System.out.println("Key id: " + org.getKey().getId());
- User primaryContact = org.getPrimaryContact();
+ User primaryContact = org.getPrimaryContact();
System.out.println("Primary Contact: " + primaryContact.getPersonName().getFullName());
- Collection services = org.getServices();
- for (Iterator serviceIter = services.iterator();serviceIter.hasNext();) {
- Service service = (Service) serviceIter.next();
+ Collection services = org.getServices();
+ for (Iterator serviceIter = services.iterator(); serviceIter.hasNext();) {
+ Service service = (Service) serviceIter.next();
System.out.println("- Service Name: " + service.getName().getValue());
System.out.println(" Service Key : " + service.getKey().getId());
- Collection serviceBindings = service.getServiceBindings();
- for (Iterator serviceBindingIter = serviceBindings.iterator();serviceBindingIter.hasNext();){
- ServiceBinding serviceBinding = (ServiceBinding) serviceBindingIter.next();
+ Collection serviceBindings = service.getServiceBindings();
+ for (Iterator serviceBindingIter = serviceBindings.iterator(); serviceBindingIter.hasNext();) {
+ ServiceBinding serviceBinding = (ServiceBinding) serviceBindingIter.next();
System.out.println(" ServiceBinding Description: " + serviceBinding.getDescription().getValue());
- String xml = serviceBinding.getAccessURI();
+ String xml = serviceBinding.getAccessURI();
System.out.println(" ServiceBinding URI: " + xml);
- assertEquals("<epr>epr uri</epr>",xml);
- }
- }
+ assertEquals("<epr>epr uri</epr>", xml);
+ }
+ }
System.out.println("-------------------------------------------------");
- } catch (Exception je) {
- fail(je.getMessage());
- }
+ } catch (Exception je) {
+ je.printStackTrace();
+ fail(je.getMessage());
+ }
//delete the service
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
blm = rs.getBusinessLifeCycleManager();
Finder finder = new Finder(bqm, uddiversion);
//Find the service
- Service service = finder.findService("registry","Registry Test ServiceName", blm);
+ Service service = finder.findService("registry", "Registry Test ServiceName", blm);
Remover remover = new Remover(blm);
remover.removeService(service);
} catch (JAXRException je) {
+ je.printStackTrace();
fail(je.getMessage());
}
//delete the organization
- try
- {
+ try {
RegistryService rs = connection.getRegistryService();
bqm = rs.getBusinessQueryManager();
blm = rs.getBusinessLifeCycleManager();
@@ -279,14 +281,13 @@
Remover remover = new Remover(blm);
remover.removeOrganization(org);
} catch (JAXRException je) {
+ je.printStackTrace();
fail(je.getMessage());
}
}
-
-
- public static junit.framework.Test suite() {
- return new JUnit4TestAdapter(JAXR060RegistryTest.class);
- }
+ public static junit.framework.Test suite() {
+ return new JUnit4TestAdapter(JAXR060RegistryTest.class);
+ }
}
diff --git a/src/test/resources/META-INF/jaxr-uddi.xml b/src/test/resources/META-INF/jaxr-uddi.xml
index 79c4201..691f239 100644
--- a/src/test/resources/META-INF/jaxr-uddi.xml
+++ b/src/test/resources/META-INF/jaxr-uddi.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<uddi>
<reloadDelay>5000</reloadDelay>
- <manager name="jaxr">
+ <client name="jaxr">
<nodes>
<node isHomeJUDDI="true">
<name>jaxr-client</name>
@@ -12,5 +12,5 @@
<securityUrl>${javax.xml.registry.securityManagerURL}</securityUrl>
</node>
</nodes>
- </manager>
+ </client>
</uddi>
\ No newline at end of file