You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2013/12/08 19:25:12 UTC
svn commit: r1549095 - in /juddi/trunk: juddi-rest-cxf/
juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/
juddi-rest-cxf/src/test/ juddi-rest-cxf/src/test/java/
juddi-rest-cxf/src/test/java/org/ juddi-rest-cxf/src/test/java/org/apache/
juddi...
Author: alexoree
Date: Sun Dec 8 18:25:11 2013
New Revision: 1549095
URL: http://svn.apache.org/r1549095
Log:
JUDDI-740 fixed
JUDDI-742 added test cases for most operations.
Added:
juddi/trunk/juddi-rest-cxf/src/test/
juddi/trunk/juddi-rest-cxf/src/test/java/
juddi/trunk/juddi-rest-cxf/src/test/java/org/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/
juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
juddi/trunk/juddi-rest-cxf/src/test/resources/
juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/
juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/orm.xml
juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/uddi.xml
juddi/trunk/juddi-rest-cxf/src/test/resources/juddiv3.xml
juddi/trunk/juddi-rest-cxf/src/test/resources/log4j.xml
juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/classes/schemas/spring-util.xsd
Modified:
juddi/trunk/juddi-rest-cxf/pom.xml
juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java
juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml
juddi/trunk/juddiv3-war/pom.xml
juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/OperationalInfo.java
Modified: juddi/trunk/juddi-rest-cxf/pom.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/pom.xml?rev=1549095&r1=1549094&r2=1549095&view=diff
==============================================================================
--- juddi/trunk/juddi-rest-cxf/pom.xml (original)
+++ juddi/trunk/juddi-rest-cxf/pom.xml Sun Dec 8 18:25:11 2013
@@ -1,121 +1,259 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-parent</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-rest-cxf</artifactId>
- <packaging>bundle</packaging>
- <name>jUDDI REST Services using Apache CXF</name>
- <dependencies>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>uddi-ws</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-client</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>juddi-core</artifactId>
- <version>${project.parent.version}</version>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-parent</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-rest-cxf</artifactId>
+ <packaging>bundle</packaging>
+ <name>jUDDI REST Services using Apache CXF</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-ws</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-client</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-core</artifactId>
+ <version>${project.parent.version}</version>
<scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.juddi</groupId>
- <artifactId>uddi-tck-base</artifactId>
- <version>${project.parent.version}</version>
- <scope>test</scope>
- </dependency>
-<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
- <version>1.9</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.1</version>
-</dependency>
-<dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-bundle-jaxrs</artifactId>
- <version>2.7.5</version>
- <scope>provided</scope>
- </dependency>
-
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-tck-base</artifactId>
+ <version>${project.parent.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>1.4.0</version>
- <configuration>
- <instructions>
- <Export-Package>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-bundle-jaxrs</artifactId>
+ <version>2.7.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-ws</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>juddi-client</artifactId>
+ <version>${project.parent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>3.2.2.RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>3.2.2.RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.juddi</groupId>
+ <artifactId>uddi-tck-base</artifactId>
+ <version>${project.parent.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <version>3.2.5.ga</version>
+ <exclusions>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.1.ga</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.1_3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.javamail</groupId>
+ <artifactId>geronimo-javamail_1.4_mail</artifactId>
+ <version>1.8.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxrs_1.1_spec</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.5.3.0_1</version>
+ <scope>test</scope>
+
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.2-504.jdbc3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockejb</groupId>
+ <artifactId>mockejb</artifactId>
+ <version>0.6-beta2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-extension-providers</artifactId>
+ <version>2.7.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <version>1.3.4</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.0</version>
+ <configuration>
+ <instructions>
+ <Export-Package>
+
org.apache.juddi.api.impl.rest
-
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <configuration>
- <tasks>
- <delete dir="juddi-derby-test-db" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>hibernate3-maven-plugin</artifactId>
- <version>2.2</version>
- <!-- <executions> <execution> <phase>process-classes</phase> <goals>
+
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <configuration>
+ <tasks>
+ <delete dir="juddi-derby-test-db" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>hibernate3-maven-plugin</artifactId>
+ <version>2.2</version>
+ <!-- <executions> <execution> <phase>process-classes</phase> <goals>
<goal>hbm2ddl</goal> </goals> </execution> </executions> -->
- <configuration>
- <components>
- <component>
- <name>hbm2ddl</name>
- <implementation>jpaconfiguration</implementation>
- </component>
- </components>
- <componentProperties>
- <persistenceunit>juddiDatabase</persistenceunit>
- <outputfilename>schema.ddl</outputfilename>
- <drop>false</drop>
- <create>true</create>
- <export>false</export>
- <format>true</format>
- </componentProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <configuration>
+ <components>
+ <component>
+ <name>hbm2ddl</name>
+ <implementation>jpaconfiguration</implementation>
+ </component>
+ </components>
+ <componentProperties>
+ <persistenceunit>juddiDatabase</persistenceunit>
+ <outputfilename>schema.ddl</outputfilename>
+ <drop>false</drop>
+ <create>true</create>
+ <export>false</export>
+ <format>true</format>
+ </componentProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Modified: juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java?rev=1549095&r1=1549094&r2=1549095&view=diff
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java (original)
+++ juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java Sun Dec 8 18:25:11 2013
@@ -27,6 +27,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.juddi.api.impl.UDDIInquiryImpl;
import org.apache.juddi.api_v3.AccessPointType;
+import org.apache.juddi.api_v3.rest.UriContainer;
import org.apache.juddi.v3.client.mapping.ReadWSDL;
import org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl;
import org.apache.juddi.v3.client.mapping.WSDL2UDDI;
@@ -272,7 +273,7 @@ public class UDDIInquiryJAXRS {
@Path("/XML/endpointsByService/{id}")
@Produces("application/json")
@org.apache.cxf.jaxrs.model.wadl.Description("Returns the binding details of a given entity in JSON")
- public List<URI> geEndpointsByServiceJSON(@PathParam("id") String id) throws WebApplicationException {
+ public UriContainer geEndpointsByServiceJSON(@PathParam("id") String id) throws WebApplicationException {
return getEndpointsByService(id);
}
@@ -287,32 +288,67 @@ public class UDDIInquiryJAXRS {
@Path("/XML/endpointsByService/{id}")
@Produces("application/xml")
@org.apache.cxf.jaxrs.model.wadl.Description("Returns the binding details of a given entity in XML")
- public List<URI> getEndpointsByServiceXML(@PathParam("id") String id) throws WebApplicationException {
+ public UriContainer getEndpointsByServiceXML(@PathParam("id") String id) throws WebApplicationException {
return getEndpointsByService(id);
}
+
+ /**
+ * 6.5 HTTP GET Services for UDDI Data Structures
+A node may offer an HTTP GET service for access to the XML representations of UDDI data structures. If a node offers this service, the URLs should be in a format that is predictable and uses the entity key as a URL parameter.
- private List<URI> getEndpointsByService(String id) throws WebApplicationException {
- List<URI> ret = new ArrayList<URI>();
- GetServiceDetail fs = new GetServiceDetail();
- //TODO fs.setAuthInfo(rootAuthToken.getAuthInfo());
+The RECOMMENDED syntax for the URLs for such a service is as follows:
+
+If a UDDI nodeâs base URI is http://uddi.example.org/mybase, then the URI http://uddi.example.org/mybase?<entity>Key=uddiKey would retrieve the XML for the data structure whose type is <entity> and whose key is uddiKey. For example, the XML representation of a tModel whose key is "uddi:tempuri.com:fish:interface" can be retrieved by using the URL http://uddi.example.org/mybase?tModelKey=uddi:tempuri.com:fish:interface.
+
+In the case of businessEntities, the node MAY add these URIs to the businessEntityâs discoveryURLs structure, though this is NOT RECOMMENDED behavior as it complicates the use of digital signatures.
+
+
+ * @param id
+ * @return
+ * @throws WebApplicationException
+ */
+ @GET
+ @Path("/base/{entitykey}/{key}")
+ @Produces("application/xml")
+ @org.apache.cxf.jaxrs.model.wadl.Description("Returns the selected UDDI entity as XML per section 6.5 of the UDDIv3 specification. Use businessKey, tmodelKey, bindingKey or serviceKey ")
+ public Object getEntityAsXML(@PathParam("entitykey") String entity,@PathParam("key") String key) throws WebApplicationException {
+ if (entity.equalsIgnoreCase("businessKey"))
+ return getBusinessDetailXML(key);
+ if (entity.equalsIgnoreCase("tmodelKey"))
+ return getTModelDetailXML(key);
+ if (entity.equalsIgnoreCase("bindingKey"))
+ return getBindingDetailXML(key);
+ if (entity.equalsIgnoreCase("serviceKey"))
+ return getServiceDetailXML(key);
+ throw new WebApplicationException(400);
+ }
+
+ private UriContainer getEndpointsByService(String id) throws WebApplicationException {
+ UriContainer c = new UriContainer();
+ List<String> ret = new ArrayList<String>();
+ GetServiceDetail fs = new GetServiceDetail();
+
fs.getServiceKey().add(id);
try {
ServiceDetail serviceDetail = inquiry.getServiceDetail(fs);
if (serviceDetail == null || serviceDetail.getBusinessService().isEmpty()) {
throw new WebApplicationException(400);
} else {
- List<URI> endpoints = GetEndpoints(serviceDetail, null);
+ List<String> endpoints = GetEndpoints(serviceDetail, null);
ret.addAll(endpoints);
}
} catch (DispositionReportFaultMessage ex) {
HandleException(ex);
}
- return ret;
+ c.setUriList(ret);
+ return c;
}
+
+
- private List<URI> GetEndpoints(ServiceDetail serviceDetail, String authInfo) throws DispositionReportFaultMessage {
- List<URI> items = new ArrayList<URI>();
+ private List<String> GetEndpoints(ServiceDetail serviceDetail, String authInfo) throws DispositionReportFaultMessage {
+ List<String> items = new ArrayList<String>();
if (serviceDetail == null) {
return items;
}
@@ -326,8 +362,8 @@ public class UDDIInquiryJAXRS {
return items;
}
- private List<URI> GetBindingInfo(String value, String cred) throws DispositionReportFaultMessage {
- List<URI> items = new ArrayList<URI>();
+ private List<String> GetBindingInfo(String value, String cred) throws DispositionReportFaultMessage {
+ List<String> items = new ArrayList<String>();
if (value == null) {
return items;
}
@@ -341,8 +377,8 @@ public class UDDIInquiryJAXRS {
return items;
}
- private List<URI> FetchWSDL(String value) {
- List<URI> items = new ArrayList<URI>();
+ private List<String> FetchWSDL(String value) {
+ List<String> items = new ArrayList<String>();
if (value.startsWith("http://") || value.startsWith("https://")) {
//here, we need an HTTP Get for WSDLs
@@ -374,8 +410,8 @@ public class UDDIInquiryJAXRS {
return items;
}
- private List<URI> ParseBinding(BindingTemplate get, String authInfo) throws DispositionReportFaultMessage {
- List<URI> items = new ArrayList<URI>();
+ private List<String> ParseBinding(BindingTemplate get, String authInfo) throws DispositionReportFaultMessage {
+ List<String> items = new ArrayList<String>();
if (get == null || get.getAccessPoint() == null) {
return items;
}
@@ -387,12 +423,10 @@ public class UDDIInquiryJAXRS {
if (get.getAccessPoint() != null) {
String usetype = get.getAccessPoint().getUseType();
if (usetype == null) {
- try {
+
//this is unexpected, usetype is a required field
- items.add(new URI(get.getAccessPoint().getValue()));
- } catch (URISyntaxException ex) {
- log.warn(ex);
- }
+ items.add((get.getAccessPoint().getValue()));
+
} else if (usetype.equalsIgnoreCase(AccessPointType.BINDING_TEMPLATE.toString())) {
//referencing another binding template
items.addAll(GetBindingInfo(get.getAccessPoint().getValue(), authInfo));
@@ -405,18 +439,14 @@ public class UDDIInquiryJAXRS {
//fetch wsdl and parse
items.addAll(FetchWSDL(get.getAccessPoint().getValue()));
} else if (usetype.equalsIgnoreCase(AccessPointType.END_POINT.toString())) {
- try {
- items.add(new URI(get.getAccessPoint().getValue()));
- } catch (URISyntaxException ex) {
- log.warn(ex);
- }
+
+ items.add((get.getAccessPoint().getValue()));
+
} else {
- try {
+
//treat it has an extension or whatever
- items.add(new URI(get.getAccessPoint().getValue()));
- } catch (URISyntaxException ex) {
- log.warn(ex);
- }
+ items.add((get.getAccessPoint().getValue()));
+
}
}
Added: juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java Sun Dec 8 18:25:11 2013
@@ -0,0 +1,498 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.juddi.api.impl.rest;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.ws.rs.WebApplicationException;
+import org.junit.After;
+import org.junit.Before;
+import org.uddi.api_v3.BindingTemplate;
+import org.uddi.api_v3.BusinessEntity;
+import org.uddi.api_v3.BusinessService;
+import org.uddi.api_v3.OperationalInfo;
+import org.uddi.api_v3.TModel;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
+import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
+import org.apache.cxf.jaxrs.provider.json.JSONProvider;
+import org.apache.juddi.Registry;
+import org.apache.juddi.api_v3.rest.UriContainer;
+
+import org.junit.Test;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+
+/**
+ * test cases for the jUDDI Inquiry REST service
+ *
+ * @author Alex O'Ree
+ */
+//@RunWith(SpringJUnit4ClassRunner.class)
+//@ContextConfiguration(locations = { "classpath:applicationContext-test.xml" })
+public class UDDIInquiryJAXRSTest extends Assert {
+
+ private final static String ENDPOINT_ADDRESS = "http://localhost:8080/rest";
+ private final static String JUDDI_BIZ = "uddi:juddi.apache.org:businesses-asf";
+ private final static String JUDDI_SVC = "uddi:juddi.apache.org:services-inquiry";
+ private final static String JUDDI_BT = "uddi:juddi.apache.org:servicebindings-inquiry-ws";
+ private final static String JUDDI_TMODEL = "uddi:uddi.org:transport:smtp";
+ private final static String WADL_ADDRESS = ENDPOINT_ADDRESS + "?_wadl";
+ private static Server server;
+ UDDIInquiryJAXRS instance = null;
+
+ public UDDIInquiryJAXRSTest() {
+
+ List<Object> providers = new ArrayList<Object>();
+ // add custom providers if any
+ providers.add(new org.apache.cxf.jaxrs.provider.JAXBElementProvider());
+
+ Map<String, Object> properties = new HashMap<String, Object>();
+
+// Create a mapping between the XML namespaces and the JSON prefixes.
+// The JSON prefix can be "" to specify that you don't want any prefix.
+ HashMap<String, String> nstojns = new HashMap<String, String>();
+ nstojns.put("urn:uddi-org:api_v3", "urn:uddi-org:api_v3");
+
+ properties.put("namespaceMap", nstojns);
+ JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
+ jsonProvider.setNamespaceMap(nstojns);
+
+ providers.add(jsonProvider);
+ instance = JAXRSClientFactory.create(ENDPOINT_ADDRESS, UDDIInquiryJAXRS.class, providers);
+ }
+
+ @BeforeClass
+ public static void initialize() throws Exception {
+ startServer();
+ waitForWADL();
+ Registry.start();
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ Registry.stop();
+ server.stop();
+ server.destroy();
+ }
+
+ @Before
+ public void setUp() {
+ }
+
+ @After
+ public void tearDown() {
+ }
+
+ private static void startServer() throws Exception {
+ JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+ sf.setResourceClasses(UDDIInquiryJAXRS.class);
+
+ List<Object> providers = new ArrayList<Object>();
+ // add custom providers if any
+ providers.add(new org.apache.cxf.jaxrs.provider.JAXBElementProvider());
+
+ Map<String, Object> properties = new HashMap<String, Object>();
+
+// Create a mapping between the XML namespaces and the JSON prefixes.
+// The JSON prefix can be "" to specify that you don't want any prefix.
+ HashMap<String, String> nstojns = new HashMap<String, String>();
+ nstojns.put("urn:uddi-org:api_v3", "urn:uddi-org:api_v3");
+
+ properties.put("namespaceMap", nstojns);
+ JSONProvider jsonProvider = new org.apache.cxf.jaxrs.provider.json.JSONProvider();
+ jsonProvider.setNamespaceMap(nstojns);
+
+ providers.add(jsonProvider);
+ sf.setProviders(providers);
+
+ sf.setResourceProvider(UDDIInquiryJAXRS.class,
+ new SingletonResourceProvider(new UDDIInquiryJAXRS(), true));
+ sf.setAddress(ENDPOINT_ADDRESS);
+
+ server = sf.create();
+ }
+
+ // Optional step - may be needed to ensure that by the time individual
+// tests start running the endpoint has been fully initialized
+ private static void waitForWADL() throws Exception {
+ WebClient client = WebClient.create(WADL_ADDRESS);
+ // wait for 20 secs or so
+ for (int i = 0; i < 20; i++) {
+ Thread.currentThread().sleep(1000);
+ Response response = client.get();
+ if (response.getStatus() == 200) {
+ break;
+ }
+ }
+ // no WADL is available yet - throw an exception or give tests a chance to run anyway
+ }
+
+ /**
+ * Test of getBusinessDetailJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetBusinessDetailJSON_NULL() {
+ System.out.println("testGetBusinessDetailJSON_NULL");
+
+ String id = UUID.randomUUID().toString();
+
+ BusinessEntity expResult = null;
+ BusinessEntity result = instance.getBusinessDetailJSON(id);
+ }
+
+ /**
+ * Test of getBusinessDetailXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetBusinessDetailXML_NULL() {
+ System.out.println("testGetBusinessDetailXML_NULL");
+
+
+ String id = UUID.randomUUID().toString();
+ BusinessEntity expResult = null;
+ BusinessEntity result = instance.getBusinessDetailXML(id);
+
+ }
+
+ @Test
+ public void testGetBusinessDetailXML() {
+ System.out.println("testGetBusinessDetailXML");
+
+
+ String id = UUID.randomUUID().toString();
+ BusinessEntity expResult = null;
+ BusinessEntity result = instance.getBusinessDetailXML(JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBusinessKey());
+ Assert.assertFalse(result.getName().isEmpty());
+
+ }
+
+ /**
+ * Test of getTModelDetailXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test
+ public void testGetTModelDetailXML() {
+ System.out.println("testGetTModelDetailXML");
+
+ TModel result = instance.getTModelDetailXML(JUDDI_TMODEL);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getName());
+ Assert.assertNotNull(result.getTModelKey());
+
+ }
+
+ /**
+ * Test of getTModelDetailJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetTModelDetailJSON_NULL() {
+ System.out.println("getTModelDetailJSON_NULL");
+ String id = UUID.randomUUID().toString();
+
+ TModel expResult = null;
+ TModel result = instance.getTModelDetailJSON(id);
+
+ }
+
+ @Test
+ public void testGetTModelDetailJSON() {
+ System.out.println("testGetTModelDetailJSON");
+
+ TModel result = instance.getTModelDetailJSON(JUDDI_TMODEL);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getName());
+ Assert.assertNotNull(result.getTModelKey());
+
+ }
+
+ /**
+ * Test of getServiceDetailJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetServiceDetailJSON_NULL() {
+ System.out.println("getServiceDetailJSON_NULL");
+ String id = UUID.randomUUID().toString();
+
+ BusinessService expResult = null;
+ BusinessService result = instance.getServiceDetailJSON(id);
+
+ }
+
+ @Test
+ public void testGetServiceDetailJSON() {
+ System.out.println("getServiceDetailJSON");
+ String id = UUID.randomUUID().toString();
+
+ BusinessService expResult = null;
+ BusinessService result = instance.getServiceDetailJSON(JUDDI_SVC);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBusinessKey());
+ Assert.assertNotNull(result.getBusinessKey());
+ }
+
+ /**
+ * Test of getServiceDetailXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetServiceDetailXML_NULL() {
+ System.out.println("getServiceDetailXML_NULL");
+ String id = UUID.randomUUID().toString();
+
+ BusinessService expResult = null;
+ BusinessService result = instance.getServiceDetailXML(id);
+
+ }
+
+ @Test
+ public void testGetServiceDetailXML() {
+ System.out.println("getServiceDetailXML");
+ String id = UUID.randomUUID().toString();
+
+ BusinessService expResult = null;
+ BusinessService result = instance.getServiceDetailXML(JUDDI_SVC);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBusinessKey());
+ Assert.assertNotNull(result.getBusinessKey());
+ }
+
+ /**
+ * Test of getOpInfoJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetOpInfoJSON_NULL() {
+ System.out.println("getOpInfoJSON_NULL");
+ String id = UUID.randomUUID().toString();
+
+ OperationalInfo expResult = null;
+ OperationalInfo result = instance.getOpInfoJSON(id);
+
+ }
+
+ @Test
+ public void testGetOpInfoJSON() {
+ System.out.println("getOpInfoJSON");
+ String id = UUID.randomUUID().toString();
+
+ OperationalInfo expResult = null;
+ OperationalInfo result = instance.getOpInfoJSON(JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getAuthorizedName());
+ Assert.assertNotNull(result.getEntityKey());
+ Assert.assertNotNull(result.getNodeID());
+
+ }
+
+ /**
+ * Test of getOpInfoXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetOpInfoXML_NULL() {
+ System.out.println("getOpInfoXML_NULL");
+ String id = UUID.randomUUID().toString();
+
+ OperationalInfo expResult = null;
+ OperationalInfo result = instance.getOpInfoXML(id);
+
+ }
+
+ @Test
+ public void testGetOpInfoXML() {
+ System.out.println("getOpInfoXML");
+ String id = UUID.randomUUID().toString();
+
+ OperationalInfo expResult = null;
+ OperationalInfo result = instance.getOpInfoXML(JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getAuthorizedName());
+ Assert.assertNotNull(result.getEntityKey());
+ Assert.assertNotNull(result.getNodeID());
+
+ }
+
+ /**
+ * Test of getBindingDetailJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetBindingDetailJSON_NULL() {
+ System.out.println("getBindingDetailJSON_NULL");
+ String id = UUID.randomUUID().toString();
+
+ BindingTemplate expResult = null;
+ BindingTemplate result = instance.getBindingDetailJSON(id);
+
+ }
+
+ @Test
+ public void testGetBindingDetailJSON() {
+ System.out.println("getBindingDetailJSON");
+ String id = UUID.randomUUID().toString();
+
+ BindingTemplate expResult = null;
+ BindingTemplate result = instance.getBindingDetailJSON(JUDDI_BT);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getAccessPoint());
+ Assert.assertNotNull(result.getBindingKey());
+ Assert.assertNotNull(result.getServiceKey());
+
+ }
+
+ /**
+ * Test of getBindingDetailXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetBindingDetailXML_NULL() {
+ System.out.println("getBindingDetailXML_NULL");
+ String id = UUID.randomUUID().toString();
+
+ BindingTemplate expResult = null;
+ BindingTemplate result = instance.getBindingDetailXML(id);
+
+ }
+
+ @Test
+ public void testGetBindingDetailXML() {
+ System.out.println("getBindingDetailXML");
+ String id = UUID.randomUUID().toString();
+
+ BindingTemplate expResult = null;
+ BindingTemplate result = instance.getBindingDetailXML(JUDDI_BT);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getAccessPoint());
+ Assert.assertNotNull(result.getBindingKey());
+ Assert.assertNotNull(result.getServiceKey());
+
+ }
+
+ /**
+ * Test of geEndpointsByServiceJSON method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGeEndpointsByServiceJSON_NULL() {
+ System.out.println("geEndpointsByServiceJSON_NULL");
+ String id = UUID.randomUUID().toString();
+
+ UriContainer expResult = null;
+ UriContainer result = instance.geEndpointsByServiceJSON(id);
+
+ }
+
+ /*
+ @Test
+ public void testGeEndpointsByServiceJSON() {
+ System.out.println("geEndpointsByServiceJSON");
+ String id = UUID.randomUUID().toString();
+
+ UriContainer expResult = null;
+ UriContainer result = instance.geEndpointsByServiceJSON(JUDDI_SVC);
+ Assert.assertNotNull(result);
+ Assert.assertFalse(result.getUriList().isEmpty());
+
+ }
+
+
+ @Test(expected = WebApplicationException.class)
+ public void testGetEndpointsByServiceXML_NULL() {
+ System.out.println("getEndpointsByServiceXML_NULL");
+ String id = UUID.randomUUID().toString();
+
+ UriContainer expResult = null;
+ UriContainer result = instance.getEndpointsByServiceXML(id);
+
+ }
+
+ @Test
+ public void testGeEndpointsByServiceXML() {
+ System.out.println("geEndpointsByServiceXML");
+ String id = UUID.randomUUID().toString();
+
+ UriContainer expResult = null;
+ UriContainer result = instance.getEndpointsByServiceXML(JUDDI_SVC);
+ Assert.assertNotNull(result);
+ Assert.assertFalse(result.getUriList().isEmpty());
+
+ }*/
+
+ /**
+ * Test of getEntityAsXML method, of class UDDIInquiryJAXRS.
+ */
+ @Test(expected = WebApplicationException.class)
+ public void testGetEntityAsXML_NULL() {
+ System.out.println("getEntityAsXML_NULL");
+ String entity = "";
+ String key = "";
+
+ Object expResult = null;
+ Object result = instance.getEntityAsXML(entity, key);
+
+ }
+ /*
+ @Test
+ public void testGetEntityAsXML_BIZ() {
+ System.out.println("testGetEntityAsXML_BIZ");
+ String entity = "";
+ String key = "";
+
+ Object expResult = null;
+ BusinessEntity result = (BusinessEntity) instance.getEntityAsXML("businessKey", JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBusinessKey());
+ Assert.assertFalse(result.getName().isEmpty());
+
+ }
+
+ @Test
+ public void testGetEntityAsXML_SVC() {
+ System.out.println("testGetEntityAsXML_SVC");
+ String entity = "";
+ String key = "";
+
+ Object expResult = null;
+ BusinessService result = (BusinessService) instance.getEntityAsXML("serviceKey", JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBusinessKey());
+ Assert.assertNotNull(result.getServiceKey());
+ Assert.assertFalse(result.getName().isEmpty());
+
+ }
+
+ @Test
+ public void testGetEntityAsXML_BT() {
+ System.out.println("testGetEntityAsXML_BT");
+ String entity = "";
+ String key = "";
+
+ Object expResult = null;
+ BindingTemplate result = (BindingTemplate) instance.getEntityAsXML("bundingKey", JUDDI_BIZ);
+ Assert.assertNotNull(result);
+ Assert.assertNotNull(result.getBindingKey());
+ Assert.assertNotNull(result.getServiceKey());
+ Assert.assertNotNull(result.getAccessPoint());
+
+
+
+ }*/
+}
\ No newline at end of file
Added: juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/orm.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/orm.xml?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/orm.xml (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/orm.xml Sun Dec 8 18:25:11 2013
@@ -0,0 +1,225 @@
+<entity-mappings
+ xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
+ version="1.0">
+
+ <sequence-generator name="juddi_sequence" sequence-name="juddi_sequence"/>
+
+ <entity class="org.apache.juddi.model.Address">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.AddressLine">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.BindingDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.BusinessDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.BusinessIdentifier">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.BusinessName">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.CategoryBag">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.Contact">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.ContactDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.DiscoveryUrl">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.Email">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.InstanceDetailsDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.InstanceDetailsDocDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.KeyedReference">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.KeyedReferenceGroup">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.OverviewDoc">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.OverviewDocDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.PersonName">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.Phone">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.ServiceDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.ServiceName">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.SubscriptionMatch">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.TmodelDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.TmodelIdentifier">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.TmodelInstanceInfo">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.TmodelInstanceInfoDescr">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+ <entity class="org.apache.juddi.model.TransferTokenKey">
+ <attributes>
+ <id name="id">
+ <generated-value generator="juddi_sequence" strategy="AUTO"/>
+ </id>
+ </attributes>
+ </entity>
+
+</entity-mappings>
Added: juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml Sun Dec 8 18:25:11 2013
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+
+ <!-- entity classes -->
+ <class>org.apache.juddi.model.Address</class>
+ <class>org.apache.juddi.model.AddressLine</class>
+ <class>org.apache.juddi.model.AuthToken</class>
+ <class>org.apache.juddi.model.BindingCategoryBag</class>
+ <class>org.apache.juddi.model.BindingDescr</class>
+ <class>org.apache.juddi.model.BindingTemplate</class>
+ <class>org.apache.juddi.model.BusinessCategoryBag</class>
+ <class>org.apache.juddi.model.BusinessDescr</class>
+ <class>org.apache.juddi.model.BusinessEntity</class>
+ <class>org.apache.juddi.model.BusinessIdentifier</class>
+ <class>org.apache.juddi.model.BusinessName</class>
+ <class>org.apache.juddi.model.BusinessService</class>
+ <class>org.apache.juddi.model.CanonicalizationMethod</class>
+ <class>org.apache.juddi.model.CategoryBag</class>
+ <class>org.apache.juddi.model.Clerk</class>
+ <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+ <class>org.apache.juddi.model.Contact</class>
+ <class>org.apache.juddi.model.ContactDescr</class>
+ <class>org.apache.juddi.model.DiscoveryUrl</class>
+ <class>org.apache.juddi.model.Email</class>
+ <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+ <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+ <class>org.apache.juddi.model.KeyedReference</class>
+ <class>org.apache.juddi.model.KeyedReferenceGroup</class>
+ <class>org.apache.juddi.model.KeyDataValue</class>
+ <class>org.apache.juddi.model.KeyInfo</class>
+ <class>org.apache.juddi.model.Node</class>
+ <class>org.apache.juddi.model.ObjectType</class>
+ <class>org.apache.juddi.model.ObjectTypeContent</class>
+ <class>org.apache.juddi.model.OverviewDoc</class>
+ <class>org.apache.juddi.model.OverviewDocDescr</class>
+ <class>org.apache.juddi.model.PersonName</class>
+ <class>org.apache.juddi.model.Phone</class>
+ <class>org.apache.juddi.model.Publisher</class>
+ <class>org.apache.juddi.model.PublisherAssertion</class>
+ <class>org.apache.juddi.model.PublisherAssertionId</class>
+ <class>org.apache.juddi.model.Reference</class>
+ <class>org.apache.juddi.model.ServiceCategoryBag</class>
+ <class>org.apache.juddi.model.ServiceDescr</class>
+ <class>org.apache.juddi.model.ServiceName</class>
+ <class>org.apache.juddi.model.ServiceProjection</class>
+ <class>org.apache.juddi.model.ServiceProjectionId</class>
+ <class>org.apache.juddi.model.Signature</class>
+ <class>org.apache.juddi.model.SignatureMethod</class>
+ <class>org.apache.juddi.model.SignatureTransform</class>
+ <class>org.apache.juddi.model.SignatureTransformDataValue</class>
+ <class>org.apache.juddi.model.SignatureValue</class>
+ <class>org.apache.juddi.model.SignedInfo</class>
+ <class>org.apache.juddi.model.Subscription</class>
+ <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+ <class>org.apache.juddi.model.SubscriptionMatch</class>
+ <class>org.apache.juddi.model.TempKey</class>
+ <class>org.apache.juddi.model.Tmodel</class>
+ <class>org.apache.juddi.model.TmodelCategoryBag</class>
+ <class>org.apache.juddi.model.TmodelDescr</class>
+ <class>org.apache.juddi.model.TmodelIdentifier</class>
+ <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+ <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+ <class>org.apache.juddi.model.TransferToken</class>
+ <class>org.apache.juddi.model.TransferTokenKey</class>
+ <class>org.apache.juddi.model.UddiEntity</class>
+ <class>org.apache.juddi.model.UddiEntityPublisher</class>
+
+ <properties>
+ <property name="hibernate.archive.autodetection" value="class"/>
+ <property name="hibernate.hbm2ddl.auto" value="update"/>
+ <property name="hibernate.show_sql" value="false"/>
+
+ <!-- derby connection properties -->
+ <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
+ <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+ <property name="hibernate.connection.url" value="jdbc:derby:memory:juddi-derby-test-db;create=true"/>
+ <property name="hibernate.connection.username" value=""/>
+ <property name="hibernate.connection.password" value=""/>
+
+ <!-- mysql connection properties
+
+ <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
+ <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
+ <property name="hibernate.connection.username" value="juddiv3" />
+ <property name="hibernate.connection.password" value="" />
+ <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/juddiv3" />
+-->
+
+ <!-- connection pool properties -->
+ <property name="hibernate.dbcp.maxActive" value="100"/>
+ <property name="hibernate.dbcp.maxIdle" value="30"/>
+ <property name="hibernate.dbcp.maxWait" value="10000"/>
+
+ </properties>
+ </persistence-unit>
+</persistence>
Added: juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/uddi.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/uddi.xml?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/uddi.xml (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/resources/META-INF/uddi.xml Sun Dec 8 18:25:11 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<uddi xmlns="urn:juddi-apache-org:v3_client" xsi:schemaLocation="classpath:/xsd/uddi-client.xsd">
+ <reloadDelay>5000</reloadDelay>
+ <client name="juddi-core-unittest-client">
+ <nodes>
+ <node isHomeJUDDI="true">
+ <!-- required 'default' node -->
+ <name>default</name>
+ <description>InVM jUDDI node</description>
+ <properties>
+ <property name="serverName" value="localhost" />
+ <property name="serverPort" value="8080" />
+ <!-- for UDDI nodes that use HTTP u/p, using the following
+ <property name="basicAuthUsername" value="root" />
+ <property name="basicAuthPassword" value="password" />
+ <property name="basicAuthPasswordIsEncrypted" value="false" />
+ <property name="basicAuthPasswordCryptoProvider" value="org.apache.juddi.v3.client.crypto.AES128Cryptor (an example)" />-->
+ </properties>
+ <!-- In VM Transport Settings -->
+ <proxyTransport>org.apache.juddi.v3.client.transport.InVMTransport</proxyTransport>
+ <custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
+ <inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
+ <inquiryRESTUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiryRest</inquiryRESTUrl>
+ <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
+ <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
+ <subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
+ <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
+ <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
+ </node>
+ </nodes>
+ <clerks registerOnStartup="false">
+ <clerk name="joe" node="default" publisher="joepublisher" password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">
+ <wsdl businessKey="uddi:uddi.joepublisher.com:businessone">wsdl/sample.wsdl</wsdl>
+ </clerk>
+
+ </clerks>
+ <signature>
+ <!-- signing stuff -->
+ <signingKeyStorePath>keystore.jks</signingKeyStorePath>
+ <signingKeyStoreType>JKS</signingKeyStoreType>
+ <signingKeyStoreFilePassword
+ isPasswordEncrypted="false"
+ cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor">password</signingKeyStoreFilePassword>
+ <signingKeyPassword
+ isPasswordEncrypted="false"
+ cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor">password</signingKeyPassword>
+ <signingKeyAlias>my special key</signingKeyAlias>
+ <canonicalizationMethod>http://www.w3.org/2001/10/xml-exc-c14n#</canonicalizationMethod>
+ <signatureMethod>RSA_SHA1</signatureMethod>
+ <XML_DIGSIG_NS>http://www.w3.org/2000/09/xmldsig#</XML_DIGSIG_NS>
+ <!-- validation stuff -->
+ <trustStorePath>truststore.jks</trustStorePath>
+ <trustStoreType>JKS</trustStoreType>
+ <trustStorePassword
+ isPasswordEncrypted="false"
+ cryptoProvider="org.apache.juddi.v3.client.crypto.AES128Cryptor">password</trustStorePassword>
+
+ <checkTimestamps>true</checkTimestamps>
+ <checkTrust>true</checkTrust>
+ <checkRevocationCRL>true</checkRevocationCRL>
+ </signature>
+ <subscriptionCallbacks>
+ <keyDomain>uddi:somebusiness</keyDomain>
+ <listenUrl>http://MyHostname:4444/callback</listenUrl>
+ <autoRegisterBindingTemplate>false</autoRegisterBindingTemplate>
+ <autoRegisterBusinessServiceKey>uddi:somebusiness:someservicekey</autoRegisterBusinessServiceKey>
+ <signatureBehavior>DoNothing</signatureBehavior>
+ <!--valid values are AbortIfSigned,Sign,DoNothing,SignOnlyIfParentIsntSigned, default is DoNothing-->
+ </subscriptionCallbacks>
+ <XtoWsdl>
+ <IgnoreSSLErrors>false</IgnoreSSLErrors>
+ </XtoWsdl>
+ </client>
+</uddi>
\ No newline at end of file
Added: juddi/trunk/juddi-rest-cxf/src/test/resources/juddiv3.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/resources/juddiv3.xml?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/resources/juddiv3.xml (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/resources/juddiv3.xml Sun Dec 8 18:25:11 2013
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+################################################################
+# jUDDI-v3.0 configuration. #
+################################################################
+# Note that the property settings in this #
+# file can be overriden by system parameters #
+# #
+################################################################
+-->
+<config>
+ <juddi>
+ <!-- The ${juddi.server.baseurl} token can be referenced in accessPoints and will be resolved at runtime. -->
+ <server>
+ <baseurl>http://localhost:8080/juddiv3</baseurl>
+ <baseurlsecure>https://localhost:8443/juddiv3</baseurlsecure>
+ </server>
+ <!-- The node Id must be unique when setup in a cluster of UDDI servers implementing the replication API
+ don't worry, jUDDI doesn't implement it right now, but it may come in the future -->
+ <nodeId>uddi:juddi.apache.org:node1</nodeId>
+ <!-- The key of the root business that all of the UDDI services are registered in, as defined in the install_data -->
+ <root>
+ <!-- this is the 'root' username, or owner of the node -->
+ <publisher>root</publisher>
+ <!-- The key of the root business that all of the UDDI services are registered in, as defined in the install_data -->
+ <businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+ <partition>uddi:juddi.apache.org</partition>
+ </root>
+ <seed>
+ <always>false</always>
+ </seed>
+
+ <!-- Name of the persistence unit to use (the default, "juddiDatabase" refers to the unit compiled into the juddi library)-->
+ <persistenceunit>
+ <name>juddiDatabase</name>
+ </persistenceunit>
+
+ <!-- Check-the-time-stamp-on-this-file Interval in milli seconds -->
+ <configuration>
+ <reload>
+ <delay>2000</delay>
+ </reload>
+ </configuration>
+ <!--Default locale-->
+ <locale>en_US</locale>
+
+ <!--The UDDI Operator Contact Email Address-->
+ <operatorEmailAddress>admin@local.localhost</operatorEmailAddress>
+
+ <!-- The maximum name size and maximum number of name elements allows in several of the FindXxxx and SaveXxxx UDDI functions.-->
+ <maxNameLength>255</maxNameLength>
+ <maxNameElementsAllowed>5</maxNameElementsAllowed>
+
+
+ <!-- The maximum number of rows returned in a find_* operation. Each call can set this independently, but this property defines a global maximum.-->
+ <maxRows>1000</maxRows>
+ <!-- The maximum number of "IN" clause parameters. Some RDMBS limit the number of parameters allowed in a SQL "IN" clause.-->
+ <maxInClause>1000</maxInClause>
+
+ <!-- The maximum number of UDDI artifacts allowed per publisher. A value of '-1' indicates any number of artifacts is valid (These values can be overridden at the individual publisher level).-->
+ <maxBusinessesPerPublisher>100</maxBusinessesPerPublisher>
+ <maxServicesPerBusiness>100</maxServicesPerBusiness>
+ <maxBindingsPerService>100</maxBindingsPerService>
+ <maxTModelsPerPublisher>100</maxTModelsPerPublisher>
+
+ <!-- Days before a transfer request expires-->
+ <transfer>
+ <expiration>
+ <days>3</days>
+ </expiration>
+ </transfer>
+
+ <!-- Days before a subscription expires-->
+ <subscription>
+ <expiration>
+ <days>30</days>
+ </expiration>
+
+ <!-- Minutes before a "chunked" subscription call expires-->
+ <chunkexpiration>
+ <minutes>5</minutes>
+ </chunkexpiration>
+
+ <!--Since 3.1.5 the maxium ammount of returned subscription entities allowed-->
+ <maxentities>1000</maxentities>
+ </subscription>
+
+ <!-- jUDDI UUIDGen implementation to use-->
+ <uuidgen>org.apache.juddi.uuidgen.DefaultUUIDGen</uuidgen>
+
+ <!-- jUDDI Cryptor implementation to use-->
+ <cryptor>org.apache.juddi.v3.client.cryptor.DefaultCryptor</cryptor>
+
+ <!-- jUDDI Key Generator to use-->
+ <keygenerator>org.apache.juddi.keygen.DefaultKeyGenerator</keygenerator>
+
+ <notification>
+ <!-- Specifies the interval at which the notification timer triggers-->
+ <interval>5000</interval>
+ <!-- Specifies the amount of time to wait before the notification timer initially fires-->
+ <start>
+ <buffer>0</buffer>
+ </start>
+ <acceptableLagtime>1000</acceptableLagtime>
+ <maxTries>3</maxTries>
+ <!-- 10 minutes -->
+ <maxTriesResetInterval>600000</maxTriesResetInterval>
+ <sendAuthTokenWithResultList>false</sendAuthTokenWithResultList>
+ </notification>
+ <!-- All Authentication related settings -->
+ <auth>
+ <!-- Specifies whether the inquiry API requires authentication, all other APIs require authN-->
+ <Inquiry>false</Inquiry>
+
+ <!-- When using file based authentication, this is the filename to use
+ <usersfile>juddi-users.xml</usersfile>-->
+ <!-- jUDDI Authentication module to use-->
+ <authenticator>
+ <!-- build in Authenticators:
+ org.apache.juddi.v3.auth.JUDDIAuthenticator - no authentication
+ LDAP Based
+ org.apache.juddi.v3.auth.LdapSimpleAuthenticator - use LDAP
+ org.apache.juddi.v3.auth.LdapExpandedAuthenticator - use LDAP
+
+ File based, see usersfile
+ org.apache.juddi.v3.auth.XMLDocAuthenticator - XML doc, clear text
+ org.apache.juddi.v3.auth.CryptedXMLDocAuthenticator - XML doc, encrypted
+ org.apache.juddi.v3.auth.MD5XMLDocAuthenticator - XML doc, Hashed
+
+ See also, the Jboss Authenticator
+ -->
+ <class>org.apache.juddi.v3.auth.JUDDIAuthenticator</class>
+ <!-- other settings (mostly used by Ldap based auth mods
+ url
+ initialcontext
+ style
+ ldapexp
+ -->
+ </authenticator>
+
+ <token>
+ <!-- Time in minutes to expire tokes after inactivity-->
+ <Timeout>15</Timeout>
+ <!-- As of 3.1.5 Duration of time for tokens to expire, regardless of inactivity -->
+ <Expiration>15</Expiration>
+ <!-- As of 3.2, when set to true, tokens can only be used from the same IP address they were issued to -->
+ <enforceSameIPRule>true</enforceSameIPRule>
+ </token>
+ </auth>
+
+
+
+
+ <validation>
+ <!-- As of 3.1.5 This setting will force referential integrity for all tModels (except keyGenerators), category bags, bindingTemplate/AccessPoint/hostingRedirector (referencing another host), tModelinstanceparms and anything else that references a KeyName default value is true. set to false for backwards compatibility or for a more lax registry-->
+ <enforceReferentialIntegrity>true</enforceReferentialIntegrity>
+ </validation>
+
+ <!--As of 3.1.5 Email delivery options for subscription API functions-->
+ <mail>
+ <smtp>
+ <!--The Operatorâs Email address
+ <from>admin@local.localhost</from>-->
+
+ <!--the hostname of the SMTP server
+ <host>localhost</host>-->
+
+ <!--The portname of the SMTP server
+ <port>25</port>-->
+
+ <!--If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.-->
+ <socketFactory>
+ <!--<class></class>-->
+
+ <!--If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.
+ <fallback>true</fallback>-->
+ <!--Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
+ <port>25</port>-->
+ </socketFactory>
+ <!--if true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the serverâs certificate. Defaults to false.
+ <starttls>
+ <enabled>false</enabled>
+ </starttls>-->
+
+ <!--If true, attempt to authenticate the user using the AUTH command. Defaults to false.
+ <auth>false</auth>-->
+
+ <!--Username used to authenticate to the SMTP server used only if mail.smtp.auth is true
+ <username>user</username>-->
+
+ <!--Password used to authenticate to the SMTP server, used only if mail.smtp.auth is true
+ <password encrypted="false">pass</password>-->
+ </smtp>
+ </mail>
+ </juddi>
+</config>
\ No newline at end of file
Added: juddi/trunk/juddi-rest-cxf/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-rest-cxf/src/test/resources/log4j.xml?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddi-rest-cxf/src/test/resources/log4j.xml (added)
+++ juddi/trunk/juddi-rest-cxf/src/test/resources/log4j.xml Sun Dec 8 18:25:11 2013
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="DEBUG"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <logger name="org">
+ <level value="INFO"/>
+ </logger>
+
+ <logger name="org.hibernate">
+ <level value="WARN"/>
+ </logger>
+
+ <logger name="com">
+ <level value="INFO"/>
+ </logger>
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+
+</log4j:configuration>
Modified: juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml?rev=1549095&r1=1549094&r2=1549095&view=diff
==============================================================================
--- juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml (original)
+++ juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml Sun Dec 8 18:25:11 2013
@@ -21,10 +21,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:schemas/spring-beans.xsd
http://cxf.apache.org/jaxws classpath:schemas/jaxws.xsd
http://cxf.apache.org/jaxrs classpath:schemas/jaxrs.xsd
+ http://www.springframework.org/schema/util classpath:schemas/spring-util.xsd
">
<import resource="classpath:META-INF/cxf/cxf.xml" />
@@ -95,11 +97,28 @@
</jaxws:properties>
</jaxws:endpoint>
- <jaxrs:server id="inquiryRestService" address="/inquiryRest">
+ <util:map id="jsonNamespaceMap" map-class="java.util.Hashtable" >
+ <entry key="urn:uddi-org:api_v3" value="urn:uddi-org:api_v3"/>
+ </util:map>
+
+
+ <jaxrs:server id="inquiryRestService" address="/inquiryRest">
<jaxrs:serviceBeans>
<ref bean="inquiryRest" />
</jaxrs:serviceBeans>
+ <jaxrs:providers>
+ <ref bean="jaxbProvider"/>
+ <ref bean="jsonProvider"/>
+ </jaxrs:providers>
</jaxrs:server>
<bean id="inquiryRest" class="org.apache.juddi.api.impl.rest.UDDIInquiryJAXRS" />
-
+ <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
+ <property name="ignoreNamespaces" value="true"/>
+ <property name="namespaceMap" ref="jsonNamespaceMap"/>
+ </bean>
+ <bean id="jaxbProvider"
+class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"/>
+
+
+
</beans>
Added: juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/classes/schemas/spring-util.xsd
URL: http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/classes/schemas/spring-util.xsd?rev=1549095&view=auto
==============================================================================
--- juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/classes/schemas/spring-util.xsd (added)
+++ juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/classes/schemas/spring-util.xsd Sun Dec 8 18:25:11 2013
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<xsd:schema xmlns="http://www.springframework.org/schema/util"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:beans="http://www.springframework.org/schema/beans"
+ xmlns:tool="http://www.springframework.org/schema/tool"
+ targetNamespace="http://www.springframework.org/schema/util"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified">
+
+ <xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.2.xsd"/>
+ <xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool-3.2.xsd"/>
+
+ <xsd:element name="constant">
+ <xsd:annotation>
+ <xsd:documentation>
+ Reference a public, static field on a type and expose its value as
+ a bean. For example <code><util:constant static-field="java.lang.Integer.MAX_VALUE"/></code>.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="static-field" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="property-path">
+ <xsd:annotation>
+ <xsd:documentation>
+ Reference a property on a bean (or as a nested value) and expose its values as
+ a bean. For example <util:property-path path="order.customer.name"/>.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="path" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="list">
+ <xsd:annotation>
+ <xsd:documentation source="java:org.springframework.beans.factory.config.ListFactoryBean">
+ Builds a List instance of the specified type, populated with the specified content.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports type="java.util.List"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:listOrSetType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="list-class" type="xsd:string">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:expected-type type="java.lang.Class"/>
+ <tool:assignable-to type="java.util.List"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The scope of this collection bean: typically "singleton" (one shared instance,
+ which will be returned by all calls to getBean with the given id), or
+ "prototype" (independent instance resulting from each call to getBean).
+ Default is "singleton". Further scopes, such as "request" or "session",
+ might be supported by extended bean factories (e.g. in a web environment).
+ ]]></xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="set">
+ <xsd:annotation>
+ <xsd:documentation source="java:org.springframework.beans.factory.config.SetFactoryBean">
+ Builds a Set instance of the specified type, populated with the specified content.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports type="java.util.Set"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:listOrSetType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="set-class" type="xsd:string">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:expected-type type="java.lang.Class"/>
+ <tool:assignable-to type="java.util.Set"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The scope of this collection bean: typically "singleton" (one shared instance,
+ which will be returned by all calls to getBean with the given id), or
+ "prototype" (independent instance resulting from each call to getBean).
+ Default is "singleton". Further scopes, such as "request" or "session",
+ might be supported by extended bean factories (e.g. in a web environment).
+ ]]></xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="map">
+ <xsd:annotation>
+ <xsd:documentation source="java:org.springframework.beans.factory.config.MapFactoryBean">
+ Builds a Map instance of the specified type, populated with the specified content.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports type="java.util.Map"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:mapType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="map-class" type="xsd:string">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:expected-type type="java.lang.Class"/>
+ <tool:assignable-to type="java.util.Map"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The scope of this collection bean: typically "singleton" (one shared instance,
+ which will be returned by all calls to getBean with the given id), or
+ "prototype" (independent instance resulting from each call to getBean).
+ Default is "singleton". Further scopes, such as "request" or "session",
+ might be supported by extended bean factories (e.g. in a web environment).
+ ]]></xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="properties">
+ <xsd:annotation>
+ <xsd:documentation source="java:org.springframework.beans.factory.config.PropertiesFactoryBean">
+ Loads a Properties instance from the resource location specified by the '<code>location</code>' attribute.
+ </xsd:documentation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:exports type="java.util.Properties"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="beans:propsType">
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <tool:annotation>
+ <tool:expected-type type="org.springframework.core.io.Resource"/>
+ </tool:annotation>
+ </xsd:appinfo>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="local-override" type="xsd:boolean">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ Specifies whether local properties override properties from files.
+ Default is "false": properties from files override local defaults.
+ If set to "true", local properties will override defaults from files.
+ ]]></xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="scope" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation><![CDATA[
+ The scope of this collection bean: typically "singleton" (one shared instance,
+ which will be returned by all calls to getBean with the given id), or
+ "prototype" (independent instance resulting from each call to getBean).
+ Default is "singleton". Further scopes, such as "request" or "session",
+ might be supported by extended bean factories (e.g. in a web environment).
+ ]]></xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
Modified: juddi/trunk/juddiv3-war/pom.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/pom.xml?rev=1549095&r1=1549094&r2=1549095&view=diff
==============================================================================
--- juddi/trunk/juddiv3-war/pom.xml (original)
+++ juddi/trunk/juddiv3-war/pom.xml Sun Dec 8 18:25:11 2013
@@ -306,7 +306,7 @@
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
- <version>1.3.3</version>
+ <version>1.3.4</version>
</dependency>
<!--END added AO 6/8/2013 support for JSON encoding on REST endpoints -->
<dependency>
Modified: juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/OperationalInfo.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/OperationalInfo.java?rev=1549095&r1=1549094&r2=1549095&view=diff
==============================================================================
--- juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/OperationalInfo.java (original)
+++ juddi/trunk/uddi-ws/src/main/java/org/uddi/api_v3/OperationalInfo.java Sun Dec 8 18:25:11 2013
@@ -23,6 +23,7 @@ import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
@@ -60,6 +61,7 @@ import javax.xml.datatype.XMLGregorianCa
"nodeID",
"authorizedName"
})
+@XmlRootElement
public class OperationalInfo implements Serializable{
@XmlTransient
private static final long serialVersionUID = -3112659463581534112L;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org