Author: alexoree
Date: Sat May 11 00:27:33 2013
New Revision: 1481240
URL: http://svn.apache.org/r1481240
Log:
Syncing from the main trunk
Adding multiple modifications to WSDL2UDDI, specifically adding a client side
dependency on httpcommons and support for authenticated wsdl parsing
Added:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIKeyConvention.java
- copied unchanged from r1480510,
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIKeyConvention.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceRegistrationResponse.java
- copied unchanged from r1480510,
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceRegistrationResponse.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/URLLocalizerDefaultImpl.java
- copied unchanged from r1480510,
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/URLLocalizerDefaultImpl.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java
- copied unchanged from r1480510,
juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDLinaUDDIRegistryTest.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/resources/wsdl/sample.wsdl
- copied unchanged from r1480510,
juddi/trunk/juddi-client/src/test/resources/wsdl/sample.wsdl
juddi/branches/juddi-3.2.x/juddi-client/src/test/resources/wsdl/uddiv3-xml/
- copied from r1480510,
juddi/trunk/juddi-client/src/test/resources/wsdl/uddiv3-xml/
juddi/branches/juddi-3.2.x/juddi-core-openjpa/src/test/resources/META-INF/uddi.xml
- copied unchanged from r1480510,
juddi/trunk/juddi-core-openjpa/src/test/resources/META-INF/uddi.xml
juddi/branches/juddi-3.2.x/juddi-core-openjpa/src/test/resources/wsdl/
- copied from r1480510,
juddi/trunk/juddi-core-openjpa/src/test/resources/wsdl/
juddi/branches/juddi-3.2.x/juddi-core/src/test/java/org/apache/juddi/api/impl/API_051_BindingTemplateWSDLTest.java
- copied unchanged from r1480510,
juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_051_BindingTemplateWSDLTest.java
juddi/branches/juddi-3.2.x/juddi-core/src/test/resources/META-INF/uddi.xml
- copied unchanged from r1480510,
juddi/trunk/juddi-core/src/test/resources/META-INF/uddi.xml
juddi/branches/juddi-3.2.x/juddi-core/src/test/resources/wsdl/
- copied from r1480510, juddi/trunk/juddi-core/src/test/resources/wsdl/
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/java/org/apache/juddi/example/
- copied from r1480588,
juddi/trunk/juddi-examples/uddi-annotations/src/main/java/org/apache/juddi/example/
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi/ (props changed)
- copied from r1480510, juddi/trunk/juddi-examples/wsdl2uddi/
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/ (props
changed)
- copied from r1480510, juddi/trunk/juddi-examples/wsdl2uddi-lifecyle/
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/src/main/java/org/apache/juddi/example/wsdl2uddi/
- copied from r1480588,
juddi/trunk/juddi-examples/wsdl2uddi-lifecyle/src/main/java/org/apache/juddi/example/wsdl2uddi/
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/src/main/webapp/WEB-INF/classes/
- copied from r1480588,
juddi/trunk/juddi-examples/wsdl2uddi-lifecyle/src/main/webapp/WEB-INF/classes/
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi/src/test/resources/log4j.xml
- copied unchanged from r1480588,
juddi/trunk/juddi-examples/wsdl2uddi/src/test/resources/log4j.xml
juddi/branches/juddi-3.2.x/juddiv3-war/JAX-WS/Axis2/
- copied from r1480510, juddi/trunk/juddiv3-war/JAX-WS/Axis2/
Removed:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/URLLocalizerImpl.java
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/java/org/apache/juddi/samples/
Modified:
juddi/branches/juddi-3.2.x/ (props changed)
juddi/branches/juddi-3.2.x/juddi-client/pom.xml
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIConstants.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/
(props changed)
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/BackGroundRegistration.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/TokenResolver.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerk.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerkManager.java
(contents, props changed)
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClerkServlet.java
(contents, props changed)
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/WebHelper.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/AsyncRegistration.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/BPEL2UDDI.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ReadWSDL.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/ServiceLocator.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIClientSubscriptionListenerImpl.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/UDDIServiceCache.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDL2UDDI.java
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WSDLLocatorImpl.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/BPEL2UDDITest.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ReadWSDLTest.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/ServiceLocatorTest.java
juddi/branches/juddi-3.2.x/juddi-client/src/test/java/org/apache/juddi/v3/client/mapping/WSDL2UDDITest.java
juddi/branches/juddi-3.2.x/juddi-core-openjpa/src/test/resources/juddiv3.properties
juddi/branches/juddi-3.2.x/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
juddi/branches/juddi-3.2.x/juddi-core/src/test/resources/juddiv3.properties
juddi/branches/juddi-3.2.x/juddi-examples/hello-world/src/main/java/org/apache/juddi/example/helloworld/HelloWorld.java
juddi/branches/juddi-3.2.x/juddi-examples/pom.xml
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/resources/META-INF/sales-uddi.xml
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/resources/META-INF/uddi-annotations.xml
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/beans.xml
juddi/branches/juddi-3.2.x/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.properties
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/README.txt
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/pom.xml
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/src/main/resources/META-INF/wsdl2uddi-uddi.xml
juddi/branches/juddi-3.2.x/juddi-examples/wsdl2uddi-lifecyle/src/main/webapp/WEB-INF/beans.xml
juddi/branches/juddi-3.2.x/juddi-gui/build.xml
juddi/branches/juddi-3.2.x/juddi-gui/nbproject/build-impl.xml
juddi/branches/juddi-3.2.x/juddi-gui/nbproject/genfiles.properties
juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.properties
juddi/branches/juddi-3.2.x/juddi-gui/nbproject/project.xml
juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web.properties
juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/resources/web_es.properties
juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/context.xml
juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp
juddi/branches/juddi-3.2.x/juddi-tomcat/build.xml
juddi/branches/juddi-3.2.x/juddi-tomcat/pom.xml
juddi/branches/juddi-3.2.x/juddiv3-war/pom.xml
juddi/branches/juddi-3.2.x/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.properties
juddi/branches/juddi-3.2.x/uddi-tck/src/test/java/org/apache/juddi/v3/bpel/BPEL_020_IntegrationTest.java
Propchange: juddi/branches/juddi-3.2.x/
------------------------------------------------------------------------------
Merged /juddi/trunk:r1471183-1481232
Modified: juddi/branches/juddi-3.2.x/juddi-client/pom.xml
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/pom.xml?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-client/pom.xml (original)
+++ juddi/branches/juddi-3.2.x/juddi-client/pom.xml Sat May 11 00:27:33 2013
@@ -51,5 +51,10 @@
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.2.5</version>
+ </dependency>
</dependencies>
</project>
Modified:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIConstants.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIConstants.java?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIConstants.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/UDDIConstants.java
Sat May 11 00:27:33 2013
@@ -1,5 +1,12 @@
package org.apache.juddi.v3.client;
+import org.uddi.api_v3.CategoryBag;
+import org.uddi.api_v3.KeyedReference;
+import org.uddi.api_v3.Name;
+import org.uddi.api_v3.OverviewDoc;
+import org.uddi.api_v3.OverviewURL;
+import org.uddi.api_v3.TModel;
+
/**
* This file was borrowed from juddi-core's constants file with modifications
*
@@ -467,32 +474,46 @@ public interface UDDIConstants {
*/
public static String WILDCARD = "%";
/**
- * Presents any SINGLE character<br>
- * Wildcards, when they are allowed, may occur at any position in the
string
- * of characters that constitutes the argument value and may occur more
than
- * once. Wildcards are denoted with a percent sign (%) to indicate any
value
- * for any number of characters and an underscore (_) to indicate any value
- * for a single character. The backslash character (\) is used as an escape
- * character for the percent sign, underscore and backslash characters. Use
- * of the "exactMatch" findQualifier will cause wildcard characters to be
- * interpreted literally, and as such should not also be combined with the
- * escape character.
+ * Presents any SINGLE character<br> Wildcards, when they are allowed, may
+ * occur at any position in the string of characters that constitutes the
+ * argument value and may occur more than once. Wildcards are denoted with
a
+ * percent sign (%) to indicate any value for any number of characters and
+ * an underscore (_) to indicate any value for a single character. The
+ * backslash character (\) is used as an escape character for the percent
+ * sign, underscore and backslash characters. Use of the "exactMatch"
+ * findQualifier will cause wildcard characters to be interpreted
literally,
+ * and as such should not also be combined with the escape character.
*/
public static String WILDCARD_CHAR = "_";
/**
- * unchecked: Marking a tModel with this categorization asserts that it
represents a value set or category group system whose use, through
keyedReferences, is not checked.
+ * unchecked: Marking a tModel with this categorization asserts that it
+ * represents a value set or category group system whose use, through
+ * keyedReferences, is not checked.
*/
public static String TMODEL_GENERAL_KEYWORDS =
"uddi:uddi.org:categorization:general_keywords";
/**
- * An unchecked value set is one that allows unrestricted references to
its values. A UDDI registry is REQUIRED to have a policy to differentiate
between unchecked value sets and checked value sets. UDDI registries MUST
allow unchecked value sets to be referred to in keyedReferences. tModels that
represent unchecked value sets SHOULD be categorized with the unchecked value
from the uddi-org:types category system.
+ * An unchecked value set is one that allows unrestricted references to its
+ * values. A UDDI registry is REQUIRED to have a policy to differentiate
+ * between unchecked value sets and checked value sets. UDDI registries
MUST
+ * allow unchecked value sets to be referred to in keyedReferences. tModels
+ * that represent unchecked value sets SHOULD be categorized with the
+ * unchecked value from the uddi-org:types category system.
*/
public static String UNCHECKED = "uddi-org:types:unchecked";
/**
- * checked: Marking a tModel with this categorization asserts that it
represents a value set or category group system whose use, through
keyedReferences, may be checked. Registry, and possibly node policy determines
when and how a checked value set is supported.
+ * checked: Marking a tModel with this categorization asserts that it
+ * represents a value set or category group system whose use, through
+ * keyedReferences, may be checked. Registry, and possibly node policy
+ * determines when and how a checked value set is supported.
*/
public static String CHECKED = "uddi-org:types:checked";
/**
- * uncacheable: Marking a tModel with this categorization asserts that it
represents a checked value set or category group system whose values must not
be cached for validation. The validation algorithm for a supported uncacheable
checked value set must be specified and associated with the tModel marked with
this categorization and may consider contextual criteria involving the entity
associated with the reference.
+ * uncacheable: Marking a tModel with this categorization asserts that it
+ * represents a checked value set or category group system whose values
must
+ * not be cached for validation. The validation algorithm for a supported
+ * uncacheable checked value set must be specified and associated with the
+ * tModel marked with this categorization and may consider contextual
+ * criteria involving the entity associated with the reference.
*/
public static String UNCACHEABLE = "uddi-org:types:uncacheable";
/**
@@ -500,9 +521,32 @@ public interface UDDIConstants {
*/
public static String RELATIONSHIPS = "uddi:uddi.org:relationships";
/**
- * keyGenerator: Marking a tModel with this categorization designates it
as one whose tModelKey identifies a key generator partition that can be used by
its owner to derive and assign other entity keys. This categorization is
reserved for key generator tModels. Any attempt to use this categorization for
something other than a key generator tModel will fail with E_valueNotAllowed
returned.
+ * "uddi:uddi.org:keygenerator" keyGenerator: Marking a tModel with this
+ * categorization designates it as one whose tModelKey identifies a key
+ * generator partition that can be used by its owner to derive and assign
+ * other entity keys. This categorization is reserved for key generator
+ * tModels. Any attempt to use this categorization for something other than
+ * a key generator tModel will fail with E_valueNotAllowed returned.
+ */
+ public static String KEY_GENERATOR_TMODEL = "uddi:uddi.org:keygenerator";
+ /**
+ * "uddi.org:keygenerator" keyGenerator: Marking a tModel with this
+ * categorization designates it as one whose tModelKey identifies a key
+ * generator partition that can be used by its owner to derive and assign
+ * other entity keys. This categorization is reserved for key generator
+ * tModels. Any attempt to use this categorization for something other than
+ * a key generator tModel will fail with E_valueNotAllowed returned.
+ */
+ public static String KEY_GENERATOR = "uddi.org:keygenerator";
+ /**
+ * "keyGenerator" keyGenerator: Marking a tModel with this categorization
+ * designates it as one whose tModelKey identifies a key generator
partition
+ * that can be used by its owner to derive and assign other entity keys.
+ * This categorization is reserved for key generator tModels. Any attempt
to
+ * use this categorization for something other than a key generator tModel
+ * will fail with E_valueNotAllowed returned.
*/
- public static String KEY_GENERATOR = "uddi:uddi.org:keygenerator";
+ public static String KEY_GENERATOR_VALUE = "keyGenerator";
/**
* Identifier system used to point to the UDDI entity, using UDDI keys,
that
* is the logical replacement for the one in which isReplacedBy is used.
@@ -593,4 +637,6 @@ public interface UDDIConstants {
* A tModel that represents the SOAP 1.2 protocol
*/
public static String PROTOCOL_SOAP12 = "uddi:uddi.org:protocol:soap12";
+
+
}
Propchange:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/
------------------------------------------------------------------------------
Merged
/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config:r1460934-1480588
Modified:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/BackGroundRegistration.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/BackGroundRegistration.java?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/BackGroundRegistration.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/BackGroundRegistration.java
Sat May 11 00:27:33 2013
@@ -36,6 +36,7 @@ public class BackGroundRegistration impl
log.debug("Starting UDDI Clerks for manager " +
manager.getClientConfig().getManagerName() + "...");
manager.saveClerkAndNodeInfo();
manager.registerAnnotatedServices();
+ manager.registerWSDLs();
manager.xRegister();
log.debug("Clerks started succesfully for
manager " + manager.getClientConfig().getManagerName());
} else {
Modified:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
Sat May 11 00:27:33 2013
@@ -125,8 +125,54 @@ public class ClientConfig
uddiClerk.setUDDINode(uddiNode);
uddiClerk.setPublisher(config.getString("manager.clerks.clerk(" + i +
")[@publisher]"));
uddiClerk.setPassword(
config.getString("manager.clerks.clerk(" + i + ")[@password]"));
+
+ String clerkBusinessKey =
config.getString("manager.clerks.clerk(" + i + ")[@businessKey]");
+ String clerkBusinessName =
config.getString("manager.clerks.clerk(" + i + ")[@businessName]");
+ String clerkKeyDomain =
config.getString("manager.clerks.clerk(" + i + ")[@keyDomain]");
+
String[] classes =
config.getStringArray("manager.clerks.clerk(" + i + ").class");
uddiClerk.setClassWithAnnotations(classes);
+
+ int numberOfWslds =
config.getStringArray("manager.clerks.clerk(" + i + ").wsdl").length;
+ if (numberOfWslds > 0) {
+ UDDIClerk.WSDL[] wsdls = new
UDDIClerk.WSDL[numberOfWslds];
+ for (int w=0; w<wsdls.length; w++) {
+ UDDIClerk.WSDL wsdl =
uddiClerk.new WSDL();
+ String fileName =
config.getString("manager.clerks.clerk(" + i + ").wsdl(" + w + ")");
+ wsdl.setFileName(fileName);
+ String businessKey =
config.getString("manager.clerks.clerk(" + i + ").wsdl(" + w +
")[@businessKey]");
+ String businessName =
config.getString("manager.clerks.clerk(" + i + ").wsdl(" + w +
")[@businessName]");
+ String keyDomain =
config.getString("manager.clerks.clerk(" + i + ").wsdl(" + w + ")[@keyDomain]");
+ if (businessKey==null)
businessKey = clerkBusinessKey;
+ if (businessKey==null)
businessKey =
uddiClerk.getUDDINode().getProperties().getProperty("businessKey");
+ if (businessKey==null) {
+ //use key convention to
build the businessKey
+ if (businessName==null)
businessName = clerkBusinessName;
+ if (keyDomain==null)
keyDomain = clerkKeyDomain;
+ if (keyDomain==null)
keyDomain = uddiClerk.getUDDINode().getProperties().getProperty("keyDomain");
+ if ((businessName==null
&& ! uddiClerk.getUDDINode().getProperties().containsKey("businessName"))
+ ||
keyDomain==null && !
uddiClerk.getUDDINode().getProperties().containsKey("keyDomain")) throw new
ConfigurationException("Either the wsdl(" + wsdls[w]
+ + ") or
clerk (" + uddiClerk.name + ") elements require a businessKey, or businessName
& keyDomain attributes");
+ else {
+ Properties
properties = new Properties(uddiClerk.getUDDINode().getProperties());
+ if
(businessName!=null) properties.put("businessName", businessName);
+ if
(keyDomain!=null) properties.put("keyDomain", keyDomain);
+ businessKey =
UDDIKeyConvention.getBusinessKey(properties);
+ }
+ }
+ if (!
businessKey.toLowerCase().startsWith("uddi:") || !
businessKey.substring(5).contains(":")) {
+ throw new
ConfigurationException("The businessKey " + businessKey + " does not implement
a valid UDDI v3 key format.");
+ }
+
wsdl.setBusinessKey(businessKey);
+ if (keyDomain==null) {
+ keyDomain =
businessKey.split(":")[1];
+ }
+ wsdl.setKeyDomain(keyDomain);
+ wsdls[w]=wsdl;
+ }
+ uddiClerk.setWsdls(wsdls);
+ }
+
clerks.put(names[i],uddiClerk);
}
}
Modified:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/Property.java
Sat May 11 00:27:33 2013
@@ -49,11 +49,7 @@ public class Property
public static final String BASIC_AUTH_PASSWORD =
"basicAuthPassword";
//Default Values
- public static final String DEFAULT_LANG = "en:";
- public static final String DEFAULT_BUSINESS_KEY_FORMAT =
"uddi:${keyDomain}:business_${businessName}";
- public static final String DEFAULT_SERVICE_KEY_FORMAT =
"uddi:${keyDomain}:service_${serviceName}";
- public static final String DEFAULT_SUBSCRIPTION_KEY_FORMAT =
"uddi:${keyDomain}:service_cache_${nodeName}";
- public static final String DEFAULT_BINDING_KEY_FORMAT =
"uddi:${keyDomain}:binding_${nodeName}_${serviceName}_${portName}";
+ public static final String DEFAULT_LANG = "en";
public static final String DEFAULT_SERVICE_DESCRIPTION = "Default
service description when no <wsdl:document> element is defined inside the
<wsdl:service> element.";
public static final String DEFAULT_BINDING_DESCRIPTION = "Default
binding description when no <wsdl:document> element is defined inside the
<wsdl:binding> element.";
@@ -64,81 +60,5 @@ public class Property
}
return tmpDir;
}
- /**
- * Constructs the serviceKey based on the bindingKeyFormat specified in
the properties. When no
- * businessKeyFormat is specific the default format of
uddi:${keyDomain}:${businessName} is used. The businessName
- * property needs to be set properties.
- *
- * @param properties
- * @return the businessKey
- */
- public static String getBusinessKey(Properties properties) {
- String keyFormat = properties.getProperty(BUSINESS_KEY_FORMAT,
DEFAULT_BUSINESS_KEY_FORMAT);
- String businessKey = TokenResolver.replaceTokens(keyFormat,
properties).toLowerCase();
- return businessKey;
- }
-
- public static String getSubscriptionKey(Properties properties) {
- String keyFormat =
properties.getProperty(SUBSCRIPTION_KEY_FORMAT,
DEFAULT_SUBSCRIPTION_KEY_FORMAT);
- String subscriptionKey = TokenResolver.replaceTokens(keyFormat,
properties).toLowerCase();
- return subscriptionKey;
- }
- /**
- * Constructs the serviceKey based on the serviceKeyFormat specified in
the properties. When no
- * serviceKeyFormat is specific the default format of
uddi:${keyDomain}:${serviceName} is used.
- *
- * @param properties
- * @param serviceName
- * @return the serviceKey
- */
- public static String getServiceKey(Properties properties, QName
serviceQName) {
- Properties tempProperties = new Properties();
- tempProperties.putAll(properties);
- tempProperties.put("serviceName", serviceQName.getLocalPart());
- //Constructing the serviceKey
- String keyFormat =
tempProperties.getProperty(SERVICE_KEY_FORMAT, DEFAULT_SERVICE_KEY_FORMAT);
- String serviceKey = TokenResolver.replaceTokens(keyFormat,
tempProperties).toLowerCase();
- return serviceKey;
- }
-
- public static String getBindingKey(Properties properties, QName
serviceName, String portName, URL bindingUrl) {
-
- String bindingKey = null;
- try {
- URI bindingURI = bindingUrl.toURI();
- bindingKey = getBindingKey(properties, serviceName,
portName, bindingURI);
- } catch (URISyntaxException e) {
-
- }
- return bindingKey;
-
- }
- /**
- * Constructs the bindingKey based on the bindingKeyFormat specified in
the properties. When no
- * bindingKeyFormat is specific the default format of
uddi:${keyDomain}:${nodeName}-${serviceName}-{portName} is used.
- *
- * @param properties
- * @param serviceName
- * @param portName
- * @return the bindingKey
- */
- public static String getBindingKey(Properties properties, QName
serviceName, String portName, URI bindingUrl) {
- Properties tempProperties = new Properties();
- tempProperties.putAll(properties);
- tempProperties.put("serviceName", serviceName.getLocalPart());
- tempProperties.put("portName", portName);
- int port = bindingUrl.getPort();
- if (port==-1) {
- if ("http".equals(bindingUrl.getScheme())) {
- port = 80;
- } else if ("https".equals(bindingUrl.getScheme())) {
- port = 443;
- }
- }
- tempProperties.put("port", String.valueOf(port));
- //Constructing the binding Key
- String keyFormat = properties.getProperty(BINDING_KEY_FORMAT,
DEFAULT_BINDING_KEY_FORMAT);
- String bindingKey = TokenResolver.replaceTokens(keyFormat,
tempProperties).toLowerCase();
- return bindingKey;
- }
+
}
Modified:
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/TokenResolver.java
URL:
http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/TokenResolver.java?rev=1481240&r1=1481239&r2=1481240&view=diff
==============================================================================
---
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/TokenResolver.java
(original)
+++
juddi/branches/juddi-3.2.x/juddi-client/src/main/java/org/apache/juddi/v3/client/config/TokenResolver.java
Sat May 11 00:27:33 2013
@@ -30,7 +30,7 @@ public class TokenResolver {
public synchronized static String replaceTokens(String string,
Properties properties) {
if (properties==null || string==null) return string;
- string = string.replaceAll("\\n"," ").replaceAll("\\r", "");
+ string = string.replaceAll("\\n"," ").replaceAll("\\r",
"").replaceAll(" ","");
/* pattern that is multi-line (?m), and looks for a pattern of
* ${token}, in a 'reluctant' manner, by using the ? to
* make sure we find ALL the tokens.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]